diff mbox

[RFT] gpio: ath79: Fix the logic to clear offset bit of AR71XX_GPIO_REG_OE register

Message ID 1449586867.5555.1.camel@ingics.com
State New
Headers show

Commit Message

Axel Lin Dec. 8, 2015, 3:01 p.m. UTC
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/gpio/gpio-ath79.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alban Dec. 9, 2015, 10:19 a.m. UTC | #1
On Tue, 08 Dec 2015 23:01:07 +0800
Axel Lin <axel.lin@ingics.com> wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Acked-by: Alban Bedel <albeu@free.fr>

> ---
>  drivers/gpio/gpio-ath79.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
> index e5827a5..5eaea8b 100644
> --- a/drivers/gpio/gpio-ath79.c
> +++ b/drivers/gpio/gpio-ath79.c
> @@ -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);
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Dec. 11, 2015, 6:13 p.m. UTC | #2
On Tue, Dec 8, 2015 at 4:01 PM, Axel Lin <axel.lin@ingics.com> wrote:

> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Patch applied for fixes with Alban's ACK.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
index e5827a5..5eaea8b 100644
--- a/drivers/gpio/gpio-ath79.c
+++ b/drivers/gpio/gpio-ath79.c
@@ -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);