forked from luck/tmp_suning_uos_patched
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: b868db94a6
("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>
This commit is contained in:
parent
567cbf07ca
commit
18fadd6abd
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user