^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/class/gpio/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Date: July 2008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) KernelVersion: 2.6.27
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Contact: Linus Walleij <linusw@kernel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) As a Kconfig option, individual GPIO signals may be accessed from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) userspace. GPIOs are only made available to userspace by an explicit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) "export" operation. If a given GPIO is not claimed for use by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) kernel code, it may be exported by userspace (and unexported later).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) Kernel code may export it for complete or partial access.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) GPIOs are identified as they are inside the kernel, using integers in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) the range 0..INT_MAX. See Documentation/admin-guide/gpio for more information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) /sys/class/gpio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /export ... asks the kernel to export a GPIO to userspace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) /unexport ... to return a GPIO to the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) /gpioN ... for each exported GPIO #N OR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) /<LINE-NAME> ... for a properly named GPIO line
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) /value ... always readable, writes fail for input GPIOs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) /direction ... r/w as: in, out (default low); write: high, low
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) /edge ... r/w as: none, falling, rising, both
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) /gpiochipN ... for each gpiochip; #N is its first GPIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) /base ... (r/o) same as N
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) /label ... (r/o) descriptive, not necessarily unique
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) /ngpio ... (r/o) number of GPIOs; numbered N to N + (ngpio - 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) This ABI is deprecated and will be removed after 2020. It is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) replaced with the GPIO character device.