From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Ludovic Desroches <ludovic.desroches@atmel.com>,
linus.walleij@linaro.org
Cc: alexandre.belloni@free-electrons.com,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: at91-pio4: fix pull-up/down logic
Date: Tue, 19 Apr 2016 17:15:53 +0200 [thread overview]
Message-ID: <57164BA9.3040907@atmel.com> (raw)
In-Reply-To: <1461074628-20224-1-git-send-email-ludovic.desroches@atmel.com>
Le 19/04/2016 16:03, Ludovic Desroches a écrit :
> The default configuration of a pin is often with a value in the
> pull-up/down field at chip reset. So, even if the internal logic of the
> controller prevents writing a configuration with pull-up and pull-down at
> the same time, we must ensure explicitly this condition before writing the
> register.
>
> This was leading to a pull-down condition not taken into account for
> instance.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller")
> Cc: stable@vger.kernel.org #v4.4 and later
Yes, and I can add:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
and more important:
On a sama5d2 Xplained board:
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks, bye.
> ---
> drivers/pinctrl/pinctrl-at91-pio4.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index 629b6fe..75093d7 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -722,9 +722,11 @@ static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev,
> break;
> case PIN_CONFIG_BIAS_PULL_UP:
> conf |= ATMEL_PIO_PUEN_MASK;
> + conf &= (~ATMEL_PIO_PDEN_MASK);
> break;
> case PIN_CONFIG_BIAS_PULL_DOWN:
> conf |= ATMEL_PIO_PDEN_MASK;
> + conf &= (~ATMEL_PIO_PUEN_MASK);
> break;
> case PIN_CONFIG_DRIVE_OPEN_DRAIN:
> if (arg == 0)
>
--
Nicolas Ferre
--
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
WARNING: multiple messages have this Message-ID (diff)
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: at91-pio4: fix pull-up/down logic
Date: Tue, 19 Apr 2016 17:15:53 +0200 [thread overview]
Message-ID: <57164BA9.3040907@atmel.com> (raw)
In-Reply-To: <1461074628-20224-1-git-send-email-ludovic.desroches@atmel.com>
Le 19/04/2016 16:03, Ludovic Desroches a ?crit :
> The default configuration of a pin is often with a value in the
> pull-up/down field at chip reset. So, even if the internal logic of the
> controller prevents writing a configuration with pull-up and pull-down at
> the same time, we must ensure explicitly this condition before writing the
> register.
>
> This was leading to a pull-down condition not taken into account for
> instance.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller")
> Cc: stable at vger.kernel.org #v4.4 and later
Yes, and I can add:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
and more important:
On a sama5d2 Xplained board:
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks, bye.
> ---
> drivers/pinctrl/pinctrl-at91-pio4.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index 629b6fe..75093d7 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -722,9 +722,11 @@ static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev,
> break;
> case PIN_CONFIG_BIAS_PULL_UP:
> conf |= ATMEL_PIO_PUEN_MASK;
> + conf &= (~ATMEL_PIO_PDEN_MASK);
> break;
> case PIN_CONFIG_BIAS_PULL_DOWN:
> conf |= ATMEL_PIO_PDEN_MASK;
> + conf &= (~ATMEL_PIO_PUEN_MASK);
> break;
> case PIN_CONFIG_DRIVE_OPEN_DRAIN:
> if (arg == 0)
>
--
Nicolas Ferre
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Ludovic Desroches <ludovic.desroches@atmel.com>,
<linus.walleij@linaro.org>
Cc: <alexandre.belloni@free-electrons.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: at91-pio4: fix pull-up/down logic
Date: Tue, 19 Apr 2016 17:15:53 +0200 [thread overview]
Message-ID: <57164BA9.3040907@atmel.com> (raw)
In-Reply-To: <1461074628-20224-1-git-send-email-ludovic.desroches@atmel.com>
Le 19/04/2016 16:03, Ludovic Desroches a écrit :
> The default configuration of a pin is often with a value in the
> pull-up/down field at chip reset. So, even if the internal logic of the
> controller prevents writing a configuration with pull-up and pull-down at
> the same time, we must ensure explicitly this condition before writing the
> register.
>
> This was leading to a pull-down condition not taken into account for
> instance.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller")
> Cc: stable@vger.kernel.org #v4.4 and later
Yes, and I can add:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
and more important:
On a sama5d2 Xplained board:
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks, bye.
> ---
> drivers/pinctrl/pinctrl-at91-pio4.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index 629b6fe..75093d7 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -722,9 +722,11 @@ static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev,
> break;
> case PIN_CONFIG_BIAS_PULL_UP:
> conf |= ATMEL_PIO_PUEN_MASK;
> + conf &= (~ATMEL_PIO_PDEN_MASK);
> break;
> case PIN_CONFIG_BIAS_PULL_DOWN:
> conf |= ATMEL_PIO_PDEN_MASK;
> + conf &= (~ATMEL_PIO_PUEN_MASK);
> break;
> case PIN_CONFIG_DRIVE_OPEN_DRAIN:
> if (arg == 0)
>
--
Nicolas Ferre
next prev parent reply other threads:[~2016-04-19 15:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 14:03 [PATCH] pinctrl: at91-pio4: fix pull-up/down logic Ludovic Desroches
2016-04-19 14:03 ` Ludovic Desroches
2016-04-19 14:03 ` Ludovic Desroches
2016-04-19 14:37 ` Alexandre Belloni
2016-04-19 14:37 ` Alexandre Belloni
2016-04-19 15:15 ` Nicolas Ferre [this message]
2016-04-19 15:15 ` Nicolas Ferre
2016-04-19 15:15 ` Nicolas Ferre
2016-04-29 9:17 ` Linus Walleij
2016-04-29 9:17 ` 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=57164BA9.3040907@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.