aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2019-02-17 22:23:16 -0500
committerLinus Walleij <linus.walleij@linaro.org>2019-02-21 07:19:52 -0500
commit18fadd6abd5aeb2ddd6c20eb6a6045e377bb9f94 (patch)
tree38e4347d39b7f65bc550dcf543cb759d2cb86e46
parent567cbf07caf2083a413f7ddf07970b04cc3b38da (diff)
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>
-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,
93 /* Direction cannot be changed, validate is an output */ 93 /* Direction cannot be changed, validate is an output */
94 if (BIT(offset) & TQMX86_DIR_INPUT_MASK) 94 if (BIT(offset) & TQMX86_DIR_INPUT_MASK)
95 return -EINVAL; 95 return -EINVAL;
96 else 96
97 return 0; 97 tqmx86_gpio_set(chip, offset, value);
98 return 0;
98} 99}
99 100
100static int tqmx86_gpio_get_direction(struct gpio_chip *chip, 101static int tqmx86_gpio_get_direction(struct gpio_chip *chip,