gpio: uapi: clarify default_values being logical

The documentation for default_values mentions high/low which can be
confusing, particularly when the ACTIVE_LOW flag is set.

Replace high/low with active/inactive to clarify that the values are
logical not physical.

Similarly, clarify the interpretation of values in struct gpiohandle_data.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
Kent Gibson 2024-02-11 18:14:21 +08:00 committed by Bartosz Golaszewski
parent be91c19e47
commit 8ff0d55ba3

View File

@ -399,8 +399,8 @@ struct gpioline_info_changed {
* a batch of input or output lines, but they must all have the same * a batch of input or output lines, but they must all have the same
* characteristics, i.e. all inputs or all outputs, all active low etc * characteristics, i.e. all inputs or all outputs, all active low etc
* @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested
* line, this specifies the default output value, should be 0 (low) or * line, this specifies the default output value, should be 0 (inactive) or
* 1 (high), anything else than 0 or 1 will be interpreted as 1 (high) * 1 (active). Anything other than 0 or 1 will be interpreted as active.
* @consumer_label: a desired consumer label for the selected GPIO line(s) * @consumer_label: a desired consumer label for the selected GPIO line(s)
* such as "my-bitbanged-relay" * such as "my-bitbanged-relay"
* @lines: number of lines requested in this request, i.e. the number of * @lines: number of lines requested in this request, i.e. the number of
@ -426,8 +426,8 @@ struct gpiohandle_request {
* %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
* together * together
* @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags, * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags,
* this specifies the default output value, should be 0 (low) or * this specifies the default output value, should be 0 (inactive) or
* 1 (high), anything else than 0 or 1 will be interpreted as 1 (high) * 1 (active). Anything other than 0 or 1 will be interpreted as active.
* @padding: reserved for future use and should be zero filled * @padding: reserved for future use and should be zero filled
* *
* Note: This struct is part of ABI v1 and is deprecated. * Note: This struct is part of ABI v1 and is deprecated.
@ -443,7 +443,8 @@ struct gpiohandle_config {
* struct gpiohandle_data - Information of values on a GPIO handle * struct gpiohandle_data - Information of values on a GPIO handle
* @values: when getting the state of lines this contains the current * @values: when getting the state of lines this contains the current
* state of a line, when setting the state of lines these should contain * state of a line, when setting the state of lines these should contain
* the desired target state * the desired target state. States are 0 (inactive) or 1 (active).
* When setting, anything other than 0 or 1 will be interpreted as active.
* *
* Note: This struct is part of ABI v1 and is deprecated. * Note: This struct is part of ABI v1 and is deprecated.
* Use ABI v2 and &struct gpio_v2_line_values instead. * Use ABI v2 and &struct gpio_v2_line_values instead.