linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: Document proper return value for gpio drivers
@ 2020-04-29  0:23 Douglas Anderson
  2020-04-29  0:23 ` [PATCH 2/2] gpio: Make "offset" and "unsigned int", not just "unsigned" Douglas Anderson
  2020-04-29 12:16 ` [PATCH 1/2] gpio: Document proper return value for gpio drivers Linus Walleij
  0 siblings, 2 replies; 10+ messages in thread
From: Douglas Anderson @ 2020-04-29  0:23 UTC (permalink / raw)
  To: linus.walleij
  Cc: Douglas Anderson, Bartosz Golaszewski, linux-gpio, linux-kernel

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

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
-- 
2.26.2.303.gf8c07b1a785-goog


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-05-12 21:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  0:23 [PATCH 1/2] gpio: Document proper return value for gpio drivers Douglas Anderson
2020-04-29  0:23 ` [PATCH 2/2] gpio: Make "offset" and "unsigned int", not just "unsigned" Douglas Anderson
2020-04-29  0:38   ` Joe Perches
2020-04-29  0:50     ` Doug Anderson
2020-04-29  0:57       ` Joe Perches
2020-04-29  1:04         ` Doug Anderson
2020-04-29  2:32           ` Joe Perches
2020-05-12 21:09     ` Andy Shevchenko
2020-04-29 12:19   ` Linus Walleij
2020-04-29 12:16 ` [PATCH 1/2] gpio: Document proper return value for gpio drivers Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).