rust-embedded/rust-sysfs-gpio

Sysfs interface for GPIO is now deprecated

samdolt opened this issue ยท 5 comments

And it will be removed in 2020.

See https://www.kernel.org/doc/Documentation/ABI/obsolete/sysfs-gpio
And the new https://www.kernel.org/doc/Documentation/ABI/testing/gpio-cdev

You can also see this talk from the last Embedded Linux Conference Europe (posted yesterday by the Linux Foundation):

https://www.youtube.com/watch?v=cdTLewJCL1Y&list=PLbzoR-pLrL6pISWAq-1cXP4_UZAyRtesk&index=56

Thanks for the heads up @samdolt, I believe we should be able to select the appropriate one at runtime, but this will require a bit more investigation into the specifics of how gpio-cdev works. Dropping sysfs support altogether will probably not be wise for some time (as plenty of systems still run kernels older than 4.4).

I found https://www.youtube.com/watch?v=76j3TIqTPTI&feature=youtu.be to be pretty helpful in understanding the new gpio interface.

Thanks @marshallpierce. I've started a bit of development (not pushed yet). Staging for that work will be at https://github.com/posborne/rust-gpio-cdev

gpio-cdev exists now so I will go ahead and close this.