Skip to content

Commit 18fadd6

Browse files
AxelLinlinusw
authored andcommitted
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: b868db9 ("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>
1 parent 567cbf0 commit 18fadd6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpio/gpio-tqmx86.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ static int tqmx86_gpio_direction_output(struct gpio_chip *chip,
9393
/* Direction cannot be changed, validate is an output */
9494
if (BIT(offset) & TQMX86_DIR_INPUT_MASK)
9595
return -EINVAL;
96-
else
97-
return 0;
96+
97+
tqmx86_gpio_set(chip, offset, value);
98+
return 0;
9899
}
99100

100101
static int tqmx86_gpio_get_direction(struct gpio_chip *chip,

0 commit comments

Comments
 (0)