2023-05-17 12:00:27

by Ryan.Wanner

[permalink] [raw]
Subject: [PATCH 0/3] AT91 PIO4 push-pull enable

From: Ryan Wanner <[email protected]>

This patch set enables push-pull pin configuation for PIO4 IP as well as
updating the DT binding.

Removing the integer argument for open-drain allows the driver to
process drive configuration from gpiolib as the integer argument is
discarded.

Ryan Wanner (3):
pinctrl: at91-pio4: Enable Push-Pull configuration
dt-bindings: pinctrl: at91-pio4: Add push-pull support
ARM: dts: at91: Return to boolean properties

.../bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 3 ++-
arch/arm/boot/dts/at91-kizbox3-hs.dts | 2 +-
arch/arm/boot/dts/at91-kizbox3_common.dtsi | 2 +-
drivers/pinctrl/pinctrl-at91-pio4.c | 15 +++++++++++----
4 files changed, 15 insertions(+), 7 deletions(-)

--
2.39.2



2023-05-17 12:01:19

by Ryan.Wanner

[permalink] [raw]
Subject: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration

From: Ryan Wanner <[email protected]>

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 <[email protected]>
---
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))
--
2.39.2


2023-05-17 12:06:36

by Ryan.Wanner

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: pinctrl: at91-pio4: Add push-pull support

From: Ryan Wanner <[email protected]>

Add generic push-pull support for pio4 driver.

Signed-off-by: Ryan Wanner <[email protected]>
---
.../devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
index e2b861ce16d8..774c3c269c40 100644
--- a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
@@ -37,7 +37,8 @@ right representation of the pin.
Optional properties:
- GENERIC_PINCONFIG: generic pinconfig options to use:
- bias-disable, bias-pull-down, bias-pull-up, drive-open-drain,
- input-schmitt-enable, input-debounce, output-low, output-high.
+ drive-push-pull input-schmitt-enable, input-debounce, output-low,
+ output-high.
- for microchip,sama7g5-pinctrl only:
- slew-rate: 0 - disabled, 1 - enabled (default)
- atmel,drive-strength: 0 or 1 for low drive, 2 for medium drive and 3 for
--
2.39.2


2023-05-17 12:07:12

by Ryan.Wanner

[permalink] [raw]
Subject: [PATCH 3/3] ARM: dts: at91: Return to boolean properties

From: Ryan Wanner <[email protected]>

Returning back to commit 0dc23d1a8e17
("arm: dts: at91: Fix boolean properties with values") as pinctrl driver no
longer expects an integer value and expects a simple boolean property.

Signed-off-by: Ryan Wanner <[email protected]>
---
arch/arm/boot/dts/at91-kizbox3-hs.dts | 2 +-
arch/arm/boot/dts/at91-kizbox3_common.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91-kizbox3-hs.dts b/arch/arm/boot/dts/at91-kizbox3-hs.dts
index 7075df6549e9..fec7269088d1 100644
--- a/arch/arm/boot/dts/at91-kizbox3-hs.dts
+++ b/arch/arm/boot/dts/at91-kizbox3-hs.dts
@@ -225,7 +225,7 @@ pinctrl_pio_zbe_rst: gpio_zbe_rst {
pinctrl_pio_io_reset: gpio_io_reset {
pinmux = <PIN_PB30__GPIO>;
bias-disable;
- drive-open-drain = <1>;
+ drive-open-drain;
output-low;
};
pinctrl_pio_input: gpio_input {
diff --git a/arch/arm/boot/dts/at91-kizbox3_common.dtsi b/arch/arm/boot/dts/at91-kizbox3_common.dtsi
index abe27adfa4d6..465664628419 100644
--- a/arch/arm/boot/dts/at91-kizbox3_common.dtsi
+++ b/arch/arm/boot/dts/at91-kizbox3_common.dtsi
@@ -211,7 +211,7 @@ pinctrl_flx4_default: flx4_i2c6_default {
pinmux = <PIN_PD12__FLEXCOM4_IO0>, //DATA
<PIN_PD13__FLEXCOM4_IO1>; //CLK
bias-disable;
- drive-open-drain = <1>;
+ drive-open-drain;
};

pinctrl_pwm0 {
--
2.39.2


2023-05-17 17:56:49

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: pinctrl: at91-pio4: Add push-pull support

On Wed, May 17, 2023 at 01:54:05PM +0200, [email protected] wrote:
> From: Ryan Wanner <[email protected]>
>
> Add generic push-pull support for pio4 driver.
>
> Signed-off-by: Ryan Wanner <[email protected]>

Reviewed-by: Conor Dooley <[email protected]>

Thanks,
Conor.


Attachments:
(No filename) (318.00 B)
signature.asc (235.00 B)
Download all attachments

2023-05-17 18:14:41

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: pinctrl: at91-pio4: Add push-pull support

On Wed, May 17, 2023 at 06:38:28PM +0100, Conor Dooley wrote:
> On Wed, May 17, 2023 at 01:54:05PM +0200, [email protected] wrote:
> > From: Ryan Wanner <[email protected]>
> >
> > Add generic push-pull support for pio4 driver.
> >
> > Signed-off-by: Ryan Wanner <[email protected]>
>
> Reviewed-by: Conor Dooley <[email protected]>

Whoops, incorrect vim macro, should have been:
Acked-by: Conor Dooley <[email protected]>


Attachments:
(No filename) (483.00 B)
signature.asc (235.00 B)
Download all attachments

2023-05-18 05:53:05

by Claudiu Beznea

[permalink] [raw]
Subject: Re: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration

On 17.05.2023 14:54, [email protected] wrote:
> From: Ryan Wanner <[email protected]>
>
> 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 <[email protected]>
> ---
> 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))

2023-05-18 06:14:39

by Claudiu Beznea

[permalink] [raw]
Subject: Re: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration

On 18.05.2023 08:40, Claudiu Beznea - M18063 wrote:
> On 17.05.2023 14:54, [email protected] wrote:
>> From: Ryan Wanner <[email protected]>
>>
>> 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.

ah, ignore this as I've just saw your question about this here:
https://lore.kernel.org/all/[email protected]/

>
>> Add push-pull do debug and get functions.
>>
>> Signed-off-by: Ryan Wanner <[email protected]>
>> ---
>> 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))
>

2023-05-22 09:23:05

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration

On 17/05/2023 at 13:54, [email protected] wrote:
> From: Ryan Wanner <[email protected]>
>
> 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 <[email protected]>

Looks good to me:
Acked-by: Nicolas Ferre <[email protected]>

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


2023-05-22 09:23:57

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: pinctrl: at91-pio4: Add push-pull support

On 17/05/2023 at 13:54, [email protected] wrote:
> From: Ryan Wanner <[email protected]>
>
> Add generic push-pull support for pio4 driver.
>
> Signed-off-by: Ryan Wanner <[email protected]>

Acked-by: Nicolas Ferre <[email protected]>

> ---
> .../devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
> index e2b861ce16d8..774c3c269c40 100644
> --- a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
> @@ -37,7 +37,8 @@ right representation of the pin.
> Optional properties:
> - GENERIC_PINCONFIG: generic pinconfig options to use:
> - bias-disable, bias-pull-down, bias-pull-up, drive-open-drain,
> - input-schmitt-enable, input-debounce, output-low, output-high.
> + drive-push-pull input-schmitt-enable, input-debounce, output-low,
> + output-high.
> - for microchip,sama7g5-pinctrl only:
> - slew-rate: 0 - disabled, 1 - enabled (default)
> - atmel,drive-strength: 0 or 1 for low drive, 2 for medium drive and 3 for

--
Nicolas Ferre


2023-05-22 09:33:42

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: at91: Return to boolean properties

On 17/05/2023 at 13:54, [email protected] wrote:
> From: Ryan Wanner <[email protected]>
>
> Returning back to commit 0dc23d1a8e17
> ("arm: dts: at91: Fix boolean properties with values") as pinctrl driver no
> longer expects an integer value and expects a simple boolean property.
>
> Signed-off-by: Ryan Wanner <[email protected]>

Okay:
Acked-by: Nicolas Ferre <[email protected]>

Thanks for fixing this as well. Best regards,
Nicolas

> ---
> arch/arm/boot/dts/at91-kizbox3-hs.dts | 2 +-
> arch/arm/boot/dts/at91-kizbox3_common.dtsi | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/at91-kizbox3-hs.dts b/arch/arm/boot/dts/at91-kizbox3-hs.dts
> index 7075df6549e9..fec7269088d1 100644
> --- a/arch/arm/boot/dts/at91-kizbox3-hs.dts
> +++ b/arch/arm/boot/dts/at91-kizbox3-hs.dts
> @@ -225,7 +225,7 @@ pinctrl_pio_zbe_rst: gpio_zbe_rst {
> pinctrl_pio_io_reset: gpio_io_reset {
> pinmux = <PIN_PB30__GPIO>;
> bias-disable;
> - drive-open-drain = <1>;
> + drive-open-drain;
> output-low;
> };
> pinctrl_pio_input: gpio_input {
> diff --git a/arch/arm/boot/dts/at91-kizbox3_common.dtsi b/arch/arm/boot/dts/at91-kizbox3_common.dtsi
> index abe27adfa4d6..465664628419 100644
> --- a/arch/arm/boot/dts/at91-kizbox3_common.dtsi
> +++ b/arch/arm/boot/dts/at91-kizbox3_common.dtsi
> @@ -211,7 +211,7 @@ pinctrl_flx4_default: flx4_i2c6_default {
> pinmux = <PIN_PD12__FLEXCOM4_IO0>, //DATA
> <PIN_PD13__FLEXCOM4_IO1>; //CLK
> bias-disable;
> - drive-open-drain = <1>;
> + drive-open-drain;
> };
>
> pinctrl_pwm0 {

--
Nicolas Ferre


2023-05-23 05:33:30

by Claudiu Beznea

[permalink] [raw]
Subject: Re: [PATCH 3/3] ARM: dts: at91: Return to boolean properties

On 22.05.2023 12:22, Nicolas Ferre wrote:
> On 17/05/2023 at 13:54, [email protected] wrote:
>> From: Ryan Wanner <[email protected]>
>>
>> Returning back to commit 0dc23d1a8e17
>> ("arm: dts: at91: Fix boolean properties with values") as pinctrl driver no
>> longer expects an integer value and expects a simple boolean property.
>>
>> Signed-off-by: Ryan Wanner <[email protected]>
>
> Okay:
> Acked-by: Nicolas Ferre <[email protected]>

Applied to at91-dt, thanks!

>
> Thanks for fixing this as well. Best regards,
>   Nicolas
>
>> ---
>>   arch/arm/boot/dts/at91-kizbox3-hs.dts      | 2 +-
>>   arch/arm/boot/dts/at91-kizbox3_common.dtsi | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/at91-kizbox3-hs.dts
>> b/arch/arm/boot/dts/at91-kizbox3-hs.dts
>> index 7075df6549e9..fec7269088d1 100644
>> --- a/arch/arm/boot/dts/at91-kizbox3-hs.dts
>> +++ b/arch/arm/boot/dts/at91-kizbox3-hs.dts
>> @@ -225,7 +225,7 @@ pinctrl_pio_zbe_rst: gpio_zbe_rst {
>>           pinctrl_pio_io_reset: gpio_io_reset {
>>               pinmux = <PIN_PB30__GPIO>;
>>               bias-disable;
>> -            drive-open-drain = <1>;
>> +            drive-open-drain;
>>               output-low;
>>           };
>>           pinctrl_pio_input: gpio_input {
>> diff --git a/arch/arm/boot/dts/at91-kizbox3_common.dtsi
>> b/arch/arm/boot/dts/at91-kizbox3_common.dtsi
>> index abe27adfa4d6..465664628419 100644
>> --- a/arch/arm/boot/dts/at91-kizbox3_common.dtsi
>> +++ b/arch/arm/boot/dts/at91-kizbox3_common.dtsi
>> @@ -211,7 +211,7 @@ pinctrl_flx4_default: flx4_i2c6_default {
>>           pinmux = <PIN_PD12__FLEXCOM4_IO0>, //DATA
>>           <PIN_PD13__FLEXCOM4_IO1>; //CLK
>>           bias-disable;
>> -        drive-open-drain = <1>;
>> +        drive-open-drain;
>>       };
>>         pinctrl_pwm0 {
>

2023-05-23 16:59:02

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration

Wed, May 17, 2023 at 01:54:04PM +0200, [email protected] kirjoitti:
> From: Ryan Wanner <[email protected]>
>
> 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.

Right, thank you for fixing this!
Other comments below.

...

> + case PIN_CONFIG_DRIVE_PUSH_PULL:
> + conf &= (~ATMEL_PIO_OPD_MASK);

Parentheses are redundant.

> break;

...

> if (conf & ATMEL_PIO_OPD_MASK)
> seq_printf(s, "%s ", "open-drain");
> + if (!(conf & ATMEL_PIO_OPD_MASK))
> + seq_printf(s, "%s ", "push-pull");

As commented already by others, the else would be better.

--
With Best Regards,
Andy Shevchenko



2023-05-24 09:34:20

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: pinctrl: at91-pio4: Add push-pull support

On Wed, May 17, 2023 at 1:54 PM <[email protected]> wrote:

> From: Ryan Wanner <[email protected]>
>
> Add generic push-pull support for pio4 driver.
>
> Signed-off-by: Ryan Wanner <[email protected]>

Patch applied.

Yours,
Linus Walleij

2023-05-24 09:35:39

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration

On Wed, May 17, 2023 at 1:54 PM <[email protected]> wrote:

> From: Ryan Wanner <[email protected]>
>
> 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 <[email protected]>

I fixed up the two style issues pointed out by Andy and applied.
No need to resend.

Yours,
Linus Walleij