diff mbox series

[1/2] gpio: Document proper return value for gpio drivers

Message ID 20200428172322.1.I396f351e364f3c09df7c7606e79abefb8682c092@changeid
State New
Headers show
Series [1/2] gpio: Document proper return value for gpio drivers | expand

Commit Message

Doug Anderson April 29, 2020, 12:23 a.m. UTC
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>
---

 include/linux/gpio/driver.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Linus Walleij April 29, 2020, 12:16 p.m. UTC | #1
On Wed, Apr 29, 2020 at 2:24 AM Douglas Anderson <dianders@chromium.org> wrote:

> 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>

Patch applied! Sorry for the historical confusion.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index b8fc92c177eb..7b5f5681b7e4 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -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