diff mbox series

[2/2] Documentation: gpio: correct return value of gpiod_get_direction

Message ID 20180109113554.4337-2-wsa@the-dreams.de
State New
Headers show
Series [1/2] gpio: correct docs about return value of gpiod_get_direction | expand

Commit Message

Wolfram Sang Jan. 9, 2018, 11:35 a.m. UTC
From: Wolfram Sang <wsa+renesas@sang-engineering.com>

The use of the GPIOF_* flags is deprecated, so don't advertise them
here. Document the plain numbers for now until we have a better
solution.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 Documentation/gpio/consumer.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij Jan. 9, 2018, 2:36 p.m. UTC | #1
On Tue, Jan 9, 2018 at 12:35 PM, Wolfram Sang <wsa@the-dreams.de> wrote:

> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> The use of the GPIOF_* flags is deprecated, so don't advertise them
> here. Document the plain numbers for now until we have a better
> solution.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt
index 63e1bd1d88e324..7aac3308151016 100644
--- a/Documentation/gpio/consumer.txt
+++ b/Documentation/gpio/consumer.txt
@@ -184,7 +184,7 @@  A driver can also query the current direction of a GPIO:
 
 	int gpiod_get_direction(const struct gpio_desc *desc)
 
-This function will return either GPIOF_DIR_IN or GPIOF_DIR_OUT.
+This function returns 0 for output, 1 for input, or an error code in case of error.
 
 Be aware that there is no default direction for GPIOs. Therefore, **using a GPIO
 without setting its direction first is illegal and will result in undefined