All of lore.kernel.org
 help / color / mirror / Atom feed
From: jason77.wang@gmail.com (Hui Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] bindings: update imx and mxs #gpio-cells
Date: Thu, 28 Jun 2012 14:07:13 +0800	[thread overview]
Message-ID: <4FEBF491.8040003@gmail.com> (raw)
In-Reply-To: <1340853337-4406-1-git-send-email-shawn.guo@linaro.org>

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:
>   

WARNING: multiple messages have this Message-ID (diff)
From: Hui Wang <jason77.wang@gmail.com>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: devicetree-discuss@lists.ozlabs.org,
	Hui Wang <jason77.wang@gmail.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] bindings: update imx and mxs #gpio-cells
Date: Thu, 28 Jun 2012 14:07:13 +0800	[thread overview]
Message-ID: <4FEBF491.8040003@gmail.com> (raw)
In-Reply-To: <1340853337-4406-1-git-send-email-shawn.guo@linaro.org>

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:
>   

  reply	other threads:[~2012-06-28  6:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-06-28  6:07   ` Hui Wang
2012-07-06 11:57 ` Shawn Guo
2012-07-06 11:57   ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FEBF491.8040003@gmail.com \
    --to=jason77.wang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.