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 <[email protected]>
---
 drivers/power/pmic/cpcap.c                | 2 ++
 drivers/power/regulator/cpcap_regulator.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/power/pmic/cpcap.c b/drivers/power/pmic/cpcap.c
index 2fbbc7e80f0..b9d783773ed 100644
--- a/drivers/power/pmic/cpcap.c
+++ b/drivers/power/pmic/cpcap.c
@@ -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 },
        { },
 };
 
diff --git a/drivers/power/regulator/cpcap_regulator.c 
b/drivers/power/regulator/cpcap_regulator.c
index 15426675066..0fbce57048c 100644
--- a/drivers/power/regulator/cpcap_regulator.c
+++ b/drivers/power/regulator/cpcap_regulator.c
@@ -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) {
-- 
2.51.0

Reply via email to