Commit 9eb9d315 authored by Mark Brown's avatar Mark Brown

regulator: gpio: Warn if an invalid regulator-type is supplied

Reported-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 5b1ada83
...@@ -210,6 +210,9 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np) ...@@ -210,6 +210,9 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
config->type = REGULATOR_VOLTAGE; config->type = REGULATOR_VOLTAGE;
else if (!strncmp("current", regtype, 7)) else if (!strncmp("current", regtype, 7))
config->type = REGULATOR_CURRENT; config->type = REGULATOR_CURRENT;
else
dev_warn(dev, "Unknown regulator-type '%s'\n",
regtype);
} }
return config; return config;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment