162306a36Sopenharmony_ciWhat: /sys/class/gpio/ 262306a36Sopenharmony_ciDate: July 2008 362306a36Sopenharmony_ciKernelVersion: 2.6.27 462306a36Sopenharmony_ciContact: Linus Walleij <linusw@kernel.org> 562306a36Sopenharmony_ciDescription: 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci As a Kconfig option, individual GPIO signals may be accessed from 862306a36Sopenharmony_ci userspace. GPIOs are only made available to userspace by an explicit 962306a36Sopenharmony_ci "export" operation. If a given GPIO is not claimed for use by 1062306a36Sopenharmony_ci kernel code, it may be exported by userspace (and unexported later). 1162306a36Sopenharmony_ci Kernel code may export it for complete or partial access. 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci GPIOs are identified as they are inside the kernel, using integers in 1462306a36Sopenharmony_ci the range 0..INT_MAX. See Documentation/admin-guide/gpio for more information. 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci :: 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci /sys/class/gpio 1962306a36Sopenharmony_ci /export ... asks the kernel to export a GPIO to userspace 2062306a36Sopenharmony_ci /unexport ... to return a GPIO to the kernel 2162306a36Sopenharmony_ci /gpioN ... for each exported GPIO #N OR 2262306a36Sopenharmony_ci /<LINE-NAME> ... for a properly named GPIO line 2362306a36Sopenharmony_ci /value ... always readable, writes fail for input GPIOs 2462306a36Sopenharmony_ci /direction ... r/w as: in, out (default low); write: high, low 2562306a36Sopenharmony_ci /edge ... r/w as: none, falling, rising, both 2662306a36Sopenharmony_ci /gpiochipN ... for each gpiochip; #N is its first GPIO 2762306a36Sopenharmony_ci /base ... (r/o) same as N 2862306a36Sopenharmony_ci /label ... (r/o) descriptive, not necessarily unique 2962306a36Sopenharmony_ci /ngpio ... (r/o) number of GPIOs; numbered N to N + (ngpio - 1) 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci This ABI is deprecated and will be removed after 2020. It is 3262306a36Sopenharmony_ci replaced with the GPIO character device. 33