regulator: gpio-regulator: warn if unknown regulator type
PATCH 1/1 regulator: gpio-regulator: warn if unknown regulator type
The of_get_gpio_regulator_config() will error out if there is no "regulator_type" field in the fdt node hoewver it makes no attempt at warning if the contents of said node is not known.
Signed-off-by Ben Dooks <[email protected]>
---
Cc: Liam Girdwood <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: [email protected]
--- drivers/regulator/gpio-regulator.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/regulator/gpio-regulator.c +2 -0
@@ -213,6 +213,8 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np) config->type =REGULATOR_VOLTAGE ; else if (!strncmp("current", regtype, 7)) config->type =REGULATOR_CURRENT ; + else + dev_warn(dev, "Unknown regulator-type '%s'\n", regtype);return config; }
Signature · 1 line
1.8.5.2
Mark Brown
maintainerQuoted 3 lines · Ben Dooks
The
of_get_gpio_regulator_config()will error out if there is no "regulator_type" field in the fdt node hoewver it makes no attempt at warning if the contents of said node is not known.
Please sumbit patches against current code, this won't apply since this code has been restructured since the version you're working with and now has an improved version of this warning.