* Interrupt GPIOs with MPC5200b
@ 2009-03-06 13:27 Dave Best
2009-03-06 15:18 ` Grant Likely
0 siblings, 1 reply; 2+ messages in thread
From: Dave Best @ 2009-03-06 13:27 UTC (permalink / raw)
To: linuxppc-dev
Hi, I am working on a MPC5200B-tiny with 2.6.23.1 Linux (pcm030).
I want to use an interrupt GPIO to act as the source for my ISR, but i can'=
t find the IRQ numbers for the GPIOs so i can't call request_irq() to set m=
y ISR up. =20
For other platforms there seems to be the function gpio_to_irq() where enum=
erated GPIOs get an IRQ number for their request_irq calls.
Any help or hints appreciated.
Dave=0A=0A=0A
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Interrupt GPIOs with MPC5200b
2009-03-06 13:27 Interrupt GPIOs with MPC5200b Dave Best
@ 2009-03-06 15:18 ` Grant Likely
0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2009-03-06 15:18 UTC (permalink / raw)
To: arieswar24b; +Cc: linuxppc-dev
On Fri, Mar 6, 2009 at 6:27 AM, Dave Best <arieswar24b@yahoo.de> wrote:
>
> Hi, I am working on a MPC5200B-tiny with 2.6.23.1 Linux (pcm030).
>
> I want to use an interrupt GPIO to act as the source for my ISR, but i can't find the IRQ numbers for the GPIOs so i can't call request_irq() to set my ISR up.
>
> For other platforms there seems to be the function gpio_to_irq() where enumerated GPIOs get an IRQ number for their request_irq calls.
Which GPIO line are you using? Is it on the gpio_simple block?
gpio_wkup? or one of the GPT lines?
There is support in Ben Herrenschmidt's -next tree to use the GPT as
an interrupt controller. A similar patch for the mpc52xx_gpio driver
would be fairly easy to do. That would allow you to simply specify
the GPIO controller as the interrupt controller in the device tree and
get your IRQ number with a single call to of_irq_parse_and_map(). It
also allows each GPIO line to be assigned an independent IRQ number
and be enabled/acked independently from the others and for the
enable/ack code to live with the mpc52xx-gpio driver where it belongs.
See here for the GPT patch. You can use it as an example to do the
same for the gpio driver.
http://patchwork.ozlabs.org/patch/21914/
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-06 15:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 13:27 Interrupt GPIOs with MPC5200b Dave Best
2009-03-06 15:18 ` Grant Likely
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).