All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: <Ryan.Wanner@microchip.com>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
	<alexandre.belloni@bootlin.com>, <claudiu.beznea@microchip.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: Mon, 22 May 2023 11:18:33 +0200	[thread overview]
Message-ID: <ad907a40-3e00-e785-e072-460e955457cf@microchip.com> (raw)
In-Reply-To: <d898c31277f6bce6f7d830edf4332ff605498c7b.1684313910.git.Ryan.Wanner@microchip.com>

On 17/05/2023 at 13: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. Add push-pull do debug and get functions.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>

Looks good to me:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks,
   Nicolas

> ---
>   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))
> +		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))

-- 
Nicolas Ferre


WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: <Ryan.Wanner@microchip.com>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
	<alexandre.belloni@bootlin.com>, <claudiu.beznea@microchip.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: Mon, 22 May 2023 11:18:33 +0200	[thread overview]
Message-ID: <ad907a40-3e00-e785-e072-460e955457cf@microchip.com> (raw)
In-Reply-To: <d898c31277f6bce6f7d830edf4332ff605498c7b.1684313910.git.Ryan.Wanner@microchip.com>

On 17/05/2023 at 13: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. Add push-pull do debug and get functions.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>

Looks good to me:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks,
   Nicolas

> ---
>   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))
> +		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))

-- 
Nicolas Ferre


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-05-22  9:18 UTC|newest]

Thread overview: 30+ 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 ` Ryan.Wanner
2023-05-17 11:54 ` [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration Ryan.Wanner
2023-05-17 11:54   ` Ryan.Wanner
2023-05-18  5:40   ` Claudiu.Beznea
2023-05-18  5:40     ` Claudiu.Beznea
2023-05-18  5:54     ` Claudiu.Beznea
2023-05-18  5:54       ` Claudiu.Beznea
2023-05-22  9:18   ` Nicolas Ferre [this message]
2023-05-22  9:18     ` Nicolas Ferre
2023-05-23 16:27   ` andy.shevchenko
2023-05-23 16:27     ` andy.shevchenko
2023-05-24  8:50   ` Linus Walleij
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 11:54   ` Ryan.Wanner
2023-05-17 17:38   ` Conor Dooley
2023-05-17 17:38     ` Conor Dooley
2023-05-17 17:50     ` Conor Dooley
2023-05-17 17:50       ` Conor Dooley
2023-05-22  9:18   ` Nicolas Ferre
2023-05-22  9:18     ` Nicolas Ferre
2023-05-24  8:50   ` Linus Walleij
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-17 11:54   ` Ryan.Wanner
2023-05-22  9:22   ` Nicolas Ferre
2023-05-22  9:22     ` Nicolas Ferre
2023-05-23  5:05     ` Claudiu.Beznea
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=ad907a40-3e00-e785-e072-460e955457cf@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=Ryan.Wanner@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@microchip.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=ludovic.desroches@microchip.com \
    --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 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.