Enhance to not directly access GPIO register #122
|
Hi @jnilo1, I am creating a separated request based upon the discussion in #119. Currently, s40button is directly access GPIO register space with hardcoded GPIO pin. Could we make the following enhancements:
Thanks! |
Replies: 3 comments
|
Hi @hlyi, Done — this is implemented and bench-verified, and will ship in the next release as s40button v2. What changedThe daemon no longer touches GPIO registers at all. It now goes through the kernel GPIO character device (
Why this fixes your G4 button specificallyClaiming the line through the kernel means the On "the same method as the status LED"We kept the spirit rather than the letter: the status LED goes through a kernel driver that owns its pin via the GPIO consumer API, and the button now does the same (kernel owns the line for the lifetime of the daemon's request fd; a second consumer gets a clean Bench-verified on the Lidl gateway: name discovery, claim, idle-state read, line exclusivity, init-script restart. |
|
Shipped — s40button v2 (GPIO cdev, line by DTS name, |
|
@jnilo1 Thanks for the enhancement and releasing it! |
Shipped — s40button v2 (GPIO cdev, line by DTS name,
-poverride) is in v3.10.0, released today. On your G4,s40button -p 14(or"reset-button"at index 14 in yourgpio-line-names) gets the B6 pad-mux applied on claim, as described above.