mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kenneth Johansson <kenneth@southpole.se>
To: linux-kernel@vger.kernel.org
Cc: alek.du@intel.com, david-b@pacbell.net, tglx@linutronix.de
Subject: gpio gpio_to_irq
Date: Mon, 07 Dec 2009 13:11:07 +0100	[thread overview]
Message-ID: <1260187867.16040.35.camel@kenjo-laptop> (raw)

I have a few questions regarding the gpio related to interrupts.

The hardware is a generic gpio block that is located on pci. The pins
themselves can be configured to in/out and generate interrupts.

All in all it looks to be very similar to the langwell gpio. 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/gpio/langwell_gpio.c;h=4baf3d7d0f8e6e4f1f7887625b7f73a62dba1a83;hb=22763c5cf3690a681551162c15d34d935308c8d7


Many gpio drivers use the set_irq_chained_handler() instead of calling
request_irq to get the main gpio interrupt. But doing so on a shared pci
interrupt do not look like a good idea. 

Under what circumstance is set_irq_chained_handler allowed ? 

The next thing is that the drivers then registers a "fake" interrupt
chip to make it possible for the gpio client to call request_irq with
the irq number returned from gpio_to_irq().

While using this interface is neat it do require that the gpio driver
somehow can just take over a few irq numbers from the system. 

How is this supposed to be done?? the langwell driver reads a number
located at BAR1 and simply use that as the first irq number, hu?

others start to allocate from the top and so on. what is the correct way
to do this on a x86 with a gpio device on the pci bus ?? 




             reply	other threads:[~2009-12-07 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 12:11 Kenneth Johansson [this message]
2009-12-08 22:22 ` David Brownell
2009-12-09  4:43   ` Kenneth Johansson

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=1260187867.16040.35.camel@kenjo-laptop \
    --to=kenneth@southpole.se \
    --cc=alek.du@intel.com \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®