All of lore.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Lars Poeschel <poeschel@lemonage.de>
Cc: linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Linus Walleij <linus.walleij@linaro.org>,
	Tony Lindgren <tony@atomide.com>,
	Kevin Hilman <khilman@linaro.org>
Subject: Re: How to use gpio-omap as interrupt-controller
Date: Thu, 8 Aug 2013 11:28:57 -0400	[thread overview]
Message-ID: <5203B939.9050702@ti.com> (raw)
In-Reply-To: <201308081723.27051.poeschel@lemonage.de>

On Thursday 08 August 2013 11:23 AM, Lars Poeschel wrote:
> Hi!
> 
> I have a device-tree-booting omap board that uses gpio-omap as gpio driver. 
> Kernel version is 3.11.0-rc4. I have connected a device that signals 
> interrupts to a gpio pin of the omap. The driver for this device fails in 
> request_threaded_irq.
> The irq framework tries to setup the irq in __setup_irq which calls 
> gpio_irq_type in gpio-omap.c. This function checks if bank->mod_usage is 
> set and because it is not, the function fails. Looking at where bank-
>> mod_usage is set, I see it is only set in omap_gpio_request.
> This means I have to request at least one random gpio to be able to set the 
> type of the irq of another pin on this bank ?
> How do I correctly use the gpio-omap gpio driver in my case ?
> The board is booting using device tree and does not request a gpio prior to 
> requesting the irq on this gpio bank. I really do not want to request a 
> gpio. They should stay as they are.
> Or does this mean the driver of the connected device is wrong and instead 
> it has to request some random gpio before ?
> 
> An example of such a connected device is gpio-adnp by the way.
> The device tree part looks like this:
> 
> 		gpioext: gpio-adnp@41 {
> 			compatible = "ad,gpio-adnp";
> 			reg = <0x41>;
> 
> 			interrupt-parent = <&gpio>;
> 			interrupts = <160 1>;
> 
> 			gpio-controller;
> 			#gpio-cells = <1>;
> 
> 			interrupt-controller;
> 			#interrupt-cells = <2>;
> 
> 			nr-gpios = <64>;
> 		};
> 
You hit the issue which we tried to address but ended
up reverting the patches. refer [1], [2] for more
information. For now, its broken unfortunately.
Regards,
Santosh


[1] http://www.mail-archive.com/linux-omap@vger.kernel.org/msg91405.html
[2] https://lkml.org/lkml/2013/7/29/280

      reply	other threads:[~2013-08-08 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08 15:23 How to use gpio-omap as interrupt-controller Lars Poeschel
2013-08-08 15:28 ` Santosh Shilimkar [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=5203B939.9050702@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=javier.martinez@collabora.co.uk \
    --cc=khilman@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=poeschel@lemonage.de \
    --cc=tony@atomide.com \
    /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.