diff options
author | Chen-Yu Tsai <wens@csie.org> | 2014-01-16 14:34:23 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-01-20 09:19:17 +0100 |
commit | fa8cf57c923e86a693a85aff1df579245a27cbb3 (patch) | |
tree | c4dcab291b6a1862ac4cce8d9efb3613898f6da7 /drivers/pinctrl | |
parent | fe0ec0ee07208027e3e36a1dc4a653780b4984f2 (diff) | |
download | blackbird-op-linux-fa8cf57c923e86a693a85aff1df579245a27cbb3.tar.gz blackbird-op-linux-fa8cf57c923e86a693a85aff1df579245a27cbb3.zip |
pinctrl: sunxi: Honor GPIO output initial vaules
Some GPIO users, such as fixed-regulator, request GPIO output with
initial value of 1. This was ignored by sunxi driver.
Cc: stable@vger.kernel.org
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-sunxi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index 119d2ddedfe7..6ebf3067bde4 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c @@ -469,12 +469,6 @@ static int sunxi_pinctrl_gpio_get(struct gpio_chip *chip, unsigned offset) return val; } -static int sunxi_pinctrl_gpio_direction_output(struct gpio_chip *chip, - unsigned offset, int value) -{ - return pinctrl_gpio_direction_output(chip->base + offset); -} - static void sunxi_pinctrl_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { @@ -498,6 +492,13 @@ static void sunxi_pinctrl_gpio_set(struct gpio_chip *chip, spin_unlock_irqrestore(&pctl->lock, flags); } +static int sunxi_pinctrl_gpio_direction_output(struct gpio_chip *chip, + unsigned offset, int value) +{ + sunxi_pinctrl_gpio_set(chip, offset, value); + return pinctrl_gpio_direction_output(chip->base + offset); +} + static int sunxi_pinctrl_gpio_of_xlate(struct gpio_chip *gc, const struct of_phandle_args *gpiospec, u32 *flags) |