* GPIO IRQ for Meson gxbb
@ 2019-06-03 5:50 Gaurav Pathak
2019-06-08 9:55 ` Martin Blumenstingl
0 siblings, 1 reply; 3+ messages in thread
From: Gaurav Pathak @ 2019-06-03 5:50 UTC (permalink / raw)
To: linux-amlogic
Hello,
I am currently trying to use GPIO IRQ on Odroid-C2 board.
I have compiled a working image having Linux Kernel 5.0.6. It has
Pin-control driver and Interrupt Controller driver enabled.
However, I am not getting any idea as to how should I request IRQ for
a particular GPIO pin say for e.g. GPIOX.10. The "gpio_to_irq()" call
is not working and it is returning "-6".
I just want to write a simple out of tree character driver.
I tried to get an idea from "drivers/gpio/", but they all seems to be
platform driver.
I would be really helpful if anyone can point me to a working gpio IRQ
example for Linux 5.0.6 kernel.
Thanks,
Gaurav Pathak
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GPIO IRQ for Meson gxbb
2019-06-03 5:50 GPIO IRQ for Meson gxbb Gaurav Pathak
@ 2019-06-08 9:55 ` Martin Blumenstingl
0 siblings, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2019-06-08 9:55 UTC (permalink / raw)
To: Gaurav Pathak; +Cc: linux-amlogic, jbrunet
Hello Gaurav,
(+Cc Jerome, because I believe he was the last person working on this)
On Mon, Jun 3, 2019 at 7:51 AM Gaurav Pathak <gauravpathak129@gmail.com> wrote:
>
> Hello,
>
> I am currently trying to use GPIO IRQ on Odroid-C2 board.
> I have compiled a working image having Linux Kernel 5.0.6. It has
> Pin-control driver and Interrupt Controller driver enabled.
> However, I am not getting any idea as to how should I request IRQ for
> a particular GPIO pin say for e.g. GPIOX.10. The "gpio_to_irq()" call
> is not working and it is returning "-6".
GPIO to IRQ is currently not enabled on the Amlogic pin / GPIO
controller. in .dts you need to pass the GPIO interrupt controller as
parent and "know" the interrupt number for the GPIO. an example from
meson-gxbb-odroidc2.dts:
interrupt-parent = <&gpio_intc>;
/* MAC_INTR on GPIOZ_15 */
interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
I am not sure what's left to implement gpio_to_irq though
Martin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
* GPIO IRQ for Meson gxbb
@ 2019-05-31 11:57 Gaurav Pathak
0 siblings, 0 replies; 3+ messages in thread
From: Gaurav Pathak @ 2019-05-31 11:57 UTC (permalink / raw)
To: kernelnewbies
Hello,
I am currently trying to use GPIO IRQ on Odroid-C2 board.
I have compiled a working image having Linux Kernel 5.0.6. It has
Pin-control driver and Interrupt Controller driver enabled.
However, I am not getting any idea as to how should I request IRQ for
a particular GPIO pin say for e.g. GPIOX.10. The "gpio_to_irq()" call
is not working and it is returning "-6".
I don't want to write a platform driver, I just want to write a simple
out of tree character driver.
I tried to get an idea from "drivers/gpio/", but they all seems to be
platform driver.
I would be really helpful if anyone can point me to a working gpio IRQ
example for Linux 5.0.6 kernel.
Thanks,
Gaurav Pathak
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-08 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 5:50 GPIO IRQ for Meson gxbb Gaurav Pathak
2019-06-08 9:55 ` Martin Blumenstingl
-- strict thread matches above, loose matches on Subject: below --
2019-05-31 11:57 Gaurav Pathak
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.