gpio: make gpiod_direction_output take a logical value
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 7 Jan 2014 11:34:11 +0000 (12:34 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 04:19:22 +0000 (13:19 +0900)
commit2ed33c212f4197fdd29b851fc1f7acda0ad09eff
tree3d2b220a2a345652178058c35db6fc4a2756ab4d
parent3f24140ff66ec61af497d4fb6d9bae0d9ebf2aca
gpio: make gpiod_direction_output take a logical value

The documentation was not clear about whether
gpio_direction_output should take a logical value or the physical
level on the output line, i.e. whether the ACTIVE_LOW status
would be taken into account.

This converts gpiod_direction_output to use the logical level
and adds a new gpiod_direction_output_raw for the raw value.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit ef70bbe1aaa612f75360e5df5952fddec50b7ca9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Documentation/gpio/consumer.txt
drivers/gpio/gpiolib.c
include/asm-generic/gpio.h
include/linux/gpio/consumer.h