Menu

#150 /sys/class/gpio pin numbers may need to be offset

New
nobody
None
High
Patch
2017-02-23
2017-02-23
No

Upstream kernel doesn't force the gpiochip to have a 0 base as raspbian kernel does. To handle this case, look for the /sys/class/gpio/gpiochipXXX/label that matches the pinctrl-bcm2835 driver. Then add the base value if this chip to the pin number for export / unexport and friends.

With this, GPIO interrupts are working with upstream kernels.

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.