Skip to content

Commit 4c33cef

Browse files
olerembroonie
authored andcommitted
regulator: pca9450: link regulator inputs to supply groups
Add supply_name entries for all PCA9450 regulators to describe their respective input pin groups (INB13, INB26, INB45, INL1). This links each buck and LDO to the upstream supply that powers its input group. On some systems, power faults such as undervoltage are detected before the PMIC itself. Defining supply relationships allows the regulator framework to propagate such events properly through the dependency chain. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20251027124415.989301-3-o.rempel@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 86df003 commit 4c33cef

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

drivers/regulator/pca9450-regulator.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
355355
{
356356
.desc = {
357357
.name = "buck1",
358+
.supply_name = "inb13",
358359
.of_match = of_match_ptr("BUCK1"),
359360
.regulators_node = of_match_ptr("regulators"),
360361
.id = PCA9450_BUCK1,
@@ -388,6 +389,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
388389
{
389390
.desc = {
390391
.name = "buck2",
392+
.supply_name = "inb26",
391393
.of_match = of_match_ptr("BUCK2"),
392394
.regulators_node = of_match_ptr("regulators"),
393395
.id = PCA9450_BUCK2,
@@ -421,6 +423,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
421423
{
422424
.desc = {
423425
.name = "buck3",
426+
.supply_name = "inb13",
424427
.of_match = of_match_ptr("BUCK3"),
425428
.regulators_node = of_match_ptr("regulators"),
426429
.id = PCA9450_BUCK3,
@@ -454,6 +457,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
454457
{
455458
.desc = {
456459
.name = "buck4",
460+
.supply_name = "inb45",
457461
.of_match = of_match_ptr("BUCK4"),
458462
.regulators_node = of_match_ptr("regulators"),
459463
.id = PCA9450_BUCK4,
@@ -478,6 +482,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
478482
{
479483
.desc = {
480484
.name = "buck5",
485+
.supply_name = "inb45",
481486
.of_match = of_match_ptr("BUCK5"),
482487
.regulators_node = of_match_ptr("regulators"),
483488
.id = PCA9450_BUCK5,
@@ -502,6 +507,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
502507
{
503508
.desc = {
504509
.name = "buck6",
510+
.supply_name = "inb26",
505511
.of_match = of_match_ptr("BUCK6"),
506512
.regulators_node = of_match_ptr("regulators"),
507513
.id = PCA9450_BUCK6,
@@ -526,6 +532,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
526532
{
527533
.desc = {
528534
.name = "ldo1",
535+
.supply_name = "inl1",
529536
.of_match = of_match_ptr("LDO1"),
530537
.regulators_node = of_match_ptr("regulators"),
531538
.id = PCA9450_LDO1,
@@ -544,6 +551,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
544551
{
545552
.desc = {
546553
.name = "ldo2",
554+
.supply_name = "inl1",
547555
.of_match = of_match_ptr("LDO2"),
548556
.regulators_node = of_match_ptr("regulators"),
549557
.id = PCA9450_LDO2,
@@ -562,6 +570,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
562570
{
563571
.desc = {
564572
.name = "ldo3",
573+
.supply_name = "inl1",
565574
.of_match = of_match_ptr("LDO3"),
566575
.regulators_node = of_match_ptr("regulators"),
567576
.id = PCA9450_LDO3,
@@ -580,6 +589,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
580589
{
581590
.desc = {
582591
.name = "ldo4",
592+
.supply_name = "inl1",
583593
.of_match = of_match_ptr("LDO4"),
584594
.regulators_node = of_match_ptr("regulators"),
585595
.id = PCA9450_LDO4,
@@ -598,6 +608,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
598608
{
599609
.desc = {
600610
.name = "ldo5",
611+
.supply_name = "inl1",
601612
.of_match = of_match_ptr("LDO5"),
602613
.regulators_node = of_match_ptr("regulators"),
603614
.id = PCA9450_LDO5,
@@ -623,6 +634,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
623634
{
624635
.desc = {
625636
.name = "buck1",
637+
.supply_name = "inb13",
626638
.of_match = of_match_ptr("BUCK1"),
627639
.regulators_node = of_match_ptr("regulators"),
628640
.id = PCA9450_BUCK1,
@@ -656,6 +668,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
656668
{
657669
.desc = {
658670
.name = "buck2",
671+
.supply_name = "inb26",
659672
.of_match = of_match_ptr("BUCK2"),
660673
.regulators_node = of_match_ptr("regulators"),
661674
.id = PCA9450_BUCK2,
@@ -689,6 +702,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
689702
{
690703
.desc = {
691704
.name = "buck4",
705+
.supply_name = "inb45",
692706
.of_match = of_match_ptr("BUCK4"),
693707
.regulators_node = of_match_ptr("regulators"),
694708
.id = PCA9450_BUCK4,
@@ -713,6 +727,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
713727
{
714728
.desc = {
715729
.name = "buck5",
730+
.supply_name = "inb45",
716731
.of_match = of_match_ptr("BUCK5"),
717732
.regulators_node = of_match_ptr("regulators"),
718733
.id = PCA9450_BUCK5,
@@ -737,6 +752,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
737752
{
738753
.desc = {
739754
.name = "buck6",
755+
.supply_name = "inb26",
740756
.of_match = of_match_ptr("BUCK6"),
741757
.regulators_node = of_match_ptr("regulators"),
742758
.id = PCA9450_BUCK6,
@@ -761,6 +777,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
761777
{
762778
.desc = {
763779
.name = "ldo1",
780+
.supply_name = "inl1",
764781
.of_match = of_match_ptr("LDO1"),
765782
.regulators_node = of_match_ptr("regulators"),
766783
.id = PCA9450_LDO1,
@@ -779,6 +796,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
779796
{
780797
.desc = {
781798
.name = "ldo2",
799+
.supply_name = "inl1",
782800
.of_match = of_match_ptr("LDO2"),
783801
.regulators_node = of_match_ptr("regulators"),
784802
.id = PCA9450_LDO2,
@@ -797,6 +815,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
797815
{
798816
.desc = {
799817
.name = "ldo3",
818+
.supply_name = "inl1",
800819
.of_match = of_match_ptr("LDO3"),
801820
.regulators_node = of_match_ptr("regulators"),
802821
.id = PCA9450_LDO3,
@@ -815,6 +834,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
815834
{
816835
.desc = {
817836
.name = "ldo4",
837+
.supply_name = "inl1",
818838
.of_match = of_match_ptr("LDO4"),
819839
.regulators_node = of_match_ptr("regulators"),
820840
.id = PCA9450_LDO4,
@@ -833,6 +853,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
833853
{
834854
.desc = {
835855
.name = "ldo5",
856+
.supply_name = "inl1",
836857
.of_match = of_match_ptr("LDO5"),
837858
.regulators_node = of_match_ptr("regulators"),
838859
.id = PCA9450_LDO5,
@@ -854,6 +875,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
854875
{
855876
.desc = {
856877
.name = "buck1",
878+
.supply_name = "inb13",
857879
.of_match = of_match_ptr("BUCK1"),
858880
.regulators_node = of_match_ptr("regulators"),
859881
.id = PCA9450_BUCK1,
@@ -886,6 +908,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
886908
{
887909
.desc = {
888910
.name = "buck2",
911+
.supply_name = "inb26",
889912
.of_match = of_match_ptr("BUCK2"),
890913
.regulators_node = of_match_ptr("regulators"),
891914
.id = PCA9450_BUCK2,
@@ -918,6 +941,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
918941
{
919942
.desc = {
920943
.name = "buck4",
944+
.supply_name = "inb45",
921945
.of_match = of_match_ptr("BUCK4"),
922946
.regulators_node = of_match_ptr("regulators"),
923947
.id = PCA9450_BUCK4,
@@ -942,6 +966,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
942966
{
943967
.desc = {
944968
.name = "buck5",
969+
.supply_name = "inb45",
945970
.of_match = of_match_ptr("BUCK5"),
946971
.regulators_node = of_match_ptr("regulators"),
947972
.id = PCA9450_BUCK5,
@@ -966,6 +991,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
966991
{
967992
.desc = {
968993
.name = "buck6",
994+
.supply_name = "inb26",
969995
.of_match = of_match_ptr("BUCK6"),
970996
.regulators_node = of_match_ptr("regulators"),
971997
.id = PCA9450_BUCK6,
@@ -990,6 +1016,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
9901016
{
9911017
.desc = {
9921018
.name = "ldo1",
1019+
.supply_name = "inl1",
9931020
.of_match = of_match_ptr("LDO1"),
9941021
.regulators_node = of_match_ptr("regulators"),
9951022
.id = PCA9450_LDO1,
@@ -1008,6 +1035,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
10081035
{
10091036
.desc = {
10101037
.name = "ldo3",
1038+
.supply_name = "inl1",
10111039
.of_match = of_match_ptr("LDO3"),
10121040
.regulators_node = of_match_ptr("regulators"),
10131041
.id = PCA9450_LDO3,
@@ -1026,6 +1054,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
10261054
{
10271055
.desc = {
10281056
.name = "ldo4",
1057+
.supply_name = "inl1",
10291058
.of_match = of_match_ptr("LDO4"),
10301059
.regulators_node = of_match_ptr("regulators"),
10311060
.id = PCA9450_LDO4,
@@ -1044,6 +1073,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
10441073
{
10451074
.desc = {
10461075
.name = "ldo5",
1076+
.supply_name = "inl1",
10471077
.of_match = of_match_ptr("LDO5"),
10481078
.regulators_node = of_match_ptr("regulators"),
10491079
.id = PCA9450_LDO5,

0 commit comments

Comments
 (0)