linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support
@ 2022-02-06 19:46 Biju Das
  2022-02-06 19:46 ` [PATCH 2/2] pinctrl: renesas: rzg2l: Improve rzg2l_gpio_register() Biju Das
  2022-02-07 14:30 ` [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support Geert Uytterhoeven
  0 siblings, 2 replies; 5+ messages in thread
From: Biju Das @ 2022-02-06 19:46 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Biju Das, Geert Uytterhoeven, linux-renesas-soc, linux-gpio,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad

RZ/V2L uses RZ/G2L GPIO and pinctrl driver.
This patch updates description for RZ/V2L pin control support.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/pinctrl/renesas/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/renesas/Kconfig b/drivers/pinctrl/renesas/Kconfig
index 89f5ca76ab83..c0c740e660b8 100644
--- a/drivers/pinctrl/renesas/Kconfig
+++ b/drivers/pinctrl/renesas/Kconfig
@@ -179,14 +179,15 @@ config PINCTRL_RZA2
 	  This selects GPIO and pinctrl driver for Renesas RZ/A2 platforms.
 
 config PINCTRL_RZG2L
-	bool "pin control support for RZ/G2L" if COMPILE_TEST
+	bool "pin control support for RZ/{G2L,V2L}" if COMPILE_TEST
 	depends on OF
 	select GPIOLIB
 	select GENERIC_PINCTRL_GROUPS
 	select GENERIC_PINMUX_FUNCTIONS
 	select GENERIC_PINCONF
 	help
-	  This selects GPIO and pinctrl driver for Renesas RZ/G2L platforms.
+	  This selects GPIO and pinctrl driver for Renesas RZ/{G2L,V2L}
+	  platforms.
 
 config PINCTRL_PFC_R8A77470
 	bool "pin control support for RZ/G1C" if COMPILE_TEST
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] pinctrl: renesas: rzg2l: Improve rzg2l_gpio_register()
  2022-02-06 19:46 [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support Biju Das
@ 2022-02-06 19:46 ` Biju Das
  2022-02-07 14:33   ` Geert Uytterhoeven
  2022-02-07 14:30 ` [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support Geert Uytterhoeven
  1 sibling, 1 reply; 5+ messages in thread
From: Biju Das @ 2022-02-06 19:46 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Biju Das, Geert Uytterhoeven, linux-renesas-soc, linux-gpio,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad

Update rzg2l_gpio_register() to use driver data for chip->names
and check for gpio-range. This allows reusing the driver for
SoC's with different port pin definitions(eg:- RZ/G2UL SoC has
fewer ports compared to RZ/G2L and port pin definitions are
different).

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/pinctrl/renesas/pinctrl-rzg2l.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index ccee9c9e2e22..cb805502fb0f 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -1090,12 +1090,12 @@ static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl)
 	}
 
 	if (of_args.args[0] != 0 || of_args.args[1] != 0 ||
-	    of_args.args[2] != ARRAY_SIZE(rzg2l_gpio_names)) {
+	    of_args.args[2] != pctrl->data->n_port_pins) {
 		dev_err(pctrl->dev, "gpio-ranges does not match selected SOC\n");
 		return -EINVAL;
 	}
 
-	chip->names = rzg2l_gpio_names;
+	chip->names = pctrl->data->port_pins;
 	chip->request = rzg2l_gpio_request;
 	chip->free = rzg2l_gpio_free;
 	chip->get_direction = rzg2l_gpio_get_direction;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support
  2022-02-06 19:46 [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support Biju Das
  2022-02-06 19:46 ` [PATCH 2/2] pinctrl: renesas: rzg2l: Improve rzg2l_gpio_register() Biju Das
@ 2022-02-07 14:30 ` Geert Uytterhoeven
  2022-02-07 14:36   ` Biju Das
  1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2022-02-07 14:30 UTC (permalink / raw)
  To: Biju Das
  Cc: Linus Walleij, Linux-Renesas, open list:GPIO SUBSYSTEM,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad

Hi Biju,

On Sun, Feb 6, 2022 at 8:46 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> RZ/V2L uses RZ/G2L GPIO and pinctrl driver.
> This patch updates description for RZ/V2L pin control support.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

I think it makes sense to fold this into commit 9d6ae5b72f78a94f
("pinctrl: renesas: Kconfig: Select PINCTRL_RZG2L if RZ/V2L SoC is
enabled") in renesas-pinctrl-for-v5.18?

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 2/2] pinctrl: renesas: rzg2l: Improve rzg2l_gpio_register()
  2022-02-06 19:46 ` [PATCH 2/2] pinctrl: renesas: rzg2l: Improve rzg2l_gpio_register() Biju Das
@ 2022-02-07 14:33   ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2022-02-07 14:33 UTC (permalink / raw)
  To: Biju Das
  Cc: Linus Walleij, Linux-Renesas, open list:GPIO SUBSYSTEM,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad

On Sun, Feb 6, 2022 at 8:46 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Update rzg2l_gpio_register() to use driver data for chip->names
> and check for gpio-range. This allows reusing the driver for
> SoC's with different port pin definitions(eg:- RZ/G2UL SoC has
> fewer ports compared to RZ/G2L and port pin definitions are
> different).
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-pinctrl-for-v5.18.

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 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support
  2022-02-07 14:30 ` [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support Geert Uytterhoeven
@ 2022-02-07 14:36   ` Biju Das
  0 siblings, 0 replies; 5+ messages in thread
From: Biju Das @ 2022-02-07 14:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linus Walleij, Linux-Renesas, open list:GPIO SUBSYSTEM,
	Chris Paterson, Biju Das, Prabhakar Mahadev Lad

Hi Geert,

Thanks for the feedback.

> Subject: Re: [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for
> RZ/V2L pin control support
> 
> Hi Biju,
> 
> On Sun, Feb 6, 2022 at 8:46 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > RZ/V2L uses RZ/G2L GPIO and pinctrl driver.
> > This patch updates description for RZ/V2L pin control support.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> 
> Thanks for your patch!
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> I think it makes sense to fold this into commit 9d6ae5b72f78a94f
> ("pinctrl: renesas: Kconfig: Select PINCTRL_RZG2L if RZ/V2L SoC is
> enabled") in renesas-pinctrl-for-v5.18?

Agreed.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-07 14:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-06 19:46 [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support Biju Das
2022-02-06 19:46 ` [PATCH 2/2] pinctrl: renesas: rzg2l: Improve rzg2l_gpio_register() Biju Das
2022-02-07 14:33   ` Geert Uytterhoeven
2022-02-07 14:30 ` [PATCH 1/2] pinctrl: renesas: Kconfig: Update description for RZ/V2L pin control support Geert Uytterhoeven
2022-02-07 14:36   ` Biju Das

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