Skip to content

Commit e3f927f

Browse files
warthog618Bartosz Golaszewski
authored andcommitted
Documentation: gpio: consistently use logical line value terminology
Consistently use active/inactive to describe logical line values, rather than high/low, which is used for physical values, or asserted/de-asserted which is awkward. Signed-off-by: Kent Gibson <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Linus Walleij <[email protected]> [Bartosz: tweaked the commit subject to use imperative mood] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 9e69d6d commit e3f927f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Documentation/driver-api/gpio/consumer.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ Use the following calls to access GPIOs from an atomic context::
222222
int gpiod_get_value(const struct gpio_desc *desc);
223223
void gpiod_set_value(struct gpio_desc *desc, int value);
224224

225-
The values are boolean, zero for low, nonzero for high. When reading the value
226-
of an output pin, the value returned should be what's seen on the pin. That
227-
won't always match the specified output value, because of issues including
225+
The values are boolean, zero for inactive, nonzero for active. When reading the
226+
value of an output pin, the value returned should be what's seen on the pin.
227+
That won't always match the specified output value, because of issues including
228228
open-drain signaling and output latencies.
229229

230230
The get/set calls do not return errors because "invalid GPIO" should have been
@@ -277,11 +277,11 @@ switch their output to a high impedance value. The consumer should not need to
277277
care. (For details read about open drain in driver.rst.)
278278

279279
With this, all the gpiod_set_(array)_value_xxx() functions interpret the
280-
parameter "value" as "asserted" ("1") or "de-asserted" ("0"). The physical line
280+
parameter "value" as "active" ("1") or "inactive" ("0"). The physical line
281281
level will be driven accordingly.
282282

283283
As an example, if the active low property for a dedicated GPIO is set, and the
284-
gpiod_set_(array)_value_xxx() passes "asserted" ("1"), the physical line level
284+
gpiod_set_(array)_value_xxx() passes "active" ("1"), the physical line level
285285
will be driven low.
286286

287287
To summarize::

0 commit comments

Comments
 (0)