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