help gpio irq mainline kernel

Post Reply
bas25
Posts: 15
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 2 times
Contact:

help gpio irq mainline kernel

Post by bas25 »

hi all,
for some time now, i try to use irq gpio with no success and can't find any informations about that.
All works great with hardkernel 4.9.xx, but not with a fresh install with linux 5.8 tobetter image (N2).

For exemple, i want to detect irq on GPIOX.16 (pin number 12).
to use libgpiod we should use number 81 :
cat /sys/kernel/debug/pinctrl/ff634400.bus\:pinctrl@40-pinctrl-meson/pins |grep X.16
but gpiomon 0 81 return gpiomon: error waiting for events: No such device

to use sysfs interface we should use number 508 :
cat /sys/kernel/debug/gpio |grep 12
but after exporting this pin (echo 508 > /sys/class/gpio/export) there is no edge file.

i think gpios are not associated with gpio-irq but don't understand how to configure/use irq_meson_gpio.
It's a bit annoying, i will appreciated any help.

brad
Posts: 1380
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 120 times
Been thanked: 181 times
Contact:

Re: help gpio irq mainline kernel

Post by brad »

It appears support is missing in the driver to config the GPIO using edge interrupt (see for some info - https://freenode.irclog.whitequark.org/ ... 2019-02-06)

As an alternative it might be possible to configure and setup the the pin in the device-tree at boot as mentioned in the link above. I think there might be only 8 gpio irq's available on the N2 to map to pins.

bas25
Posts: 15
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: help gpio irq mainline kernel

Post by bas25 »

thx brad,
i will try to understand how to configure this in the device tree.

brad
Posts: 1380
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 120 times
Been thanked: 181 times
Contact:

Re: help gpio irq mainline kernel

Post by brad »

bas25 wrote:
Sat Sep 19, 2020 9:32 pm
thx brad,
i will try to understand how to configure this in the device tree.
I will try to look at it further myself also, I need to work with GPIO's for a project.

Might also need to ask in the linux-amlogic irc channel about it as apparently most of the code is there for irq support in the driver but a decision needs to be made by maintainers on how to manage the available IRQ's

0n3man
Posts: 19
Joined: Sat Jan 17, 2015 8:34 am
languages_spoken: english
ODROIDs: U3 & C1
Has thanked: 0
Been thanked: 0
Contact:

Re: help gpio irq mainline kernel

Post by 0n3man »

Any chance there is an update on this? I loaded an XU board I had sitting around with armbian and got gpiomon and python library working. Then I got in the N2+ that I really want to use on this project and I get the "No such device" error with gpiomon on latest armbian with kernel 5.10.16-meson64. Will look at the suggestion mentioned above but am hoping someone has come up with the optimal fix. Thanks
'

brad
Posts: 1380
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 120 times
Been thanked: 181 times
Contact:

Re: help gpio irq mainline kernel

Post by brad »

0n3man wrote:
Tue Feb 23, 2021 10:17 am
Any chance there is an update on this? I loaded an XU board I had sitting around with armbian and got gpiomon and python library working. Then I got in the N2+ that I really want to use on this project and I get the "No such device" error with gpiomon on latest armbian with kernel 5.10.16-meson64. Will look at the suggestion mentioned above but am hoping someone has come up with the optimal fix. Thanks
'
I am still interested in this myself, I need to find some time to check status in mainline kernel.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests