Skip to content

Commit b30d390

Browse files
mwallebroonie
authored andcommitted
regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators
The TI TPS652G1 is a stripped down version of the TPS65224 PMIC. It doesn't feature the multiphase buck converter nor any voltage monitoring. Due to the latter there are no interrupts serviced. In case of the TPS652G1 any interrupt related setup is just skipped. Signed-off-by: Michael Walle <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e64ee27 commit b30d390

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/regulator/tps6594-regulator.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,13 @@ static const struct tps6594_regulator_desc tps65224_reg_desc = {
577577
.num_ext_irqs = ARRAY_SIZE(tps65224_ext_regulator_irq_types),
578578
};
579579

580+
static const struct tps6594_regulator_desc tps652g1_reg_desc = {
581+
.ldo_regs = tps65224_ldo_regs,
582+
.num_ldo_regs = ARRAY_SIZE(tps65224_ldo_regs),
583+
.buck_regs = tps65224_buck_regs,
584+
.num_buck_regs = ARRAY_SIZE(tps65224_buck_regs),
585+
};
586+
580587
static const struct tps6594_regulator_desc tps6594_reg_desc = {
581588
.multi_phase_regs = tps6594_multi_regs,
582589
.num_multi_phase_regs = ARRAY_SIZE(tps6594_multi_regs),
@@ -627,6 +634,9 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
627634
case TPS65224:
628635
desc = &tps65224_reg_desc;
629636
break;
637+
case TPS652G1:
638+
desc = &tps652g1_reg_desc;
639+
break;
630640
case TPS6594:
631641
case TPS6593:
632642
desc = &tps6594_reg_desc;
@@ -716,6 +726,9 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
716726
"failed to register %s regulator\n",
717727
pdev->name);
718728

729+
if (!desc->num_irq_types)
730+
continue;
731+
719732
/* config multiphase buck12+buck34 */
720733
if (i == MULTI_BUCK12_34)
721734
buck_idx = 2;
@@ -759,6 +772,9 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
759772
return dev_err_probe(tps->dev, PTR_ERR(rdev),
760773
"failed to register %s regulator\n", pdev->name);
761774

775+
if (!desc->num_irq_types)
776+
continue;
777+
762778
error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
763779
desc->bucks_irq_types[i],
764780
desc->num_irq_types, &irq_idx);
@@ -773,6 +789,9 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
773789
"failed to register %s regulator\n",
774790
pdev->name);
775791

792+
if (!desc->num_irq_types)
793+
continue;
794+
776795
error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
777796
desc->ldos_irq_types[i],
778797
desc->num_irq_types, &irq_idx);

0 commit comments

Comments
 (0)