From: troy.kisky@boundarydevices.com (Troy Kisky)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: imx5: start numbering pad from 0
Date: Tue, 14 Aug 2012 11:09:58 -0700 [thread overview]
Message-ID: <502A9476.1040500@boundarydevices.com> (raw)
In-Reply-To: <CAP1dx+wm=Lj6WXWTiRk3JfqAomr8_mfjZpmToht2bb4paEYXjQ@mail.gmail.com>
On 8/14/2012 12:30 AM, Dong Aisheng wrote:
> On 14 August 2012 03:26, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>> On 8/13/2012 7:47 AM, Shawn Guo wrote:
>>> Unlike imx6q pinctrl driver that starts nubmering pad from 0, imx5
>>> pinctrl drivers number pad from 1. It causes problem/confusion when
>>> driver accesses imx51_pinctrl_pads array using pin ID as the index.
>>>
>>> Change imx51_pads and imx53_pads numbering start from 0.
>>>
>>> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
>>> ---
>>> drivers/pinctrl/pinctrl-imx51.c | 490
>>> +++++++++++++++++++-------------------
>>> drivers/pinctrl/pinctrl-imx53.c | 402 ++++++++++++++++----------------
>>> 2 files changed, 446 insertions(+), 446 deletions(-)
>>>
>>> diff --git a/drivers/pinctrl/pinctrl-imx51.c
>>> b/drivers/pinctrl/pinctrl-imx51.c
>>> index 9fd0216..fb84689 100644
>>> --- a/drivers/pinctrl/pinctrl-imx51.c
>>> +++ b/drivers/pinctrl/pinctrl-imx51.c
>>> @@ -23,251 +23,251 @@
>>> #include "pinctrl-imx.h"
>>> enum imx51_pads {
>>> - MX51_PAD_EIM_D16 = 1,
>>> - MX51_PAD_EIM_D17 = 2,
> ...
>>> + MX53_PAD_GPIO_19 = 0,
>>> + MX53_PAD_KEY_COL0 = 1,
>>
>> Why not skip the = xx altogether?? The enum will auto-increment.
> Personally i'd like to keep it.
> The reason is that pin id is basic property of a pin per pinctrl
> subsystem's design
> so explicitly define it looks more clear to me and i'm not sure but
> it's possible that
> the pin id may be used in device tree in the future(maybe some other
> soc already uses it),
> And defining it has no big harming.
>
> Regards
> Dong Aisheng
> .
>
Then maybe #defines should be used, so that device tree can include this
file and be run through C pre-processor?
Thanks
Troy
next prev parent reply other threads:[~2012-08-14 18:09 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 14:47 [PATCH] pinctrl: imx5: start numbering pad from 0 Shawn Guo
2012-08-13 15:12 ` Matt Sealey
2012-08-14 7:20 ` Dong Aisheng
2012-08-14 19:37 ` Matt Sealey
2012-08-15 3:59 ` Dong Aisheng
2012-08-15 5:44 ` Uwe Kleine-König
2012-08-15 5:44 ` Uwe Kleine-König
2012-08-15 6:55 ` Dong Aisheng
2012-08-15 6:55 ` Dong Aisheng
2012-08-15 7:51 ` Uwe Kleine-König
2012-08-15 7:51 ` Uwe Kleine-König
2012-08-15 9:25 ` Dong Aisheng
2012-08-15 9:25 ` Dong Aisheng
2012-08-15 10:33 ` Dong Aisheng
2012-08-15 10:33 ` Dong Aisheng
2012-08-15 13:59 ` Shawn Guo
2012-08-15 13:59 ` Shawn Guo
2012-08-15 15:31 ` Shawn Guo
2012-08-15 15:31 ` Shawn Guo
2012-08-15 16:49 ` Matt Sealey
2012-08-15 16:49 ` Matt Sealey
2012-08-16 3:45 ` Shawn Guo
2012-08-16 3:45 ` Shawn Guo
2012-08-16 17:39 ` Matt Sealey
2012-08-16 17:39 ` Matt Sealey
2012-08-15 15:39 ` Stephen Warren
2012-08-15 15:39 ` Stephen Warren
2012-08-16 3:30 ` Dong Aisheng
2012-08-16 3:30 ` Dong Aisheng
2012-08-16 18:51 ` Matt Sealey
2012-08-16 18:51 ` Matt Sealey
2012-08-16 21:12 ` Stephen Warren
2012-08-16 21:12 ` Stephen Warren
2012-08-21 12:52 ` Linus Walleij
2012-08-21 12:52 ` Linus Walleij
2012-08-21 12:46 ` Linus Walleij
2012-08-21 12:46 ` Linus Walleij
2012-08-13 19:26 ` Troy Kisky
2012-08-14 7:30 ` Dong Aisheng
2012-08-14 18:09 ` Troy Kisky [this message]
2012-08-15 4:00 ` Dong Aisheng
2012-08-14 8:13 ` Linus Walleij
2012-08-14 8:22 ` Shawn Guo
2012-08-14 9:48 ` Linus Walleij
2012-08-14 9:50 ` Linus Walleij
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=502A9476.1040500@boundarydevices.com \
--to=troy.kisky@boundarydevices.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.