linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent
@ 2019-06-07  9:58 Geert Uytterhoeven
  2019-06-07  9:58 ` [PATCH 1/4] irqchip/renesas-intc-irqpin: " Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2019-06-07  9:58 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Linus Walleij,
	Bartosz Golaszewski
  Cc: linux-renesas-soc, linux-gpio, linux-kernel, Geert Uytterhoeven

	Hi all,

Recently, Marc pointed out some common misconceptions w.r.t. the .name
and .parent_device fields in struct irq_chip.  This patch series fixes
them in the Renesas interrupt controller drivers.

The first two patches are destined for the irqchip tree, the last two
for the GPIO tree.

Thanks!

Geert Uytterhoeven (4):
  irqchip/renesas-intc-irqpin: Use proper irq_chip name and parent
  irqchip/renesas-irqc: Use proper irq_chip name and parent
  gpio: em: Use proper irq_chip name
  gpio: rcar: Use proper irq_chip name

 drivers/gpio/gpio-em.c                    | 2 +-
 drivers/gpio/gpio-rcar.c                  | 2 +-
 drivers/irqchip/irq-renesas-intc-irqpin.c | 3 ++-
 drivers/irqchip/irq-renesas-irqc.c        | 3 ++-
 4 files changed, 6 insertions(+), 4 deletions(-)

-- 
2.17.1

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] 6+ messages in thread

* [PATCH 1/4] irqchip/renesas-intc-irqpin: Use proper irq_chip name and parent
  2019-06-07  9:58 [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Geert Uytterhoeven
@ 2019-06-07  9:58 ` Geert Uytterhoeven
  2019-06-07  9:58 ` [PATCH 2/4] irqchip/renesas-irqc: " Geert Uytterhoeven
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2019-06-07  9:58 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Linus Walleij,
	Bartosz Golaszewski
  Cc: linux-renesas-soc, linux-gpio, linux-kernel, Geert Uytterhoeven

The irq_chip .name field should contain the device's class (not
instance) name, while .parent_device should point to the device itself.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/irqchip/irq-renesas-intc-irqpin.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 04c05a18600cf71f..f82bc60a67931cd7 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -508,7 +508,8 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 	}
 
 	irq_chip = &p->irq_chip;
-	irq_chip->name = name;
+	irq_chip->name = "intc-irqpin";
+	irq_chip->parent_device = dev;
 	irq_chip->irq_mask = disable_fn;
 	irq_chip->irq_unmask = enable_fn;
 	irq_chip->irq_set_type = intc_irqpin_irq_set_type;
-- 
2.17.1


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

* [PATCH 2/4] irqchip/renesas-irqc: Use proper irq_chip name and parent
  2019-06-07  9:58 [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Geert Uytterhoeven
  2019-06-07  9:58 ` [PATCH 1/4] irqchip/renesas-intc-irqpin: " Geert Uytterhoeven
@ 2019-06-07  9:58 ` Geert Uytterhoeven
  2019-06-07  9:58 ` [PATCH 3/4] gpio: em: Use proper irq_chip name Geert Uytterhoeven
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2019-06-07  9:58 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Linus Walleij,
	Bartosz Golaszewski
  Cc: linux-renesas-soc, linux-gpio, linux-kernel, Geert Uytterhoeven

The irq_chip .name field should contain the device's class (not
instance) name, while .parent_device should point to the device itself.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/irqchip/irq-renesas-irqc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index cde9f9c0687e94a4..11abc09ef76c62b5 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -176,7 +176,7 @@ static int irqc_probe(struct platform_device *pdev)
 	}
 
 	ret = irq_alloc_domain_generic_chips(p->irq_domain, p->number_of_irqs,
-					     1, name, handle_level_irq,
+					     1, "irqc", handle_level_irq,
 					     0, 0, IRQ_GC_INIT_NESTED_LOCK);
 	if (ret) {
 		dev_err(dev, "cannot allocate generic chip\n");
@@ -187,6 +187,7 @@ static int irqc_probe(struct platform_device *pdev)
 	p->gc->reg_base = p->cpu_int_base;
 	p->gc->chip_types[0].regs.enable = IRQC_EN_SET;
 	p->gc->chip_types[0].regs.disable = IRQC_EN_STS;
+	p->gc->chip_types[0].chip.parent_device = dev;
 	p->gc->chip_types[0].chip.irq_mask = irq_gc_mask_disable_reg;
 	p->gc->chip_types[0].chip.irq_unmask = irq_gc_unmask_enable_reg;
 	p->gc->chip_types[0].chip.irq_set_type	= irqc_irq_set_type;
-- 
2.17.1


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

* [PATCH 3/4] gpio: em: Use proper irq_chip name
  2019-06-07  9:58 [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Geert Uytterhoeven
  2019-06-07  9:58 ` [PATCH 1/4] irqchip/renesas-intc-irqpin: " Geert Uytterhoeven
  2019-06-07  9:58 ` [PATCH 2/4] irqchip/renesas-irqc: " Geert Uytterhoeven
@ 2019-06-07  9:58 ` Geert Uytterhoeven
  2019-06-07  9:58 ` [PATCH 4/4] gpio: rcar: " Geert Uytterhoeven
  2019-06-11 11:23 ` [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Marc Zyngier
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2019-06-07  9:58 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Linus Walleij,
	Bartosz Golaszewski
  Cc: linux-renesas-soc, linux-gpio, linux-kernel, Geert Uytterhoeven

The irq_chip .name field should contain the device's class name, not the
instance's name.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested due to lack of hardware.
.parent_device not filled in as this driver doesn't use Runtime PM.
---
 drivers/gpio/gpio-em.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index b6af705a4e5f4810..6aa08d37932adf2c 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -318,7 +318,7 @@ static int em_gio_probe(struct platform_device *pdev)
 	gpio_chip->ngpio = ngpios;
 
 	irq_chip = &p->irq_chip;
-	irq_chip->name = name;
+	irq_chip->name = "gpio-em";
 	irq_chip->irq_mask = em_gio_irq_disable;
 	irq_chip->irq_unmask = em_gio_irq_enable;
 	irq_chip->irq_set_type = em_gio_irq_set_type;
-- 
2.17.1


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

* [PATCH 4/4] gpio: rcar: Use proper irq_chip name
  2019-06-07  9:58 [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2019-06-07  9:58 ` [PATCH 3/4] gpio: em: Use proper irq_chip name Geert Uytterhoeven
@ 2019-06-07  9:58 ` Geert Uytterhoeven
  2019-06-11 11:23 ` [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Marc Zyngier
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2019-06-07  9:58 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Linus Walleij,
	Bartosz Golaszewski
  Cc: linux-renesas-soc, linux-gpio, linux-kernel, Geert Uytterhoeven

The irq_chip .name field should contain the device's class name, not the
instance's name.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/gpio/gpio-rcar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 70e95fc4779fe262..3ae58f182a08718a 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -483,7 +483,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 	gpio_chip->ngpio = npins;
 
 	irq_chip = &p->irq_chip;
-	irq_chip->name = name;
+	irq_chip->name = "gpio-rcar";
 	irq_chip->parent_device = dev;
 	irq_chip->irq_mask = gpio_rcar_irq_disable;
 	irq_chip->irq_unmask = gpio_rcar_irq_enable;
-- 
2.17.1


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

* Re: [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent
  2019-06-07  9:58 [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2019-06-07  9:58 ` [PATCH 4/4] gpio: rcar: " Geert Uytterhoeven
@ 2019-06-11 11:23 ` Marc Zyngier
  4 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2019-06-11 11:23 UTC (permalink / raw)
  To: Geert Uytterhoeven, Thomas Gleixner, Jason Cooper, Linus Walleij,
	Bartosz Golaszewski
  Cc: linux-renesas-soc, linux-gpio, linux-kernel

On 07/06/2019 10:58, Geert Uytterhoeven wrote:
> 	Hi all,
> 
> Recently, Marc pointed out some common misconceptions w.r.t. the .name
> and .parent_device fields in struct irq_chip.  This patch series fixes
> them in the Renesas interrupt controller drivers.
> 
> The first two patches are destined for the irqchip tree, the last two
> for the GPIO tree.
> 
> Thanks!
> 
> Geert Uytterhoeven (4):
>   irqchip/renesas-intc-irqpin: Use proper irq_chip name and parent
>   irqchip/renesas-irqc: Use proper irq_chip name and parent
>   gpio: em: Use proper irq_chip name
>   gpio: rcar: Use proper irq_chip name
> 
>  drivers/gpio/gpio-em.c                    | 2 +-
>  drivers/gpio/gpio-rcar.c                  | 2 +-
>  drivers/irqchip/irq-renesas-intc-irqpin.c | 3 ++-
>  drivers/irqchip/irq-renesas-irqc.c        | 3 ++-
>  4 files changed, 6 insertions(+), 4 deletions(-)
> 

I've applied patches 1 and2 to the irqchip tree.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

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

end of thread, other threads:[~2019-06-11 11:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-07  9:58 [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Geert Uytterhoeven
2019-06-07  9:58 ` [PATCH 1/4] irqchip/renesas-intc-irqpin: " Geert Uytterhoeven
2019-06-07  9:58 ` [PATCH 2/4] irqchip/renesas-irqc: " Geert Uytterhoeven
2019-06-07  9:58 ` [PATCH 3/4] gpio: em: Use proper irq_chip name Geert Uytterhoeven
2019-06-07  9:58 ` [PATCH 4/4] gpio: rcar: " Geert Uytterhoeven
2019-06-11 11:23 ` [PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent Marc Zyngier

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