All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property
@ 2017-05-17 16:43 Fabio Estevam
  2017-05-17 16:43 ` [PATCH 2/2] ARM: dts: tx6: " Fabio Estevam
  2017-05-17 16:59 ` [PATCH 1/2] ARM: dts: imx23-sansa: " Stefan Wahren
  0 siblings, 2 replies; 7+ messages in thread
From: Fabio Estevam @ 2017-05-17 16:43 UTC (permalink / raw)
  To: linux-arm-kernel

Property 'enable-active-low' does not exist. Only 'enable-active-high' is
valid, and when this property is absent the gpio regulator will act as
active low by default.

So remove the unexisting 'enable-active-low' property. 

While at it, in order to make the gpio regulator description clearer pass
the GPIO_ACTIVE_LOW flag.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 arch/arm/boot/dts/imx23-sansa.dts | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx23-sansa.dts b/arch/arm/boot/dts/imx23-sansa.dts
index 4ec32f4..221fd55 100644
--- a/arch/arm/boot/dts/imx23-sansa.dts
+++ b/arch/arm/boot/dts/imx23-sansa.dts
@@ -42,6 +42,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
 #include "imx23.dtsi"
 
 / {
@@ -149,9 +150,8 @@
 		regulator-name = "vdd-touchpad0";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
-		gpio = <&gpio0 26 0>;
+		gpio = <&gpio0 26 GPIO_ACTIVE_LOW>;
 		regulator-always-on;
-		enable-active-low;
 	};
 
 	reg_vdd_tuner: regulator-vdd-tuner0 {
@@ -159,9 +159,8 @@
 		regulator-name = "vdd-tuner0";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
-		gpio = <&gpio0 29 0>;
+		gpio = <&gpio0 29 GPIO_ACTIVE_LOW>;
 		regulator-always-on;
-		enable-active-low;
 	};
 
 	backlight {
-- 
2.7.4

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

* [PATCH 2/2] ARM: dts: tx6: Remove 'enable-active-low' property
  2017-05-17 16:43 [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property Fabio Estevam
@ 2017-05-17 16:43 ` Fabio Estevam
  2017-05-17 16:59 ` [PATCH 1/2] ARM: dts: imx23-sansa: " Stefan Wahren
  1 sibling, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2017-05-17 16:43 UTC (permalink / raw)
  To: linux-arm-kernel

Property 'enable-active-low' does not exist. Only 'enable-active-high' is
valid, and when this property is absent the gpio regulator will act as
active low by default.

So remove the unexisting 'enable-active-low' property. 

While at it in order to make the gpio regulator description clearer pass
the GPIO_ACTIVE_LOW flag.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 arch/arm/boot/dts/imx6qdl-tx6.dtsi  | 3 +--
 arch/arm/boot/dts/imx6ul-tx6ul.dtsi | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx6qdl-tx6.dtsi b/arch/arm/boot/dts/imx6qdl-tx6.dtsi
index 1691714..a146fe7 100644
--- a/arch/arm/boot/dts/imx6qdl-tx6.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-tx6.dtsi
@@ -133,8 +133,7 @@
 		regulator-max-microvolt = <3300000>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flexcan_xcvr>;
-		gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
-		enable-active-low;
+		gpio = <&gpio4 21 GPIO_ACTIVE_LOW>;
 	};
 
 	reg_lcd0_pwr: regulator-lcd0-pwr {
diff --git a/arch/arm/boot/dts/imx6ul-tx6ul.dtsi b/arch/arm/boot/dts/imx6ul-tx6ul.dtsi
index c784a0b..4ccc9e9 100644
--- a/arch/arm/boot/dts/imx6ul-tx6ul.dtsi
+++ b/arch/arm/boot/dts/imx6ul-tx6ul.dtsi
@@ -173,8 +173,7 @@
 		regulator-max-microvolt = <3300000>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_flexcan_xcvr>;
-		gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>;
-		enable-active-low;
+		gpio = <&gpio3 5 GPIO_ACTIVE_LOW>;
 	};
 
 	reg_lcd_pwr: regulator-lcdpwr {
-- 
2.7.4

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

* [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property
  2017-05-17 16:43 [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property Fabio Estevam
  2017-05-17 16:43 ` [PATCH 2/2] ARM: dts: tx6: " Fabio Estevam
@ 2017-05-17 16:59 ` Stefan Wahren
  2017-05-17 17:06   ` Fabio Estevam
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2017-05-17 16:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Fabio,

> Fabio Estevam <fabio.estevam@nxp.com> hat am 17. Mai 2017 um 18:43 geschrieben:
> 
> 
> Property 'enable-active-low' does not exist. Only 'enable-active-high' is
> valid, and when this property is absent the gpio regulator will act as
> active low by default.
> 
> So remove the unexisting 'enable-active-low' property. 
> 
> While at it, in order to make the gpio regulator description clearer pass
> the GPIO_ACTIVE_LOW flag.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  arch/arm/boot/dts/imx23-sansa.dts | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx23-sansa.dts b/arch/arm/boot/dts/imx23-sansa.dts
> index 4ec32f4..221fd55 100644
> --- a/arch/arm/boot/dts/imx23-sansa.dts
> +++ b/arch/arm/boot/dts/imx23-sansa.dts
> @@ -42,6 +42,7 @@
>   */
>  
>  /dts-v1/;
> +#include <dt-bindings/gpio/gpio.h>
>  #include "imx23.dtsi"
>  
>  / {
> @@ -149,9 +150,8 @@
>  		regulator-name = "vdd-touchpad0";
>  		regulator-min-microvolt = <3300000>;
>  		regulator-max-microvolt = <3300000>;
> -		gpio = <&gpio0 26 0>;
> +		gpio = <&gpio0 26 GPIO_ACTIVE_LOW>;

GPIO_ACTIVE_LOW = 1, GPIO_ACTIVE_HIGH = 0

So this doesn't look save to me.

Stefan

>  		regulator-always-on;
> -		enable-active-low;
>  	};
>  
>  	reg_vdd_tuner: regulator-vdd-tuner0 {
> @@ -159,9 +159,8 @@
>  		regulator-name = "vdd-tuner0";
>  		regulator-min-microvolt = <3300000>;
>  		regulator-max-microvolt = <3300000>;
> -		gpio = <&gpio0 29 0>;
> +		gpio = <&gpio0 29 GPIO_ACTIVE_LOW>;
>  		regulator-always-on;
> -		enable-active-low;
>  	};
>  
>  	backlight {
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property
  2017-05-17 16:59 ` [PATCH 1/2] ARM: dts: imx23-sansa: " Stefan Wahren
@ 2017-05-17 17:06   ` Fabio Estevam
  2017-05-17 17:52     ` Stefan Wahren
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2017-05-17 17:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Stefan,

On Wed, May 17, 2017 at 1:59 PM, Stefan Wahren <stefan.wahren@i2se.com> wrote:

> GPIO_ACTIVE_LOW = 1, GPIO_ACTIVE_HIGH = 0

Correct.

> So this doesn't look save to me.

gpio regulator driver does not look for the gpio flag field, so this
change is safe.

That's the reason there is a property called 'enable-active-high'.

When 'enable-active-high' is passed the gpio regulator is active high.
If the property is absent then it is active low.

This is explained in
Documentation/devicetree/bindings/regulator/fixed-regulator.txt

Passing GPIO_ACTIVE_LOW describes the gpio regulator correctly in this case.

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

* [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property
  2017-05-17 17:06   ` Fabio Estevam
@ 2017-05-17 17:52     ` Stefan Wahren
  2017-05-24 11:55       ` Fabio Estevam
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2017-05-17 17:52 UTC (permalink / raw)
  To: linux-arm-kernel


> Fabio Estevam <festevam@gmail.com> hat am 17. Mai 2017 um 19:06 geschrieben:
> 
> 
> Hi Stefan,
> 
> On Wed, May 17, 2017 at 1:59 PM, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> 
> > GPIO_ACTIVE_LOW = 1, GPIO_ACTIVE_HIGH = 0
> 
> Correct.
> 
> > So this doesn't look save to me.
> 
> gpio regulator driver does not look for the gpio flag field, so this
> change is safe.
> 
> That's the reason there is a property called 'enable-active-high'.
> 
> When 'enable-active-high' is passed the gpio regulator is active high.
> If the property is absent then it is active low.
> 
> This is explained in
> Documentation/devicetree/bindings/regulator/fixed-regulator.txt
> 
> Passing GPIO_ACTIVE_LOW describes the gpio regulator correctly in this case.
> 

Thanks for this explanation, this wasn't clear to me from the subject / commit log.

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

* [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property
  2017-05-17 17:52     ` Stefan Wahren
@ 2017-05-24 11:55       ` Fabio Estevam
  2017-05-24 14:49         ` Stefan Wahren
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2017-05-24 11:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Stefan,

On Wed, May 17, 2017 at 2:52 PM, Stefan Wahren <stefan.wahren@i2se.com> wrote:

> Thanks for this explanation, this wasn't clear to me from the subject / commit log.

I have sent a v2, where I try to make this clear. Thanks for your feedback.

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

* [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property
  2017-05-24 11:55       ` Fabio Estevam
@ 2017-05-24 14:49         ` Stefan Wahren
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Wahren @ 2017-05-24 14:49 UTC (permalink / raw)
  To: linux-arm-kernel

Am 24.05.2017 um 13:55 schrieb Fabio Estevam:
> Hi Stefan,
>
> On Wed, May 17, 2017 at 2:52 PM, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
>> Thanks for this explanation, this wasn't clear to me from the subject / commit log.
> I have sent a v2, where I try to make this clear. Thanks for your feedback.
>

Looks good to me. Unfortunately i don't a board to test it.

Stefan

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

end of thread, other threads:[~2017-05-24 14:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 16:43 [PATCH 1/2] ARM: dts: imx23-sansa: Remove 'enable-active-low' property Fabio Estevam
2017-05-17 16:43 ` [PATCH 2/2] ARM: dts: tx6: " Fabio Estevam
2017-05-17 16:59 ` [PATCH 1/2] ARM: dts: imx23-sansa: " Stefan Wahren
2017-05-17 17:06   ` Fabio Estevam
2017-05-17 17:52     ` Stefan Wahren
2017-05-24 11:55       ` Fabio Estevam
2017-05-24 14:49         ` Stefan Wahren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.