[v2,1/2] pinctrl: renesas: Select CONFIG_IRQ_DOMAIN_HIERARCHY for pinctrl-rzg2l

Message ID 20240215124112.2259103-2-claudiu.beznea.uj@bp.renesas.com
State New
Headers
Series pinctrl: renesas: rzg2l: Add suspend to RAM support |

Commit Message

claudiu beznea Feb. 15, 2024, 12:41 p.m. UTC
  From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

The pinctrl-rzg2l driver uses APIs that are defined only if
CONFIG_IRQ_DOMAIN_HIERARCHY=y (irq_chip_*_parent() APIs). On the ARCH_RZG2L
CONFIG_IRQ_DOMAIN_HIERARCHY is selected anyway, e.g., by the
CONFIG_ARM_GIC_V3. Even so, make it explicit at the driver level for a
clearer view of the dependencies.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---

Changes in v2:
- this patch is introduced in v2

 drivers/pinctrl/renesas/Kconfig | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Geert Uytterhoeven Feb. 21, 2024, 2:13 p.m. UTC | #1
Hi Claudiu,

On Thu, Feb 15, 2024 at 1:41 PM Claudiu <claudiu.beznea@tuxon.dev> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> The pinctrl-rzg2l driver uses APIs that are defined only if
> CONFIG_IRQ_DOMAIN_HIERARCHY=y (irq_chip_*_parent() APIs). On the ARCH_RZG2L
> CONFIG_IRQ_DOMAIN_HIERARCHY is selected anyway, e.g., by the
> CONFIG_ARM_GIC_V3. Even so, make it explicit at the driver level for a
> clearer view of the dependencies.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

Thanks for your patch!

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

Compile-testing on m68k reveals that you also need

    select GPIOLIB_IRQCHIP

So I will add that when queuing in renesas-pinctrl for v6.9.

Gr{oetje,eeting}s,

                        Geert
  
Geert Uytterhoeven Feb. 21, 2024, 2:21 p.m. UTC | #2
On Wed, Feb 21, 2024 at 3:13 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Feb 15, 2024 at 1:41 PM Claudiu <claudiu.beznea@tuxon.dev> wrote:
> > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >
> > The pinctrl-rzg2l driver uses APIs that are defined only if
> > CONFIG_IRQ_DOMAIN_HIERARCHY=y (irq_chip_*_parent() APIs). On the ARCH_RZG2L
> > CONFIG_IRQ_DOMAIN_HIERARCHY is selected anyway, e.g., by the
> > CONFIG_ARM_GIC_V3. Even so, make it explicit at the driver level for a
> > clearer view of the dependencies.
> >
> > Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Thanks for your patch!
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Compile-testing on m68k reveals that you also need
>
>     select GPIOLIB_IRQCHIP

FTR:

drivers/pinctrl/renesas/pinctrl-rzg2l.c: In function ‘rzg2l_gpio_free’:
drivers/pinctrl/renesas/pinctrl-rzg2l.c:1472:30: error: ‘struct
gpio_chip’ has no member named ‘irq’
 1472 |  virq = irq_find_mapping(chip->irq.domain, offset);
      |                              ^~
drivers/pinctrl/renesas/pinctrl-rzg2l.c: In function
‘rzg2l_gpio_populate_parent_fwspec’:
drivers/pinctrl/renesas/pinctrl-rzg2l.c:1953:23: error: ‘struct
gpio_chip’ has no member named ‘irq’
 1953 |  fwspec->fwnode = chip->irq.parent_domain->fwnode;
      |                       ^~
drivers/pinctrl/renesas/pinctrl-rzg2l.c: In function ‘rzg2l_gpio_register’:
drivers/pinctrl/renesas/pinctrl-rzg2l.c:2057:14: error: ‘struct
gpio_chip’ has no member named ‘irq’
 2057 |  girq = &chip->irq;
      |              ^~

Gr{oetje,eeting}s,

                        Geert
  

Patch

diff --git a/drivers/pinctrl/renesas/Kconfig b/drivers/pinctrl/renesas/Kconfig
index c8d519ca53eb..a1e57939e54b 100644
--- a/drivers/pinctrl/renesas/Kconfig
+++ b/drivers/pinctrl/renesas/Kconfig
@@ -190,6 +190,7 @@  config PINCTRL_RZG2L
 	select GENERIC_PINCTRL_GROUPS
 	select GENERIC_PINMUX_FUNCTIONS
 	select GENERIC_PINCONF
+	select IRQ_DOMAIN_HIERARCHY
 	help
 	  This selects GPIO and pinctrl driver for Renesas RZ/{G2L,G2UL,V2L}
 	  platforms.