public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Boris BREZILLON <b.brezillon@overkiz.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: at91: fix get_pullup/down function return
Date: Tue, 27 Aug 2013 16:56:56 +0200	[thread overview]
Message-ID: <521CBE38.4090202@atmel.com> (raw)
In-Reply-To: <1377609561-22054-1-git-send-email-b.brezillon@overkiz.com>

On 27/08/2013 15:19, Boris BREZILLON :
> In PIO_PUSR and PIO_PPDSR register if a given bit is set 1 this means the
> pullup/down for this pin (pin is represented as a bit position) is
> disabled.
>
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>

Indeed.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

and even:
Cc: stable <stable@vger.kernel.org> # 3.8+

Thanks for fixing this Boris.

> ---
>   drivers/pinctrl/pinctrl-at91.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index b90a3a0..19afb9a 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -325,7 +325,7 @@ static void at91_mux_disable_interrupt(void __iomem *pio, unsigned mask)
>
>   static unsigned at91_mux_get_pullup(void __iomem *pio, unsigned pin)
>   {
> -	return (readl_relaxed(pio + PIO_PUSR) >> pin) & 0x1;
> +	return !((readl_relaxed(pio + PIO_PUSR) >> pin) & 0x1);
>   }
>
>   static void at91_mux_set_pullup(void __iomem *pio, unsigned mask, bool on)
> @@ -445,7 +445,7 @@ static void at91_mux_pio3_set_debounce(void __iomem *pio, unsigned mask,
>
>   static bool at91_mux_pio3_get_pulldown(void __iomem *pio, unsigned pin)
>   {
> -	return (__raw_readl(pio + PIO_PPDSR) >> pin) & 0x1;
> +	return !((__raw_readl(pio + PIO_PPDSR) >> pin) & 0x1);
>   }
>
>   static void at91_mux_pio3_set_pulldown(void __iomem *pio, unsigned mask, bool is_on)
>


-- 
Nicolas Ferre

  reply	other threads:[~2013-08-27 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 13:19 [PATCH] pinctrl: at91: fix get_pullup/down function return Boris BREZILLON
2013-08-27 14:56 ` Nicolas Ferre [this message]
2013-08-28 19:22 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=521CBE38.4090202@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=b.brezillon@overkiz.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=swarren@wwwdotorg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox