rust-embedded / rust-sysfs-gpio

A Rust Interface to the Linux sysfs GPIO interface (https://www.kernel.org/doc/Documentation/gpio/sysfs.txt)
Apache License 2.0
383 stars 45 forks source link

Sysfs interface for GPIO is now deprecated #38

Closed samdolt closed 3 years ago

samdolt commented 6 years ago

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

posborne commented 6 years ago

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).

posborne commented 6 years ago

For reference, http://elixir.free-electrons.com/linux/v4.9.59/source/include/uapi/linux/gpio.h

marshallpierce commented 6 years ago

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

posborne commented 6 years ago

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

eldruin commented 3 years ago

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