summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2016-02-15 20:09:14 +0800
committerLinus Walleij <linus.walleij@linaro.org>2016-02-16 15:56:51 +0100
commitce02d18fc1292eded6b935e73e897d39ae8e3ff4 (patch)
tree961a02283f40c199d9579ca271a1bd28b991c2e3
parent143b65d677a59764e438d457bf2510b3fa5b90f8 (diff)
downloadlinux-ce02d18fc1292eded6b935e73e897d39ae8e3ff4.tar.gz
linux-ce02d18fc1292eded6b935e73e897d39ae8e3ff4.tar.bz2
linux-ce02d18fc1292eded6b935e73e897d39ae8e3ff4.zip
gpio: tpic2810: Make tpic2810_direction_output set proper output level
The .direction_output callback should set proper output level. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpio-tpic2810.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-tpic2810.c b/drivers/gpio/gpio-tpic2810.c
index 032d058c0d28..9f020aa4b067 100644
--- a/drivers/gpio/gpio-tpic2810.c
+++ b/drivers/gpio/gpio-tpic2810.c
@@ -33,6 +33,8 @@ struct tpic2810 {
struct mutex lock;
};
+static void tpic2810_set(struct gpio_chip *chip, unsigned offset, int value);
+
static int tpic2810_get_direction(struct gpio_chip *chip,
unsigned offset)
{
@@ -51,6 +53,7 @@ static int tpic2810_direction_output(struct gpio_chip *chip,
unsigned offset, int value)
{
/* This device always output */
+ tpic2810_set(chip, offset, value);
return 0;
}