]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
power: cpcap: make regulator node names case independent
authorSvyatoslav Ryhel <clamor95@gmail.com>
Sat, 7 Feb 2026 10:46:25 +0000 (12:46 +0200)
committerSvyatoslav Ryhel <clamor95@gmail.com>
Sun, 22 Mar 2026 12:58:57 +0000 (14:58 +0200)
The Linux kernel CPCAP driver uses uppercase regulator node names, while
this driver uses lowercase. Since regulator names can be case-insensitive,
update the driver to support both uppercase and lowercase node names.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
drivers/power/pmic/cpcap.c
drivers/power/regulator/cpcap_regulator.c

index 2fbbc7e80f0daa0185228b788e7c2c5011e67e8e..b9d783773ed218941e13d4599a1846441b846462 100644 (file)
@@ -14,7 +14,9 @@
 
 static const struct pmic_child_info pmic_children_info[] = {
        { .prefix = "sw", .driver = CPCAP_SW_DRIVER },
+       { .prefix = "SW", .driver = CPCAP_SW_DRIVER },
        { .prefix = "v", .driver = CPCAP_LDO_DRIVER },
+       { .prefix = "V", .driver = CPCAP_LDO_DRIVER },
        { },
 };
 
index 15426675066fd10be92e2c0a8380c63704e7bc24..0fbce57048cb8f15e0f281817cfd05ceb981e1c0 100644 (file)
@@ -229,7 +229,7 @@ static int cpcap_regulator_probe(struct udevice *dev)
 
        for (id = 0; id < CPCAP_REGULATORS_COUNT; id++)
                if (cpcap_regulator_to_name[id])
-                       if (!strcmp(dev->name, cpcap_regulator_to_name[id]))
+                       if (!strcasecmp(dev->name, cpcap_regulator_to_name[id]))
                                break;
 
        switch (id) {