public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: gpio: Document regulator-type property
@ 2013-12-05 19:12 Mark Brown
  2013-12-05 19:12 ` [PATCH 2/2] regulator: gpio: Warn if an invalid regulator-type is supplied Mark Brown
  2013-12-05 20:08 ` [PATCH 1/2] regulator: gpio: Document regulator-type property Laurent Pinchart
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Brown @ 2013-12-05 19:12 UTC (permalink / raw)
  To: Laurent Pinchart, Liam Girdwood; +Cc: linux-kernel, linaro-kernel, Mark Brown

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.
-- 
1.8.5.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] regulator: gpio: Warn if an invalid regulator-type is supplied
  2013-12-05 19:12 [PATCH 1/2] regulator: gpio: Document regulator-type property Mark Brown
@ 2013-12-05 19:12 ` Mark Brown
  2013-12-05 20:10   ` Laurent Pinchart
  2013-12-05 20:08 ` [PATCH 1/2] regulator: gpio: Document regulator-type property Laurent Pinchart
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-12-05 19:12 UTC (permalink / raw)
  To: Laurent Pinchart, Liam Girdwood; +Cc: linux-kernel, linaro-kernel, Mark Brown

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;
-- 
1.8.5.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] regulator: gpio: Document regulator-type property
  2013-12-05 19:12 [PATCH 1/2] regulator: gpio: Document regulator-type property Mark Brown
  2013-12-05 19:12 ` [PATCH 2/2] regulator: gpio: Warn if an invalid regulator-type is supplied Mark Brown
@ 2013-12-05 20:08 ` Laurent Pinchart
  2013-12-05 20:42   ` Mark Brown
  1 sibling, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2013-12-05 20:08 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, linux-kernel, linaro-kernel, Mark Brown

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.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] regulator: gpio: Warn if an invalid regulator-type is supplied
  2013-12-05 19:12 ` [PATCH 2/2] regulator: gpio: Warn if an invalid regulator-type is supplied Mark Brown
@ 2013-12-05 20:10   ` Laurent Pinchart
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2013-12-05 20:10 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, linux-kernel, linaro-kernel, Mark Brown

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;
-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] regulator: gpio: Document regulator-type property
  2013-12-05 20:08 ` [PATCH 1/2] regulator: gpio: Document regulator-type property Laurent Pinchart
@ 2013-12-05 20:42   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-12-05 20:42 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Liam Girdwood, linux-kernel, linaro-kernel

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-05 20:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 19:12 [PATCH 1/2] regulator: gpio: Document regulator-type property Mark Brown
2013-12-05 19:12 ` [PATCH 2/2] regulator: gpio: Warn if an invalid regulator-type is supplied Mark Brown
2013-12-05 20:10   ` Laurent Pinchart
2013-12-05 20:08 ` [PATCH 1/2] regulator: gpio: Document regulator-type property Laurent Pinchart
2013-12-05 20:42   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox