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.
Unified · Split
| @@ -399,8 +399,8 @@ struct gpioline_info_changed { · 398 unmodified lines | |||
| 399 | * a batch of input or output lines, but they must all have the same | 399 | * a batch of input or output lines, but they must all have the same |
| 400 | * characteristics, i.e. all inputs or all outputs, all active low etc | 400 | * characteristics, i.e. all inputs or all outputs, all active low etc |
| 401 | * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested | 401 | * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested |
| 402 | * line, this specifies the default output value, should be 0 (low) or | 402 | * line, this specifies the default output value, should be 0 (inactive) or |
| 403 | * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high) | 403 | * 1 (active). Anything other than 0 or 1 will be interpreted as active. |
| 404 | * @consumer_label: a desired consumer label for the selected GPIO line(s) | 404 | * @consumer_label: a desired consumer label for the selected GPIO line(s) |
| 405 | * such as "my-bitbanged-relay" | 405 | * such as "my-bitbanged-relay" |
| 406 | * @lines: number of lines requested in this request, i.e. the number of | 406 | * @lines: number of lines requested in this request, i.e. the number of |
| @@ -426,8 +426,8 @@ struct gpiohandle_request { · 19 unmodified lines | |||
| 426 | * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added | 426 | * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added |
| 427 | * together | 427 | * together |
| 428 | * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags, | 428 | * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags, |
| 429 | * this specifies the default output value, should be 0 (low) or | 429 | * this specifies the default output value, should be 0 (inactive) or |
| 430 | * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high) | 430 | * 1 (active). Anything other than 0 or 1 will be interpreted as active. |
| 431 | * @padding: reserved for future use and should be zero filled | 431 | * @padding: reserved for future use and should be zero filled |
| 432 | * | 432 | * |
| 433 | * Note: This struct is part of ABI v1 and is deprecated. | 433 | * Note: This struct is part of ABI v1 and is deprecated. |
| @@ -443,7 +443,8 @@ struct gpiohandle_config { · 9 unmodified lines | |||
| 443 | * struct gpiohandle_data - Information of values on a GPIO handle | 443 | * struct gpiohandle_data - Information of values on a GPIO handle |
| 444 | * @values: when getting the state of lines this contains the current | 444 | * @values: when getting the state of lines this contains the current |
| 445 | * state of a line, when setting the state of lines these should contain | 445 | * state of a line, when setting the state of lines these should contain |
| 446 | * the desired target state | 446 | * the desired target state. States are 0 (inactive) or 1 (active). |
| 447 | * When setting, anything other than 0 or 1 will be interpreted as active. | ||
| 447 | * | 448 | * |
| 448 | * Note: This struct is part of ABI v1 and is deprecated. | 449 | * Note: This struct is part of ABI v1 and is deprecated. |
| 449 | * Use ABI v2 and &struct gpio_v2_line_values instead. | 450 | * Use ABI v2 and &struct gpio_v2_line_values instead. |