From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] gpio/mxc: specify gpio base for device tree probe
Date: Mon, 6 Aug 2012 16:12:31 +0200 [thread overview]
Message-ID: <20120806141231.GA9329@pengutronix.de> (raw)
In-Reply-To: <1344146488-9496-2-git-send-email-shawn.guo@linaro.org>
On Sun, Aug 05, 2012 at 02:01:26PM +0800, Shawn Guo wrote:
> Currently, unlike the non-DT probe where the gpio base is specified
> with pdev->id, the DT probe uses the base dynamically allocated by
> gpio core, which uses a completely different numbering scheme. This
> causes two issues to user space applications which access sysfs entry
> /sys/class/gpio/gpioN.
>
> * It breaks the compatibility with user space applications between
> non-DT and DT kernels.
>
> * It's not intuitive and sometimes hard for users to map the Linux
> gpio number to the actual hardware pin.
>
> Use alias to identify the gpio port/bank, and then the gpio base
> can be specified with port id to solve above issues. If alias is not
> defined in device tree, the base number dynamically allocated by gpio
> core will be used.
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
I applied patches 1, 2 and 4 to my imx35 dt tree and they work like a
charm.
Tested-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
for these three.
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2012-08-06 14:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-05 6:01 [PATCH 1/4] gpio/mxc: remove redundant shadow variables initialization Shawn Guo
2012-08-05 6:01 ` [PATCH 2/4] gpio/mxc: specify gpio base for device tree probe Shawn Guo
2012-08-05 9:47 ` Linus Walleij
2012-08-06 14:12 ` Uwe Kleine-König [this message]
2012-08-05 6:01 ` [PATCH 3/4] gpio/mxs: " Shawn Guo
2012-08-05 9:48 ` Linus Walleij
2012-08-06 13:51 ` Shawn Guo
2012-08-07 6:56 ` Linus Walleij
2012-08-05 6:01 ` [PATCH 4/4] ARM: dts: imx: add alias for gpio Shawn Guo
2012-08-05 9:49 ` Linus Walleij
2012-08-05 9:45 ` [PATCH 1/4] gpio/mxc: remove redundant shadow variables initialization Linus Walleij
2012-08-06 11:38 ` Dirk Behme
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=20120806141231.GA9329@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).