Skip to content

Commit

Permalink
gpio: tqmx86: Set proper output level for direction_output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Linus Walleij committed Feb 21, 2019
1 parent 567cbf0 commit 18fadd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpio/gpio-tqmx86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 18fadd6

Please sign in to comment.