All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bindings: update imx and mxs #gpio-cells
@ 2012-06-28  3:15 ` Shawn Guo
  0 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2012-06-28  3:15 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Hui Wang, Marc Kleine-Budde

The of_get_named_gpio_flags can retrieve the second cell of
gpio-specifier as the "flags".  The imx and mxs gpio driver do not
have their own .xlate callback, which means of_gpio_simple_xlate is
used and it's a 1:1 mapping between gpio controller flags and Linux
"enum of_gpio_flags".

Update imx and mxs bindings document to make it clear.

Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 .../devicetree/bindings/gpio/fsl-imx-gpio.txt      |    5 +++--
 .../devicetree/bindings/gpio/gpio-mxs.txt          |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
index 4363ae4..5f360e7 100644
--- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
@@ -8,8 +8,9 @@ Required properties:
   by low 16 pins and the second one is for high 16 pins.
 - gpio-controller : Marks the device node as a gpio controller.
 - #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify the gpio polarity:
+      0 = active high
+      1 = active low
 
 Example:
 
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
index 0c35673..1e677a4 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
@@ -13,8 +13,9 @@ Required properties for GPIO node:
 - interrupts : Should be the port interrupt shared by all 32 pins.
 - gpio-controller : Marks the device node as a gpio controller.
 - #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify the gpio polarity:
+      0 = active high
+      1 = active low
 - interrupt-controller: Marks the device node as an interrupt controller.
 - #interrupt-cells : Should be 2.  The first cell is the GPIO number.
   The second cell bits[3:0] is used to specify trigger type and level flags:
-- 
1.7.5.4

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

* [PATCH] bindings: update imx and mxs #gpio-cells
@ 2012-06-28  3:15 ` Shawn Guo
  0 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2012-06-28  3:15 UTC (permalink / raw)
  To: linux-arm-kernel

The of_get_named_gpio_flags can retrieve the second cell of
gpio-specifier as the "flags".  The imx and mxs gpio driver do not
have their own .xlate callback, which means of_gpio_simple_xlate is
used and it's a 1:1 mapping between gpio controller flags and Linux
"enum of_gpio_flags".

Update imx and mxs bindings document to make it clear.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 .../devicetree/bindings/gpio/fsl-imx-gpio.txt      |    5 +++--
 .../devicetree/bindings/gpio/gpio-mxs.txt          |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
index 4363ae4..5f360e7 100644
--- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
@@ -8,8 +8,9 @@ Required properties:
   by low 16 pins and the second one is for high 16 pins.
 - gpio-controller : Marks the device node as a gpio controller.
 - #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify the gpio polarity:
+      0 = active high
+      1 = active low
 
 Example:
 
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
index 0c35673..1e677a4 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
@@ -13,8 +13,9 @@ Required properties for GPIO node:
 - interrupts : Should be the port interrupt shared by all 32 pins.
 - gpio-controller : Marks the device node as a gpio controller.
 - #gpio-cells : Should be two.  The first cell is the pin number and
-  the second cell is used to specify optional parameters (currently
-  unused).
+  the second cell is used to specify the gpio polarity:
+      0 = active high
+      1 = active low
 - interrupt-controller: Marks the device node as an interrupt controller.
 - #interrupt-cells : Should be 2.  The first cell is the GPIO number.
   The second cell bits[3:0] is used to specify trigger type and level flags:
-- 
1.7.5.4

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

* Re: [PATCH] bindings: update imx and mxs #gpio-cells
  2012-06-28  3:15 ` Shawn Guo
@ 2012-06-28  6:07   ` Hui Wang
  -1 siblings, 0 replies; 6+ messages in thread
From: Hui Wang @ 2012-06-28  6:07 UTC (permalink / raw)
  To: Shawn Guo
  Cc: devicetree-discuss, Hui Wang, Marc Kleine-Budde, linux-arm-kernel

Shawn Guo wrote:
> The of_get_named_gpio_flags can retrieve the second cell of
> gpio-specifier as the "flags".  The imx and mxs gpio driver do not
> have their own .xlate callback, which means of_gpio_simple_xlate is
> used and it's a 1:1 mapping between gpio controller flags and Linux
> "enum of_gpio_flags".
>
> Update imx and mxs bindings document to make it clear.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  .../devicetree/bindings/gpio/fsl-imx-gpio.txt      |    5 +++--
>  .../devicetree/bindings/gpio/gpio-mxs.txt          |    5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> index 4363ae4..5f360e7 100644
> --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> @@ -8,8 +8,9 @@ Required properties:
>    by low 16 pins and the second one is for high 16 pins.
>  - gpio-controller : Marks the device node as a gpio controller.
>  - #gpio-cells : Should be two.  The first cell is the pin number and
> -  the second cell is used to specify optional parameters (currently
> -  unused).
> +  the second cell is used to specify the gpio polarity:
> +      0 = active high
> +      1 = active low
>   
Agree with this design, looks good to me.

Regards,
Hui.
>  
>  Example:
>  
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
> index 0c35673..1e677a4 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
> +++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
> @@ -13,8 +13,9 @@ Required properties for GPIO node:
>  - interrupts : Should be the port interrupt shared by all 32 pins.
>  - gpio-controller : Marks the device node as a gpio controller.
>  - #gpio-cells : Should be two.  The first cell is the pin number and
> -  the second cell is used to specify optional parameters (currently
> -  unused).
> +  the second cell is used to specify the gpio polarity:
> +      0 = active high
> +      1 = active low
>  - interrupt-controller: Marks the device node as an interrupt controller.
>  - #interrupt-cells : Should be 2.  The first cell is the GPIO number.
>    The second cell bits[3:0] is used to specify trigger type and level flags:
>   

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

* [PATCH] bindings: update imx and mxs #gpio-cells
@ 2012-06-28  6:07   ` Hui Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Hui Wang @ 2012-06-28  6:07 UTC (permalink / raw)
  To: linux-arm-kernel

Shawn Guo wrote:
> The of_get_named_gpio_flags can retrieve the second cell of
> gpio-specifier as the "flags".  The imx and mxs gpio driver do not
> have their own .xlate callback, which means of_gpio_simple_xlate is
> used and it's a 1:1 mapping between gpio controller flags and Linux
> "enum of_gpio_flags".
>
> Update imx and mxs bindings document to make it clear.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  .../devicetree/bindings/gpio/fsl-imx-gpio.txt      |    5 +++--
>  .../devicetree/bindings/gpio/gpio-mxs.txt          |    5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> index 4363ae4..5f360e7 100644
> --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.txt
> @@ -8,8 +8,9 @@ Required properties:
>    by low 16 pins and the second one is for high 16 pins.
>  - gpio-controller : Marks the device node as a gpio controller.
>  - #gpio-cells : Should be two.  The first cell is the pin number and
> -  the second cell is used to specify optional parameters (currently
> -  unused).
> +  the second cell is used to specify the gpio polarity:
> +      0 = active high
> +      1 = active low
>   
Agree with this design, looks good to me.

Regards,
Hui.
>  
>  Example:
>  
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
> index 0c35673..1e677a4 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
> +++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.txt
> @@ -13,8 +13,9 @@ Required properties for GPIO node:
>  - interrupts : Should be the port interrupt shared by all 32 pins.
>  - gpio-controller : Marks the device node as a gpio controller.
>  - #gpio-cells : Should be two.  The first cell is the pin number and
> -  the second cell is used to specify optional parameters (currently
> -  unused).
> +  the second cell is used to specify the gpio polarity:
> +      0 = active high
> +      1 = active low
>  - interrupt-controller: Marks the device node as an interrupt controller.
>  - #interrupt-cells : Should be 2.  The first cell is the GPIO number.
>    The second cell bits[3:0] is used to specify trigger type and level flags:
>   

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

* Re: [PATCH] bindings: update imx and mxs #gpio-cells
  2012-06-28  3:15 ` Shawn Guo
@ 2012-07-06 11:57     ` Shawn Guo
  -1 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2012-07-06 11:57 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Hui Wang, Marc Kleine-Budde

On Thu, Jun 28, 2012 at 11:15:37AM +0800, Shawn Guo wrote:
> The of_get_named_gpio_flags can retrieve the second cell of
> gpio-specifier as the "flags".  The imx and mxs gpio driver do not
> have their own .xlate callback, which means of_gpio_simple_xlate is
> used and it's a 1:1 mapping between gpio controller flags and Linux
> "enum of_gpio_flags".
> 
> Update imx and mxs bindings document to make it clear.
> 
> Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Queued on imx/dt tree.

Regards,
Shawn

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

* [PATCH] bindings: update imx and mxs #gpio-cells
@ 2012-07-06 11:57     ` Shawn Guo
  0 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2012-07-06 11:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jun 28, 2012 at 11:15:37AM +0800, Shawn Guo wrote:
> The of_get_named_gpio_flags can retrieve the second cell of
> gpio-specifier as the "flags".  The imx and mxs gpio driver do not
> have their own .xlate callback, which means of_gpio_simple_xlate is
> used and it's a 1:1 mapping between gpio controller flags and Linux
> "enum of_gpio_flags".
> 
> Update imx and mxs bindings document to make it clear.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Queued on imx/dt tree.

Regards,
Shawn

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

end of thread, other threads:[~2012-07-06 11:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-28  3:15 [PATCH] bindings: update imx and mxs #gpio-cells Shawn Guo
2012-06-28  3:15 ` Shawn Guo
2012-06-28  6:07 ` Hui Wang
2012-06-28  6:07   ` Hui Wang
     [not found] ` <1340853337-4406-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-07-06 11:57   ` Shawn Guo
2012-07-06 11:57     ` Shawn Guo

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.