From: Mark Brown broonie@linaro.org
Reported-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Signed-off-by: Mark Brown broonie@linaro.org --- Documentation/devicetree/bindings/regulator/gpio-regulator.txt | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt index 63c659800c03..aaf5f66e66fb 100644 --- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt @@ -10,6 +10,8 @@ Optional properties: - gpios : GPIO group used to control voltage. - startup-delay-us : Startup time in microseconds. - enable-active-high : Polarity of GPIO is active high (default is low). +- regulator-type : Specifies what is being regulated, must be either + "voltage" or "current"
Any property defined as part of the core regulator binding defined in regulator.txt can also be used.
From: Mark Brown broonie@linaro.org
Reported-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Signed-off-by: Mark Brown broonie@linaro.org --- drivers/regulator/gpio-regulator.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 13ec94d984ca..c0a1d00b78c9 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -210,6 +210,9 @@ 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;
Hi Mark,
Thank you for the patch.
On Thursday 05 December 2013 19:12:02 Mark Brown wrote:
From: Mark Brown broonie@linaro.org
Reported-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Signed-off-by: Mark Brown broonie@linaro.org
I believe you could squash this patch with the one you've previously posted that makes the property optional. For the result,
Acked-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
drivers/regulator/gpio-regulator.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 13ec94d984ca..c0a1d00b78c9 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -210,6 +210,9 @@ 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;
Hi Mark,
Thank you for the patch.
On Thursday 05 December 2013 19:12:01 Mark Brown wrote:
From: Mark Brown broonie@linaro.org
Reported-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Signed-off-by: Mark Brown broonie@linaro.org
Documentation/devicetree/bindings/regulator/gpio-regulator.txt | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt index 63c659800c03..aaf5f66e66fb 100644 --- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt @@ -10,6 +10,8 @@ Optional properties:
- gpios : GPIO group used to control voltage.
- startup-delay-us : Startup time in microseconds.
- enable-active-high : Polarity of GPIO is active high (default is low).
+- regulator-type : Specifies what is being regulated, must be either
"voltage" or "current"
What about adding "The type defaults to voltage if unspecified." ?
Any property defined as part of the core regulator binding defined in regulator.txt can also be used.
On Thu, Dec 05, 2013 at 09:08:59PM +0100, Laurent Pinchart wrote:
On Thursday 05 December 2013 19:12:01 Mark Brown wrote:
+- regulator-type : Specifies what is being regulated, must be either
"voltage" or "current"
What about adding "The type defaults to voltage if unspecified." ?
I was trying to think of a stronger wording for that - more like "if specified at all should say "current", "voltage" is also supported for legacy reasons and is the default.". I'm not even sure about documenting voltage here.
linaro-kernel@lists.linaro.org