lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5411CD5B.4080705@atmel.com>
Date:	Thu, 11 Sep 2014 18:27:07 +0200
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
	Linus Walleij <linus.walleij@...aro.org>
CC:	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, Wenyou Yang <wenyou.yang@...el.com>
Subject: Re: [PATCH] pinctrl: at91: disable Pull-Down or Pull-Up property
 before enabling Pull-Up or Pull-Down.

On 11/09/2014 16:40, Alexandre Belloni :
> From: Wenyou Yang <wenyou.yang@...el.com>
> 
> Because the pin's Pull-Up and Pull-Down property is mutually exclusive.
> 
> Signed-off-by: Wenyou Yang <wenyou.yang@...el.com>

Yes, indeed:

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

> ---
>  drivers/pinctrl/pinctrl-at91.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index a3d8902438c7..ee9c0b7aad14 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -371,6 +371,9 @@ static unsigned at91_mux_get_pullup(void __iomem *pio, unsigned pin)
>  
>  static void at91_mux_set_pullup(void __iomem *pio, unsigned mask, bool on)
>  {
> +	if (on)
> +		writel_relaxed(mask, pio + PIO_PPDDR);
> +
>  	writel_relaxed(mask, pio + (on ? PIO_PUER : PIO_PUDR));
>  }
>  
> @@ -499,6 +502,9 @@ static bool at91_mux_pio3_get_pulldown(void __iomem *pio, unsigned pin)
>  
>  static void at91_mux_pio3_set_pulldown(void __iomem *pio, unsigned mask, bool is_on)
>  {
> +	if (is_on)
> +		__raw_writel(mask, pio + PIO_PUDR);
> +
>  	__raw_writel(mask, pio + (is_on ? PIO_PPDER : PIO_PPDDR));
>  }
>  
> 


-- 
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ