From: <Claudiu.Beznea@microchip.com>
To: <Ryan.Wanner@microchip.com>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
<linus.walleij@linaro.org>, <Ludovic.Desroches@microchip.com>
Cc: <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration
Date: Thu, 18 May 2023 05:40:01 +0000 [thread overview]
Message-ID: <c85c1f09-64c3-c8d4-7e8f-985665d1622e@microchip.com> (raw)
In-Reply-To: <d898c31277f6bce6f7d830edf4332ff605498c7b.1684313910.git.Ryan.Wanner@microchip.com>
On 17.05.2023 14:54, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
>
> Enable push-pull configuration. Remove integer value argument from
> open-drain configuration as it is discarded when pinconf function is
> called from gpiolib.
AFAICT it is still taken into account when passed tough drive-open-drain DT
property but at the moment there are no device trees using this property.
> Add push-pull do debug and get functions.
>
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
> drivers/pinctrl/pinctrl-at91-pio4.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index 2fe40acb6a3e..3c39d62bbc3c 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -762,6 +762,11 @@ static int atmel_conf_pin_config_group_get(struct pinctrl_dev *pctldev,
> return -EINVAL;
> arg = 1;
> break;
> + case PIN_CONFIG_DRIVE_PUSH_PULL:
> + if (res & ATMEL_PIO_OPD_MASK)
> + return -EINVAL;
> + arg = 1;
> + break;
> case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
> if (!(res & ATMEL_PIO_SCHMITT_MASK))
> return -EINVAL;
> @@ -827,10 +832,10 @@ static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev,
> conf &= (~ATMEL_PIO_PUEN_MASK);
> break;
> case PIN_CONFIG_DRIVE_OPEN_DRAIN:
> - if (arg == 0)
> - conf &= (~ATMEL_PIO_OPD_MASK);
> - else
> - conf |= ATMEL_PIO_OPD_MASK;
> + conf |= ATMEL_PIO_OPD_MASK;
> + break;
> + case PIN_CONFIG_DRIVE_PUSH_PULL:
> + conf &= (~ATMEL_PIO_OPD_MASK);
> break;
> case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
> if (arg == 0)
> @@ -948,6 +953,8 @@ static void atmel_conf_pin_config_dbg_show(struct pinctrl_dev *pctldev,
> seq_printf(s, "%s ", "debounce");
> if (conf & ATMEL_PIO_OPD_MASK)
> seq_printf(s, "%s ", "open-drain");
> + if (!(conf & ATMEL_PIO_OPD_MASK))
else would fit better here.
> + seq_printf(s, "%s ", "push-pull");
> if (conf & ATMEL_PIO_SCHMITT_MASK)
> seq_printf(s, "%s ", "schmitt");
> if (atmel_pioctrl->slew_rate_support && (conf & ATMEL_PIO_SR_MASK))
next prev parent reply other threads:[~2023-05-18 5:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 11:54 [PATCH 0/3] AT91 PIO4 push-pull enable Ryan.Wanner
2023-05-17 11:54 ` [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration Ryan.Wanner
2023-05-18 5:40 ` Claudiu.Beznea [this message]
2023-05-18 5:54 ` Claudiu.Beznea
2023-05-22 9:18 ` Nicolas Ferre
2023-05-23 16:27 ` andy.shevchenko
2023-05-24 8:50 ` Linus Walleij
2023-05-17 11:54 ` [PATCH 2/3] dt-bindings: pinctrl: at91-pio4: Add push-pull support Ryan.Wanner
2023-05-17 17:38 ` Conor Dooley
2023-05-17 17:50 ` Conor Dooley
2023-05-22 9:18 ` Nicolas Ferre
2023-05-24 8:50 ` Linus Walleij
2023-05-17 11:54 ` [PATCH 3/3] ARM: dts: at91: Return to boolean properties Ryan.Wanner
2023-05-22 9:22 ` Nicolas Ferre
2023-05-23 5:05 ` Claudiu.Beznea
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=c85c1f09-64c3-c8d4-7e8f-985665d1622e@microchip.com \
--to=claudiu.beznea@microchip.com \
--cc=Ludovic.Desroches@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=Ryan.Wanner@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--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=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).