sysfs gpio deprecated?

Hi, I’ve started looking at the sysfs gpio interface and saw some notes that it’s considered obsolete and deprecated. I’m looking for a good pointer to the ABI (?) character driver interface for gpio. I’ll probably find one right after posting this. :slight_smile:

In case I’m not using the right terminology, the sysfs interface is where you go to /sys/class/gpio and echo ## > export to get gpio pins exported that you can then interact with?

Thanks,
Fred

The sysfs gpio ABI will be removed from the Linux kernel in 2020. The new ABI uses a character device to represent each gpiochip.

libgpiod started by Bartosz Golaszewski is a good way for userspace code to use the the new ABI:

https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/

Regards,
Drew

For any one else who finds this thread and wants to know more, there is a presentation discussion the new interface and libgpiod at: https://fosdem.org/2018/schedule/event/new_gpio_interface_for_linux/