Sysfs interface for GPIO controller
On successful gpiochip_add()
, a directory entry with a path such as /sys/class/gpio/gpiochipX/
will be created, where X
is the GPIO controller base (the controller providing GPIOs starting at #X
), with the following attributes:
base
, whose value is the same asX
, and which corresponds togpio_chip.base
(if assigned statically) and is the first GPIO managed by this chip.label
, which is provided for diagnostics (not always unique).ngpio
, which tells how many GPIOs this controller provides (N to N + ngpio - 1
). This is the same as defined ingpio_chip.ngpios
.
All of the preceding attributes are read-only.