GPIO interface uses deprecated GPIO sysfs interface and should use the GPIO character device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
High
|
Samuele Pedroni |
Bug Description
The snapd builtin gpio interface provides access to the GPIO sysfs Interface for userspace at sys/class/gpio/gpio
The GPIO sysfs interface has however been deprecated since version 4.8 of the kernel and the snapd GPIO interface should provide access to /sys/bus/gpiochipN (or /dev/gpiochipN) as well.
Reference:
1) https:/
"Warning
THIS ABI IS DEPRECATED, THE ABI DOCUMENTATION HAS BEEN MOVED TO Documentation/
2)https:/
"This ABI is deprecated and will be removed after 2020. It is
replaced with the GPIO character device."
3) https:/
The descriptor-based interface is the preferred way to manipulate GPIOs, and is described by all the files in this directory excepted gpio-legacy.txt.
The legacy integer-based interface which is considered deprecated (but still usable for compatibility reasons) is documented in gpio-legacy.txt.
4) https:/
sysfs GPIO
User-mode GPIO (General Purpose Input/Output) has historically been performed via the legacy “integer-
# echo out > /sys/class/
# echo 1 > /sys/class/
GPIO access via this legacy sysfs interface has been deprecated since version 4.8 of the Linux kernel.
chardev GPIO
The new way of doing GPIO is via the “descriptor-based” character device ABI (Application Binary Interface). The interface is exposed at /dev/gpiochipN or /sys/bus/gpiochipN where N is the chip number.
description: | updated |
Changed in snapd: | |
assignee: | nobody → Samuele Pedroni (pedronis) |
Changed in snapd: | |
status: | New → Confirmed |
importance: | Undecided → High |