All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>,
	grant.likely@secretlab.ca,
	Fabio Estevam <fabio.estevam@freescale.com>,
	linux-doc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	kernel@pengutronix.de
Subject: Re: [PATCH 1/4] dt: fsl-imx-esdhc.txt: Fix gpio number assignment
Date: Mon, 11 Jun 2012 09:25:42 -0500	[thread overview]
Message-ID: <4FD5FFE6.5030508@gmail.com> (raw)
In-Reply-To: <20120611065011.GN30400@pengutronix.de>

On 06/11/2012 01:50 AM, Sascha Hauer wrote:
> On Sun, Jun 10, 2012 at 11:11:13PM -0500, Rob Herring wrote:
>> On 06/10/2012 09:03 PM, Fabio Estevam wrote:
>>> On Sun, Jun 10, 2012 at 8:11 PM, Rob Herring <robherring2@gmail.com> wrote:
>>>> On 06/10/2012 12:24 PM, Fabio Estevam wrote:
>>>>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>>>>
>>>>> Fix gpio number assignment, so that it can match the number stated in the comment.
>>>>>
>>>>> Cc:
>>>>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>>>>> ---
>>>>>  .../devicetree/bindings/mmc/fsl-imx-esdhc.txt      |    4 ++--
>>>>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
>>>>> index c7e404b..fea541e 100644
>>>>> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
>>>>> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
>>>>> @@ -29,6 +29,6 @@ esdhc@70008000 {
>>>>>       compatible = "fsl,imx51-esdhc";
>>>>>       reg = <0x70008000 0x4000>;
>>>>>       interrupts = <2>;
>>>>> -     cd-gpios = <&gpio0 6 0>; /* GPIO1_6 */
>>>>> -     wp-gpios = <&gpio0 5 0>; /* GPIO1_5 */
>>>>> +     cd-gpios = <&gpio1 6 0>; /* GPIO1_6 */
>>>>> +     wp-gpios = <&gpio1 5 0>; /* GPIO1_5 */
>>>>
>>>> Are you sure all these aren't just DT is 0 based and the chip is 1 based
>>>> numbering?
>>>
>>> We start counting gpio number from 0 in i.mx, so the DT number and the
>>> GPIO number should match.
>>
>> I'm talking about bank numbers, not gpio numbers:
>>
>> /* There's a off-by-one betweem the gpio bank number and the gpiochip */
>> /* range e.g. GPIO_1_5 is gpio 5 under linux */
>> #define IMX_GPIO_NR(bank, nr)		(((bank) - 1) * 32 + (nr))
> 
> Traditionally I started counting at 0 no matter what the datasheet told.
> Now we go to match the numbering with the datasheets, which of course
> can be confusing while transitioning this.
> Fabios patch is correct, there is no gpio0 in the devicetree.
> 

Okay, applied.

Rob

      parent reply	other threads:[~2012-06-11 14:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-10 17:24 [PATCH 1/4] dt: fsl-imx-esdhc.txt: Fix gpio number assignment Fabio Estevam
2012-06-10 17:24 ` [PATCH 2/4] dt: fsl-mma8450.tx: Add missing 'reg' description Fabio Estevam
2012-06-10 17:24 ` [PATCH 3/4] dt: fsl-fec.txt: Fix gpio number assignment Fabio Estevam
2012-06-10 17:24 ` [PATCH 4/4] dt: mc13xxx.txt: " Fabio Estevam
2012-06-10 23:11 ` [PATCH 1/4] dt: fsl-imx-esdhc.txt: " Rob Herring
2012-06-11  2:03   ` Fabio Estevam
2012-06-11  4:11     ` Rob Herring
2012-06-11  6:50       ` Sascha Hauer
2012-06-11 10:22         ` Fabio Estevam
2012-06-11 14:25         ` Rob Herring [this message]

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=4FD5FFE6.5030508@gmail.com \
    --to=robherring2@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel@pengutronix.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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.