diff options
author | Kent Gibson <warthog618@gmail.com> | 2024-02-13 22:12:22 +0800 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-02-14 10:34:08 +0100 |
commit | e3f927f2b0a23902923c768f07e274a1373216f3 (patch) | |
tree | b7b94c319eeddc7270192c6c88b7dd8234ff5295 /Documentation/driver-api/gpio | |
parent | 9e69d6d84e3841df073601440774a2221781fc1e (diff) | |
download | linux-stable-e3f927f2b0a23902923c768f07e274a1373216f3.tar.gz linux-stable-e3f927f2b0a23902923c768f07e274a1373216f3.tar.bz2 linux-stable-e3f927f2b0a23902923c768f07e274a1373216f3.zip |
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 <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
[Bartosz: tweaked the commit subject to use imperative mood]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'Documentation/driver-api/gpio')
-rw-r--r-- | Documentation/driver-api/gpio/consumer.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/driver-api/gpio/consumer.rst b/Documentation/driver-api/gpio/consumer.rst index 3e588b9d678c..ab56ab0dd7a6 100644 --- a/Documentation/driver-api/gpio/consumer.rst +++ b/Documentation/driver-api/gpio/consumer.rst @@ -222,9 +222,9 @@ Use the following calls to access GPIOs from an atomic context:: int gpiod_get_value(const struct gpio_desc *desc); void gpiod_set_value(struct gpio_desc *desc, int value); -The values are boolean, zero for low, nonzero for high. When reading the value -of an output pin, the value returned should be what's seen on the pin. That -won't always match the specified output value, because of issues including +The values are boolean, zero for inactive, nonzero for active. When reading the +value of an output pin, the value returned should be what's seen on the pin. +That won't always match the specified output value, because of issues including open-drain signaling and output latencies. 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 care. (For details read about open drain in driver.rst.) With this, all the gpiod_set_(array)_value_xxx() functions interpret the -parameter "value" as "asserted" ("1") or "de-asserted" ("0"). The physical line +parameter "value" as "active" ("1") or "inactive" ("0"). The physical line level will be driven accordingly. As an example, if the active low property for a dedicated GPIO is set, and the -gpiod_set_(array)_value_xxx() passes "asserted" ("1"), the physical line level +gpiod_set_(array)_value_xxx() passes "active" ("1"), the physical line level will be driven low. To summarize:: |