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:
@@ -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 },
|
||||
{ },
|
||||
};
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user