• Home
  • Raw
  • Download

Lines Matching +full:gpio +full:- +full:always +full:- +full:on

1 GPIO Sysfs Interface for Userspace
6 been moved to Documentation/ABI/obsolete/sysfs-gpio.
16 ----------------------
19 debugfs interface, since it provides control over GPIO direction and
20 value instead of just showing a gpio state summary. Plus, it could be
21 present on production systems without debugging support.
24 know for example that GPIO #23 controls the write protect line used to
26 may need to temporarily remove that protection, first importing a GPIO,
27 then changing its output state, then updating the code before re-enabling
28 the write protection. In normal use, GPIO #23 would never be touched,
31 Again depending on appropriate hardware documentation, on some systems
32 userspace GPIO can be used to determine system configuration data that
34 GPIO drivers could be all that the system really needs.
38 Please read Documentation/driver-api/gpio/drivers-on-gpio.rst
44 --------------
45 There are three kinds of entries in /sys/class/gpio:
47 - Control interfaces used to get userspace control over GPIOs;
49 - GPIOs themselves; and
51 - GPIO controllers ("gpio_chip" instances).
55 The control interfaces are write-only:
57 /sys/class/gpio/
61 a GPIO to userspace by writing its number to this file.
64 for GPIO #19, if that's not requested by kernel code.
72 GPIO signals have paths like /sys/class/gpio/gpio42/ (for GPIO #42)
75 /sys/class/gpio/gpioN/
82 configure the GPIO as an output with that initial value.
85 doesn't support changing the direction of a GPIO, or
87 allow userspace to reconfigure this GPIO's direction.
90 reads as either 0 (inactive) or 1 (active). If the GPIO
94 If the pin can be configured as interrupt-generating interrupt
96 description of "edge"), you can poll(2) on that file and
103 re-open it to read the value.
108 that will make poll(2) on the "value" file return.
121 GPIO controllers have paths like /sys/class/gpio/gpiochip42/ (for the
123 read-only attributes:
125 /sys/class/gpio/gpiochipN/
128 same as N, the first GPIO managed by this chip
131 provided for diagnostics (not always unique)
134 how many GPIOs this manages (N to N + ngpio - 1)
137 what purposes. However, those numbers are not always stable; GPIOs on
138 a daughtercard might be different depending on the base board being used,
141 the correct GPIO number to use for a given signal.
145 --------------------------
149 /* export the GPIO to userspace */
155 /* create a sysfs link to an exported GPIO node */
159 After a kernel driver requests a GPIO, it may only be made available in
165 of experiments easier), or can provide an always-there interface that's
168 After the GPIO has been exported, gpiod_export_link() allows creating
169 symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can