Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Linus Walleij
18fadd6a 567cbf07

+3 -2
+3 -2
drivers/gpio/gpio-tqmx86.c
··· 93 93 /* Direction cannot be changed, validate is an output */ 94 94 if (BIT(offset) & TQMX86_DIR_INPUT_MASK) 95 95 return -EINVAL; 96 - else 97 - return 0; 96 + 97 + tqmx86_gpio_set(chip, offset, value); 98 + return 0; 98 99 } 99 100 100 101 static int tqmx86_gpio_get_direction(struct gpio_chip *chip,