Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linuxgpio sysfs fallback improvement to deal with shifted GPIO numbering in new kernel version #1751

Open
mcuee opened this issue Apr 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@mcuee
Copy link
Collaborator

mcuee commented Apr 15, 2024

From here.

From @stefanrueger

The AVRDUDE project likes to be backward compatible, and as such is unlikely to remove support for libgpiod v1 or sysfs for that matter.

I think(!) I have read up sufficiently on sysfs and gpiod to hazard a guess that it ought to be possible to try a workaround once AVRDUDE realises that the current config doesn't work with the current kernel. Knowing that some kernels shifted the GPIO numbering from one version to the next, AVRDUDE could try to undo that shift by carefully looking at the config GPIO numbers and the GPIO numbers offered by the kernel.

@mcuee mcuee added the enhancement New feature or request label Apr 15, 2024
@mcuee
Copy link
Collaborator Author

mcuee commented Apr 15, 2024

root@raspberrypi:~# ls -la /sys/class/gpio
total 0
drwxrwxr-x  2 root gpio    0 Apr 13 13:32 .
drwxr-xr-x 65 root root    0 Jan  1  1970 ..
--w--w----  1 root gpio 4096 Apr 13 13:29 export
lrwxrwxrwx  1 root gpio    0 Apr 11 19:17 gpiochip512 -> ../../devices/platform/soc/fe200000.gpio/gpio/gpiochip512
lrwxrwxrwx  1 root gpio    0 Apr 11 19:17 gpiochip570 -> ../../devices/platform/soc/soc:firmware/soc:firmware:gpio/gpio/gpiochip570
--w--w----  1 root gpio 4096 Apr 13 13:29 unexport

Reference for the pin number change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant