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>
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 },
{ },
};
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) {