From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: i.MX27: gpio device tree problems.
Date: Wed, 18 Jul 2012 16:00:22 +0200 [thread overview]
Message-ID: <20120718140022.GI30009@pengutronix.de> (raw)
In-Reply-To: <CACKLOr3TQXHekBM76LBL0AczUQrYTDxm6z5YWSdrbu5ug6EpTg@mail.gmail.com>
On Wed, Jul 18, 2012 at 03:03:41PM +0200, javier Martin wrote:
> Hi,
> we are trying to port our Visstrim SM10 [1] to device tree and we've
> found some problems related to gpios in the process:
>
> 1.- IRQs don't work properly since the value of 'pdev->id' when using
> device tree is -1, so 'irq_set_chained_handler()' never gets called
> [2]
This should work since:
33a4e98 gpio/mxc: make irqs work for fsl,imx21-gpio devices
> 2.- When using device tree GPIO numbers are allocated dynamically
> using gpiolib [3]. This leads to different GPIO numbers being used
> compared to the version without device tree. Since GPIOs are exposed
> to the user space by gpilib using sysfs this breaks compatibility with
> current user applications.
>
> Here is an example:
>
> Version without device tree:
> gpiochip_add: registered GPIOs 0 to 31 on device: imx21-gpio.0
> gpiochip_add: registered GPIOs 32 to 63 on device: imx21-gpio.1
> gpiochip_add: registered GPIOs 64 to 95 on device: imx21-gpio.2
> gpiochip_add: registered GPIOs 96 to 127 on device: imx21-gpio.3
> gpiochip_add: registered GPIOs 128 to 159 on device: imx21-gpio.4
> gpiochip_add: registered GPIOs 160 to 191 on device: imx21-gpio.5
>
> Version with device tree:
> gpiochip_add: registered GPIOs 224 to 255 on device: 10015000.gpio
> gpiochip_add: registered GPIOs 192 to 223 on device: 10015100.gpio
> gpiochip_add: registered GPIOs 160 to 191 on device: 10015200.gpio
> gpiochip_add: registered GPIOs 128 to 159 on device: 10015300.gpio
> gpiochip_add: registered GPIOs 96 to 127 on device: 10015400.gpio
> gpiochip_add: registered GPIOs 64 to 95 on device: 10015500.gpio
Known problem, I have no idea how to solve this.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2012-07-18 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 13:03 i.MX27: gpio device tree problems javier Martin
2012-07-18 14:00 ` Sascha Hauer [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=20120718140022.GI30009@pengutronix.de \
--to=s.hauer@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).