]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: mvebu: correctly set the value in direction_output()
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 23 Oct 2012 08:17:05 +0000 (10:17 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 24 Oct 2012 05:36:35 +0000 (07:36 +0200)
commit9f4c0f89ab4c904f9a4a2bb1798a4c5c8490d6d1
tree97c7726908fda2e1b3f3b6e2bc4d1478a28ad35d
parentc25355e0c2cdfa1075b49c8fbb40232284816d09
gpio: mvebu: correctly set the value in direction_output()

The ->direction_output() operation of gpio_chip is supposed to set the
direction to output but also to set the GPIO to an initial
value. Unfortunately, this last part was not done until now, causing
for example the LEDs to not be properly set to their default initial
value. This patch fixes this by calling the mvebu_gpio_set() function
from mvebu_gpio_direction_output() before configuring the GPIO as an
output GPIO.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mvebu.c