gpio: ath79: Fix the logic to clear offset bit of AR71XX_GPIO_REG_OE register
authorAxel Lin <axel.lin@ingics.com>
Tue, 8 Dec 2015 15:01:07 +0000 (23:01 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 11 Dec 2015 18:12:57 +0000 (19:12 +0100)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Alban Bedel <albeu@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-ath79.c

index e5827a5..5eaea8b 100644 (file)
@@ -113,7 +113,7 @@ static int ar934x_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
                __raw_writel(BIT(offset), ctrl->base + AR71XX_GPIO_REG_CLEAR);
 
        __raw_writel(
-               __raw_readl(ctrl->base + AR71XX_GPIO_REG_OE) & BIT(offset),
+               __raw_readl(ctrl->base + AR71XX_GPIO_REG_OE) & ~BIT(offset),
                ctrl->base + AR71XX_GPIO_REG_OE);
 
        spin_unlock_irqrestore(&ctrl->lock, flags);