aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2019-02-18 11:23:16 +0800
committerLinus Walleij <linus.walleij@linaro.org>2019-02-21 13:19:52 +0100
commit18fadd6abd5aeb2ddd6c20eb6a6045e377bb9f94 (patch)
tree38e4347d39b7f65bc550dcf543cb759d2cb86e46 /drivers/gpio
parentgpio: sprd: Change to use SoC compatible string (diff)
downloadlinux-dev-18fadd6abd5aeb2ddd6c20eb6a6045e377bb9f94.tar.xz
linux-dev-18fadd6abd5aeb2ddd6c20eb6a6045e377bb9f94.zip
gpio: tqmx86: Set proper output level for direction_output
For output-only gpios, direction_output should set proper output level. Signed-off-by: Axel Lin <axel.lin@ingics.com> Fixes: b868db94a6a7 ("gpio: tqmx86: Add GPIO from for this IO controller") Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-tqmx86.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-tqmx86.c b/drivers/gpio/gpio-tqmx86.c
index 33dbe483f92f..d5880db7f9d4 100644
--- a/drivers/gpio/gpio-tqmx86.c
+++ b/drivers/gpio/gpio-tqmx86.c
@@ -93,8 +93,9 @@ static int tqmx86_gpio_direction_output(struct gpio_chip *chip,
/* Direction cannot be changed, validate is an output */
if (BIT(offset) & TQMX86_DIR_INPUT_MASK)
return -EINVAL;
- else
- return 0;
+
+ tqmx86_gpio_set(chip, offset, value);
+ return 0;
}
static int tqmx86_gpio_get_direction(struct gpio_chip *chip,