power: cpcap: make regulator node names case independent

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>
This commit is contained in:
Svyatoslav Ryhel
2026-03-22 14:58:57 +02:00
parent d79350d162
commit 36b142e11f
2 changed files with 3 additions and 1 deletions
+2
View 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 },
{ },
};
+1 -1
View 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) {