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