demuxing irqs
Anton Vorontsov
avorontsov at ru.mvista.com
Tue Sep 16 22:17:40 EST 2008
Hi Jon,
On Sun, Sep 14, 2008 at 11:06:23PM -0400, Jon Smirl wrote:
> I have demultiplexing the GPIO interrupts working well enough to make
> my hardware work. But now I've discovered that these interrupts can't
> do what I need.
>
> Anton, Grant - are either of you interested in this code? It's not
> finished but the main ideas are in place.
I think there is a small issue that ruins the whole approach.. :-/
> --- a/arch/powerpc/include/asm/gpio.h
> +++ b/arch/powerpc/include/asm/gpio.h
> @@ -38,17 +38,14 @@ static inline int gpio_cansleep(unsigned int gpio)
> return __gpio_cansleep(gpio);
> }
>
> -/*
> - * Not implemented, yet.
> - */
> -static inline int gpio_to_irq(unsigned int gpio)
> +static inline unsigned int gpio_to_irq(unsigned int gpio)
> {
> - return -ENOSYS;
> + return gpio;
"GPIO 0" is valid gpio, but "IRQ 0" isn't valid virq. So you
can't do 1:1 mapping. :-(
--
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2
More information about the Linuxppc-dev
mailing list