]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
regulator: qcom_smd: fix overlooooong supply names
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 5 Jan 2017 13:43:49 +0000 (14:43 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 5 Jan 2017 13:43:49 +0000 (14:43 +0100)
commitc701553f561197abdf486c8c5f1c2f12bfcef7e9
tree9cc42f7848520b856f1baf0bcdf412457aeec312
parente00bc6d8858bcd0d1170c5448630e30d1309635c
regulator: qcom_smd: fix overlooooong supply names

The regulator framwork limits the name of a regulator supply to 32
characters:
|static struct device_node *of_get_regulator(struct device *dev, const char *supply)
|{
| struct device_node *regnode = NULL;
| char prop_name[32]; /* 32 is max size of property name */
|
| dev_dbg(dev, "Looking up %s-supply from device tree\n", supply);
|
| snprintf(prop_name, 32, "%s-supply", supply);
| regnode = of_parse_phandle(dev->of_node, prop_name, 0);

Thus, names like 'vdd_l8_l9_l10_l11_l12_l13_l14_l15_l16_l17_l18'
cannot be successfully looked up in DT. Use an abbreviated name.
drivers/regulator/qcom_smd-regulator.c