gpio: Document proper return value for gpio drivers
authorDouglas Anderson <dianders@chromium.org>
Wed, 29 Apr 2020 00:23:27 +0000 (17:23 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Apr 2020 12:15:25 +0000 (14:15 +0200)
The legacy defines GPIOF_DIR_XXX are only for consumers. Document the
proper ones.  Also: don't use "_XXX" since that's harder to find with
"git grep".  Just list both of the values.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200428172322.1.I396f351e364f3c09df7c7606e79abefb8682c092@changeid
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
include/linux/gpio/driver.h

index b8fc92c177eba2e8f8a108dc3836765c76d5a5e0..7b5f5681b7e40a2699c4906502f0c0f2033e64e7 100644 (file)
@@ -267,9 +267,9 @@ struct gpio_irq_chip {
  * @free: optional hook for chip-specific deactivation, such as
  *     disabling module power and clock; may sleep
  * @get_direction: returns direction for signal "offset", 0=out, 1=in,
- *     (same as GPIOF_DIR_XXX), or negative error.
- *     It is recommended to always implement this function, even on
- *     input-only or output-only gpio chips.
+ *     (same as GPIO_LINE_DIRECTION_OUT / GPIO_LINE_DIRECTION_IN),
+ *     or negative error. It is recommended to always implement this
+ *     function, even on input-only or output-only gpio chips.
  * @direction_input: configures signal "offset" as input, or returns error
  *     This can be omitted on input-only or output-only gpio chips.
  * @direction_output: configures signal "offset" as output, or returns error