* [PATCH] pinctrl: rza1: Switch to using "output-enable"
@ 2020-08-21 11:14 Geert Uytterhoeven
2020-08-21 12:02 ` Chris Brandt
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2020-08-21 11:14 UTC (permalink / raw)
To: Jacopo Mondi, Chris Brandt
Cc: linux-renesas-soc, linux-gpio, devicetree, Geert Uytterhoeven
For pins requiring software driven IO output operations, the RZ/A1 Pin
Controller uses either the "output-high" or "output-low" DT property to
enable the corresponding output buffer. The actual line value doesn't
matter, as it is ignored.
Commit 425562429d4f3b13 ("pinctrl: generic: Add output-enable property")
introduced a new DT property for this specific use case.
Update the RZ/A1 Pin Controller DT bindings and driver to use this new
property instead. Preserve backwards compatibility with old DTBs in the
driver, as this comes at a very small cost.
Notes:
- The DT binding examples already used the new property,
- There are no upstream users of the old properties.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
To be queued in sh-pfc for v5.10.
.../devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt | 5 ++---
drivers/pinctrl/pinctrl-rza1.c | 3 ++-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
index fd3696eb36bf307e..38cdd23d3498e74a 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
@@ -117,10 +117,9 @@ function or a GPIO controller alternatively.
- input-enable:
enable input bufer for pins requiring software driven IO input
operations.
- - output-high:
+ - output-enable:
enable output buffer for pins requiring software driven IO output
- operations. output-low can be used alternatively, as line value is
- ignored by the driver.
+ operations.
The hardware reference manual specifies when a pin has to be configured to
work in bi-directional mode and when the IO direction has to be specified
diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
index 511f232ab7bc290c..944466ef34d33f51 100644
--- a/drivers/pinctrl/pinctrl-rza1.c
+++ b/drivers/pinctrl/pinctrl-rza1.c
@@ -928,7 +928,8 @@ static int rza1_parse_pinmux_node(struct rza1_pinctrl *rza1_pctl,
case PIN_CONFIG_INPUT_ENABLE:
pinmux_flags |= MUX_FLAGS_SWIO_INPUT;
break;
- case PIN_CONFIG_OUTPUT:
+ case PIN_CONFIG_OUTPUT: /* for DT backwards compatibility */
+ case PIN_CONFIG_OUTPUT_ENABLE:
pinmux_flags |= MUX_FLAGS_SWIO_OUTPUT;
default:
break;
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] pinctrl: rza1: Switch to using "output-enable"
2020-08-21 11:14 [PATCH] pinctrl: rza1: Switch to using "output-enable" Geert Uytterhoeven
@ 2020-08-21 12:02 ` Chris Brandt
2020-08-24 8:30 ` Jacopo Mondi
2020-09-08 20:53 ` Rob Herring
2 siblings, 0 replies; 5+ messages in thread
From: Chris Brandt @ 2020-08-21 12:02 UTC (permalink / raw)
To: Geert Uytterhoeven, Jacopo Mondi
Cc: linux-renesas-soc, linux-gpio, devicetree
Hi Geert,
On Fri, Aug 21, 2020, Geert Uytterhoeven wrote:
> Update the RZ/A1 Pin Controller DT bindings and driver to use this new
> property instead. Preserve backwards compatibility with old DTBs in the
> driver, as this comes at a very small cost.
I see that after you make this change, the next patch converts the
bindings docs to json-schema, but you wanted to clean this up first.
Reviewed-by: Chris Brandt <chris.brandt@renesas.com>
Thank you,
Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: rza1: Switch to using "output-enable"
2020-08-21 11:14 [PATCH] pinctrl: rza1: Switch to using "output-enable" Geert Uytterhoeven
2020-08-21 12:02 ` Chris Brandt
@ 2020-08-24 8:30 ` Jacopo Mondi
2020-08-25 7:10 ` Geert Uytterhoeven
2020-09-08 20:53 ` Rob Herring
2 siblings, 1 reply; 5+ messages in thread
From: Jacopo Mondi @ 2020-08-24 8:30 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jacopo Mondi, Chris Brandt, linux-renesas-soc, linux-gpio, devicetree
Hi Geert,
On Fri, Aug 21, 2020 at 01:14:01PM +0200, Geert Uytterhoeven wrote:
> For pins requiring software driven IO output operations, the RZ/A1 Pin
> Controller uses either the "output-high" or "output-low" DT property to
> enable the corresponding output buffer. The actual line value doesn't
> matter, as it is ignored.
>
> Commit 425562429d4f3b13 ("pinctrl: generic: Add output-enable property")
> introduced a new DT property for this specific use case.
>
> Update the RZ/A1 Pin Controller DT bindings and driver to use this new
> property instead. Preserve backwards compatibility with old DTBs in the
> driver, as this comes at a very small cost.
>
> Notes:
> - The DT binding examples already used the new property,
> - There are no upstream users of the old properties.
>
Did we introduce output-enable after the rza1 pinctrl and forgot to
update ? Good catch anyway
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> To be queued in sh-pfc for v5.10.
>
> .../devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt | 5 ++---
> drivers/pinctrl/pinctrl-rza1.c | 3 ++-
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
> index fd3696eb36bf307e..38cdd23d3498e74a 100644
> --- a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
> @@ -117,10 +117,9 @@ function or a GPIO controller alternatively.
> - input-enable:
> enable input bufer for pins requiring software driven IO input
> operations.
> - - output-high:
> + - output-enable:
> enable output buffer for pins requiring software driven IO output
> - operations. output-low can be used alternatively, as line value is
> - ignored by the driver.
> + operations.
>
Seems like no upstream DTS uses any output-* property for the pinctrl.
> The hardware reference manual specifies when a pin has to be configured to
> work in bi-directional mode and when the IO direction has to be specified
> diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
> index 511f232ab7bc290c..944466ef34d33f51 100644
> --- a/drivers/pinctrl/pinctrl-rza1.c
> +++ b/drivers/pinctrl/pinctrl-rza1.c
> @@ -928,7 +928,8 @@ static int rza1_parse_pinmux_node(struct rza1_pinctrl *rza1_pctl,
> case PIN_CONFIG_INPUT_ENABLE:
> pinmux_flags |= MUX_FLAGS_SWIO_INPUT;
> break;
> - case PIN_CONFIG_OUTPUT:
> + case PIN_CONFIG_OUTPUT: /* for DT backwards compatibility */
> + case PIN_CONFIG_OUTPUT_ENABLE:
> pinmux_flags |= MUX_FLAGS_SWIO_OUTPUT;
> default:
> break;
Great! For both parts:
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Thanks
j
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: rza1: Switch to using "output-enable"
2020-08-24 8:30 ` Jacopo Mondi
@ 2020-08-25 7:10 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2020-08-25 7:10 UTC (permalink / raw)
To: Jacopo Mondi
Cc: Jacopo Mondi, Chris Brandt, Linux-Renesas,
open list:GPIO SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
Hi Jacopo,
On Mon, Aug 24, 2020 at 10:26 AM Jacopo Mondi <jacopo@jmondi.org> wrote:
> On Fri, Aug 21, 2020 at 01:14:01PM +0200, Geert Uytterhoeven wrote:
> > For pins requiring software driven IO output operations, the RZ/A1 Pin
> > Controller uses either the "output-high" or "output-low" DT property to
> > enable the corresponding output buffer. The actual line value doesn't
> > matter, as it is ignored.
> >
> > Commit 425562429d4f3b13 ("pinctrl: generic: Add output-enable property")
> > introduced a new DT property for this specific use case.
> >
> > Update the RZ/A1 Pin Controller DT bindings and driver to use this new
> > property instead. Preserve backwards compatibility with old DTBs in the
> > driver, as this comes at a very small cost.
> >
> > Notes:
> > - The DT binding examples already used the new property,
> > - There are no upstream users of the old properties.
> >
>
> Did we introduce output-enable after the rza1 pinctrl and forgot to
> update ? Good catch anyway
"output-enable" was introduced in response to early review comments
on the rza1 pinctrl driver, and both changes went upstream through
the same sh-pfc pull request. Seems like part of the update was just
forgotten.
> Great! For both parts:
> Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pinctrl: rza1: Switch to using "output-enable"
2020-08-21 11:14 [PATCH] pinctrl: rza1: Switch to using "output-enable" Geert Uytterhoeven
2020-08-21 12:02 ` Chris Brandt
2020-08-24 8:30 ` Jacopo Mondi
@ 2020-09-08 20:53 ` Rob Herring
2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2020-09-08 20:53 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: devicetree, Chris Brandt, linux-gpio, linux-renesas-soc, Jacopo Mondi
On Fri, 21 Aug 2020 13:14:01 +0200, Geert Uytterhoeven wrote:
> For pins requiring software driven IO output operations, the RZ/A1 Pin
> Controller uses either the "output-high" or "output-low" DT property to
> enable the corresponding output buffer. The actual line value doesn't
> matter, as it is ignored.
>
> Commit 425562429d4f3b13 ("pinctrl: generic: Add output-enable property")
> introduced a new DT property for this specific use case.
>
> Update the RZ/A1 Pin Controller DT bindings and driver to use this new
> property instead. Preserve backwards compatibility with old DTBs in the
> driver, as this comes at a very small cost.
>
> Notes:
> - The DT binding examples already used the new property,
> - There are no upstream users of the old properties.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> To be queued in sh-pfc for v5.10.
>
> .../devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt | 5 ++---
> drivers/pinctrl/pinctrl-rza1.c | 3 ++-
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-08 20:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21 11:14 [PATCH] pinctrl: rza1: Switch to using "output-enable" Geert Uytterhoeven
2020-08-21 12:02 ` Chris Brandt
2020-08-24 8:30 ` Jacopo Mondi
2020-08-25 7:10 ` Geert Uytterhoeven
2020-09-08 20:53 ` Rob Herring
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.