All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
@ 2022-02-01 12:02 ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:02 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Our irq_chip data structure currently suffers from two problems:

(1) the 'name' field is often dynamically populated with a reference
    to the underlying HW (DT node dame, for example)

(2) the 'parent_device' which is used to implement runtime PM is also
    dynamically populated

(3) there is at least one instance of a subsystem messing with the
    internals of irq_chip structures (gpiochip_set_irq_hooks is
    what I know about)

These things mean that although the primary use of irq_chip is to only
contain function pointers and other *static* information, the above
two fields result in these structures being copied in a number of
drivers. Eventually, it would be much better if the various drivers
would use irq_chip as an 'ops' data structure (potentially made
read-only), and keep the dynamic information somewhere more suitable.

For (2) we already have the irqdomain structure that is designed to
deal with the context in which interrupts are used, and it makes sense
to move the 'parent_device' field over to this structure. This is what
this small series is doing, with some minor cleanup on the way.

(1) and (3) will be dealt in separate series (and I don't have a good
solution for (3) yet).

Thanks,

	M.

Marc Zyngier (12):
  genirq: Allow the PM device to originate from irq domain
  irqchip/gic: Move PM device over to irq domain
  irqchip/renesas-intc-gpio: Move PM device over to irq domain
  irqchip/renesas-irqc: Move PM device over to irq domain
  irqchip/imx-intmux: Move PM device over to irq domain
  gpio: mt7621: Kill parent_device usage
  gpio: omap: Move PM device over to irq domain
  gpio: rcar: Move PM device over to irq domain
  gpio: tpmx86: Move PM device over to irq domain
  pinctrl: npcm: Fix broken references to chip->parent_device
  pinctrl: starfive: Move PM device over to irq domain
  genirq: Kill irq_chip::parent_device

 drivers/gpio/gpio-mt7621.c                |  1 -
 drivers/gpio/gpio-omap.c                  |  7 ++++---
 drivers/gpio/gpio-rcar.c                  |  2 +-
 drivers/gpio/gpio-tqmx86.c                |  3 ++-
 drivers/irqchip/irq-gic.c                 | 12 +++++------
 drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
 drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
 drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
 include/linux/irq.h                       |  2 --
 include/linux/irqdomain.h                 | 10 +++++++++
 kernel/irq/chip.c                         | 20 +++++++++++++-----
 13 files changed, 59 insertions(+), 40 deletions(-)

-- 
2.30.2


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

* [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
@ 2022-02-01 12:02 ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:02 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Our irq_chip data structure currently suffers from two problems:

(1) the 'name' field is often dynamically populated with a reference
    to the underlying HW (DT node dame, for example)

(2) the 'parent_device' which is used to implement runtime PM is also
    dynamically populated

(3) there is at least one instance of a subsystem messing with the
    internals of irq_chip structures (gpiochip_set_irq_hooks is
    what I know about)

These things mean that although the primary use of irq_chip is to only
contain function pointers and other *static* information, the above
two fields result in these structures being copied in a number of
drivers. Eventually, it would be much better if the various drivers
would use irq_chip as an 'ops' data structure (potentially made
read-only), and keep the dynamic information somewhere more suitable.

For (2) we already have the irqdomain structure that is designed to
deal with the context in which interrupts are used, and it makes sense
to move the 'parent_device' field over to this structure. This is what
this small series is doing, with some minor cleanup on the way.

(1) and (3) will be dealt in separate series (and I don't have a good
solution for (3) yet).

Thanks,

	M.

Marc Zyngier (12):
  genirq: Allow the PM device to originate from irq domain
  irqchip/gic: Move PM device over to irq domain
  irqchip/renesas-intc-gpio: Move PM device over to irq domain
  irqchip/renesas-irqc: Move PM device over to irq domain
  irqchip/imx-intmux: Move PM device over to irq domain
  gpio: mt7621: Kill parent_device usage
  gpio: omap: Move PM device over to irq domain
  gpio: rcar: Move PM device over to irq domain
  gpio: tpmx86: Move PM device over to irq domain
  pinctrl: npcm: Fix broken references to chip->parent_device
  pinctrl: starfive: Move PM device over to irq domain
  genirq: Kill irq_chip::parent_device

 drivers/gpio/gpio-mt7621.c                |  1 -
 drivers/gpio/gpio-omap.c                  |  7 ++++---
 drivers/gpio/gpio-rcar.c                  |  2 +-
 drivers/gpio/gpio-tqmx86.c                |  3 ++-
 drivers/irqchip/irq-gic.c                 | 12 +++++------
 drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
 drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
 drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
 include/linux/irq.h                       |  2 --
 include/linux/irqdomain.h                 | 10 +++++++++
 kernel/irq/chip.c                         | 20 +++++++++++++-----
 13 files changed, 59 insertions(+), 40 deletions(-)

-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
@ 2022-02-01 12:02 ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:02 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Our irq_chip data structure currently suffers from two problems:

(1) the 'name' field is often dynamically populated with a reference
    to the underlying HW (DT node dame, for example)

(2) the 'parent_device' which is used to implement runtime PM is also
    dynamically populated

(3) there is at least one instance of a subsystem messing with the
    internals of irq_chip structures (gpiochip_set_irq_hooks is
    what I know about)

These things mean that although the primary use of irq_chip is to only
contain function pointers and other *static* information, the above
two fields result in these structures being copied in a number of
drivers. Eventually, it would be much better if the various drivers
would use irq_chip as an 'ops' data structure (potentially made
read-only), and keep the dynamic information somewhere more suitable.

For (2) we already have the irqdomain structure that is designed to
deal with the context in which interrupts are used, and it makes sense
to move the 'parent_device' field over to this structure. This is what
this small series is doing, with some minor cleanup on the way.

(1) and (3) will be dealt in separate series (and I don't have a good
solution for (3) yet).

Thanks,

	M.

Marc Zyngier (12):
  genirq: Allow the PM device to originate from irq domain
  irqchip/gic: Move PM device over to irq domain
  irqchip/renesas-intc-gpio: Move PM device over to irq domain
  irqchip/renesas-irqc: Move PM device over to irq domain
  irqchip/imx-intmux: Move PM device over to irq domain
  gpio: mt7621: Kill parent_device usage
  gpio: omap: Move PM device over to irq domain
  gpio: rcar: Move PM device over to irq domain
  gpio: tpmx86: Move PM device over to irq domain
  pinctrl: npcm: Fix broken references to chip->parent_device
  pinctrl: starfive: Move PM device over to irq domain
  genirq: Kill irq_chip::parent_device

 drivers/gpio/gpio-mt7621.c                |  1 -
 drivers/gpio/gpio-omap.c                  |  7 ++++---
 drivers/gpio/gpio-rcar.c                  |  2 +-
 drivers/gpio/gpio-tqmx86.c                |  3 ++-
 drivers/irqchip/irq-gic.c                 | 12 +++++------
 drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
 drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
 drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
 include/linux/irq.h                       |  2 --
 include/linux/irqdomain.h                 | 10 +++++++++
 kernel/irq/chip.c                         | 20 +++++++++++++-----
 13 files changed, 59 insertions(+), 40 deletions(-)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:02   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:02 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

As a preparation to moving the reference to the device used for
runtime power management, add a new 'dev' field to the irqdomain
structure for that exact purpose.

The irq_chip_pm_{get,put}() helpers are made aware of the dual
location via a new private helper.

No functional change intended.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/irqdomain.h | 10 ++++++++++
 kernel/irq/chip.c         | 23 ++++++++++++++++++-----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index d476405802e9..be25a33293e5 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -151,6 +151,8 @@ struct irq_domain_chip_generic;
  * @gc: Pointer to a list of generic chips. There is a helper function for
  *      setting up one or more generic chips for interrupt controllers
  *      drivers using the generic chip library which uses this pointer.
+ * @dev: Pointer to a device that the domain represent, and that will be
+ *       used for power management purposes.
  * @parent: Pointer to parent irq_domain to support hierarchy irq_domains
  *
  * Revmap data, used internally by irq_domain
@@ -171,6 +173,7 @@ struct irq_domain {
 	struct fwnode_handle *fwnode;
 	enum irq_domain_bus_token bus_token;
 	struct irq_domain_chip_generic *gc;
+	struct device *dev;
 #ifdef	CONFIG_IRQ_DOMAIN_HIERARCHY
 	struct irq_domain *parent;
 #endif
@@ -226,6 +229,13 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
 	return to_of_node(d->fwnode);
 }
 
+static inline void irq_domain_set_pm_device(struct irq_domain *d,
+					    struct device *dev)
+{
+	if (d)
+		d->dev = dev;
+}
+
 #ifdef CONFIG_IRQ_DOMAIN
 struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id,
 						const char *name, phys_addr_t *pa);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index c09324663088..a2a12cdbe872 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1558,6 +1558,17 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 	return 0;
 }
 
+static struct device *irq_get_parent_device(struct irq_data *data)
+{
+	if (data->chip->parent_device)
+		return data->chip->parent_device;
+
+	if (data->domain)
+		return data->domain->dev;
+
+	return NULL;
+}
+
 /**
  * irq_chip_pm_get - Enable power for an IRQ chip
  * @data:	Pointer to interrupt specific data
@@ -1567,12 +1578,13 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
  */
 int irq_chip_pm_get(struct irq_data *data)
 {
+	struct device *dev = irq_get_parent_device(data);
 	int retval;
 
-	if (IS_ENABLED(CONFIG_PM) && data->chip->parent_device) {
-		retval = pm_runtime_get_sync(data->chip->parent_device);
+	if (IS_ENABLED(CONFIG_PM) && dev) {
+		retval = pm_runtime_get_sync(dev);
 		if (retval < 0) {
-			pm_runtime_put_noidle(data->chip->parent_device);
+			pm_runtime_put_noidle(dev);
 			return retval;
 		}
 	}
@@ -1590,10 +1602,11 @@ int irq_chip_pm_get(struct irq_data *data)
  */
 int irq_chip_pm_put(struct irq_data *data)
 {
+	struct device *dev = irq_get_parent_device(data);
 	int retval = 0;
 
-	if (IS_ENABLED(CONFIG_PM) && data->chip->parent_device)
-		retval = pm_runtime_put(data->chip->parent_device);
+	if (IS_ENABLED(CONFIG_PM) && dev)
+		retval = pm_runtime_put(dev);
 
 	return (retval < 0) ? retval : 0;
 }
-- 
2.30.2


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

* [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
@ 2022-02-01 12:02   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:02 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

As a preparation to moving the reference to the device used for
runtime power management, add a new 'dev' field to the irqdomain
structure for that exact purpose.

The irq_chip_pm_{get,put}() helpers are made aware of the dual
location via a new private helper.

No functional change intended.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/irqdomain.h | 10 ++++++++++
 kernel/irq/chip.c         | 23 ++++++++++++++++++-----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index d476405802e9..be25a33293e5 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -151,6 +151,8 @@ struct irq_domain_chip_generic;
  * @gc: Pointer to a list of generic chips. There is a helper function for
  *      setting up one or more generic chips for interrupt controllers
  *      drivers using the generic chip library which uses this pointer.
+ * @dev: Pointer to a device that the domain represent, and that will be
+ *       used for power management purposes.
  * @parent: Pointer to parent irq_domain to support hierarchy irq_domains
  *
  * Revmap data, used internally by irq_domain
@@ -171,6 +173,7 @@ struct irq_domain {
 	struct fwnode_handle *fwnode;
 	enum irq_domain_bus_token bus_token;
 	struct irq_domain_chip_generic *gc;
+	struct device *dev;
 #ifdef	CONFIG_IRQ_DOMAIN_HIERARCHY
 	struct irq_domain *parent;
 #endif
@@ -226,6 +229,13 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
 	return to_of_node(d->fwnode);
 }
 
+static inline void irq_domain_set_pm_device(struct irq_domain *d,
+					    struct device *dev)
+{
+	if (d)
+		d->dev = dev;
+}
+
 #ifdef CONFIG_IRQ_DOMAIN
 struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id,
 						const char *name, phys_addr_t *pa);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index c09324663088..a2a12cdbe872 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1558,6 +1558,17 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 	return 0;
 }
 
+static struct device *irq_get_parent_device(struct irq_data *data)
+{
+	if (data->chip->parent_device)
+		return data->chip->parent_device;
+
+	if (data->domain)
+		return data->domain->dev;
+
+	return NULL;
+}
+
 /**
  * irq_chip_pm_get - Enable power for an IRQ chip
  * @data:	Pointer to interrupt specific data
@@ -1567,12 +1578,13 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
  */
 int irq_chip_pm_get(struct irq_data *data)
 {
+	struct device *dev = irq_get_parent_device(data);
 	int retval;
 
-	if (IS_ENABLED(CONFIG_PM) && data->chip->parent_device) {
-		retval = pm_runtime_get_sync(data->chip->parent_device);
+	if (IS_ENABLED(CONFIG_PM) && dev) {
+		retval = pm_runtime_get_sync(dev);
 		if (retval < 0) {
-			pm_runtime_put_noidle(data->chip->parent_device);
+			pm_runtime_put_noidle(dev);
 			return retval;
 		}
 	}
@@ -1590,10 +1602,11 @@ int irq_chip_pm_get(struct irq_data *data)
  */
 int irq_chip_pm_put(struct irq_data *data)
 {
+	struct device *dev = irq_get_parent_device(data);
 	int retval = 0;
 
-	if (IS_ENABLED(CONFIG_PM) && data->chip->parent_device)
-		retval = pm_runtime_put(data->chip->parent_device);
+	if (IS_ENABLED(CONFIG_PM) && dev)
+		retval = pm_runtime_put(dev);
 
 	return (retval < 0) ? retval : 0;
 }
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
@ 2022-02-01 12:02   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:02 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

As a preparation to moving the reference to the device used for
runtime power management, add a new 'dev' field to the irqdomain
structure for that exact purpose.

The irq_chip_pm_{get,put}() helpers are made aware of the dual
location via a new private helper.

No functional change intended.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/irqdomain.h | 10 ++++++++++
 kernel/irq/chip.c         | 23 ++++++++++++++++++-----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index d476405802e9..be25a33293e5 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -151,6 +151,8 @@ struct irq_domain_chip_generic;
  * @gc: Pointer to a list of generic chips. There is a helper function for
  *      setting up one or more generic chips for interrupt controllers
  *      drivers using the generic chip library which uses this pointer.
+ * @dev: Pointer to a device that the domain represent, and that will be
+ *       used for power management purposes.
  * @parent: Pointer to parent irq_domain to support hierarchy irq_domains
  *
  * Revmap data, used internally by irq_domain
@@ -171,6 +173,7 @@ struct irq_domain {
 	struct fwnode_handle *fwnode;
 	enum irq_domain_bus_token bus_token;
 	struct irq_domain_chip_generic *gc;
+	struct device *dev;
 #ifdef	CONFIG_IRQ_DOMAIN_HIERARCHY
 	struct irq_domain *parent;
 #endif
@@ -226,6 +229,13 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
 	return to_of_node(d->fwnode);
 }
 
+static inline void irq_domain_set_pm_device(struct irq_domain *d,
+					    struct device *dev)
+{
+	if (d)
+		d->dev = dev;
+}
+
 #ifdef CONFIG_IRQ_DOMAIN
 struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id,
 						const char *name, phys_addr_t *pa);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index c09324663088..a2a12cdbe872 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1558,6 +1558,17 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 	return 0;
 }
 
+static struct device *irq_get_parent_device(struct irq_data *data)
+{
+	if (data->chip->parent_device)
+		return data->chip->parent_device;
+
+	if (data->domain)
+		return data->domain->dev;
+
+	return NULL;
+}
+
 /**
  * irq_chip_pm_get - Enable power for an IRQ chip
  * @data:	Pointer to interrupt specific data
@@ -1567,12 +1578,13 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
  */
 int irq_chip_pm_get(struct irq_data *data)
 {
+	struct device *dev = irq_get_parent_device(data);
 	int retval;
 
-	if (IS_ENABLED(CONFIG_PM) && data->chip->parent_device) {
-		retval = pm_runtime_get_sync(data->chip->parent_device);
+	if (IS_ENABLED(CONFIG_PM) && dev) {
+		retval = pm_runtime_get_sync(dev);
 		if (retval < 0) {
-			pm_runtime_put_noidle(data->chip->parent_device);
+			pm_runtime_put_noidle(dev);
 			return retval;
 		}
 	}
@@ -1590,10 +1602,11 @@ int irq_chip_pm_get(struct irq_data *data)
  */
 int irq_chip_pm_put(struct irq_data *data)
 {
+	struct device *dev = irq_get_parent_device(data);
 	int retval = 0;
 
-	if (IS_ENABLED(CONFIG_PM) && data->chip->parent_device)
-		retval = pm_runtime_put(data->chip->parent_device);
+	if (IS_ENABLED(CONFIG_PM) && dev)
+		retval = pm_runtime_put(dev);
 
 	return (retval < 0) ? retval : 0;
 }
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 02/12] irqchip/gic: Move PM device over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the GIC device over to the irq domain.
This allows for some localised cleanup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/irq-gic.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index b8bb46c65a97..fb741b42ca2d 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -1127,13 +1127,12 @@ static const struct irq_domain_ops gic_irq_domain_ops = {
 	.unmap = gic_irq_domain_unmap,
 };
 
-static void gic_init_chip(struct gic_chip_data *gic, struct device *dev,
-			  const char *name, bool use_eoimode1)
+static void gic_init_chip(struct gic_chip_data *gic, const char *name,
+			  bool use_eoimode1)
 {
 	/* Initialize irq_chip */
 	gic->chip = gic_chip;
 	gic->chip.name = name;
-	gic->chip.parent_device = dev;
 
 	if (use_eoimode1) {
 		gic->chip.irq_mask = gic_eoimode1_mask_irq;
@@ -1268,10 +1267,10 @@ static int __init __gic_init_bases(struct gic_chip_data *gic,
 
 	if (static_branch_likely(&supports_deactivate_key) && gic == &gic_data[0]) {
 		name = kasprintf(GFP_KERNEL, "GICv2");
-		gic_init_chip(gic, NULL, name, true);
+		gic_init_chip(gic, name, true);
 	} else {
 		name = kasprintf(GFP_KERNEL, "GIC-%d", (int)(gic-&gic_data[0]));
-		gic_init_chip(gic, NULL, name, false);
+		gic_init_chip(gic, name, false);
 	}
 
 	ret = gic_init_bases(gic, handle);
@@ -1460,7 +1459,7 @@ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
 	if (!*gic)
 		return -ENOMEM;
 
-	gic_init_chip(*gic, dev, dev->of_node->name, false);
+	gic_init_chip(*gic, dev->of_node->name, false);
 
 	ret = gic_of_setup(*gic, dev->of_node);
 	if (ret)
@@ -1472,6 +1471,7 @@ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
 		return ret;
 	}
 
+	irq_domain_set_pm_device((*gic)->domain, dev);
 	irq_set_chained_handler_and_data(irq, gic_handle_cascade_irq, *gic);
 
 	return 0;
-- 
2.30.2


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

* [PATCH 02/12] irqchip/gic: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the GIC device over to the irq domain.
This allows for some localised cleanup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/irq-gic.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index b8bb46c65a97..fb741b42ca2d 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -1127,13 +1127,12 @@ static const struct irq_domain_ops gic_irq_domain_ops = {
 	.unmap = gic_irq_domain_unmap,
 };
 
-static void gic_init_chip(struct gic_chip_data *gic, struct device *dev,
-			  const char *name, bool use_eoimode1)
+static void gic_init_chip(struct gic_chip_data *gic, const char *name,
+			  bool use_eoimode1)
 {
 	/* Initialize irq_chip */
 	gic->chip = gic_chip;
 	gic->chip.name = name;
-	gic->chip.parent_device = dev;
 
 	if (use_eoimode1) {
 		gic->chip.irq_mask = gic_eoimode1_mask_irq;
@@ -1268,10 +1267,10 @@ static int __init __gic_init_bases(struct gic_chip_data *gic,
 
 	if (static_branch_likely(&supports_deactivate_key) && gic == &gic_data[0]) {
 		name = kasprintf(GFP_KERNEL, "GICv2");
-		gic_init_chip(gic, NULL, name, true);
+		gic_init_chip(gic, name, true);
 	} else {
 		name = kasprintf(GFP_KERNEL, "GIC-%d", (int)(gic-&gic_data[0]));
-		gic_init_chip(gic, NULL, name, false);
+		gic_init_chip(gic, name, false);
 	}
 
 	ret = gic_init_bases(gic, handle);
@@ -1460,7 +1459,7 @@ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
 	if (!*gic)
 		return -ENOMEM;
 
-	gic_init_chip(*gic, dev, dev->of_node->name, false);
+	gic_init_chip(*gic, dev->of_node->name, false);
 
 	ret = gic_of_setup(*gic, dev->of_node);
 	if (ret)
@@ -1472,6 +1471,7 @@ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
 		return ret;
 	}
 
+	irq_domain_set_pm_device((*gic)->domain, dev);
 	irq_set_chained_handler_and_data(irq, gic_handle_cascade_irq, *gic);
 
 	return 0;
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 02/12] irqchip/gic: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the GIC device over to the irq domain.
This allows for some localised cleanup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/irq-gic.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index b8bb46c65a97..fb741b42ca2d 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -1127,13 +1127,12 @@ static const struct irq_domain_ops gic_irq_domain_ops = {
 	.unmap = gic_irq_domain_unmap,
 };
 
-static void gic_init_chip(struct gic_chip_data *gic, struct device *dev,
-			  const char *name, bool use_eoimode1)
+static void gic_init_chip(struct gic_chip_data *gic, const char *name,
+			  bool use_eoimode1)
 {
 	/* Initialize irq_chip */
 	gic->chip = gic_chip;
 	gic->chip.name = name;
-	gic->chip.parent_device = dev;
 
 	if (use_eoimode1) {
 		gic->chip.irq_mask = gic_eoimode1_mask_irq;
@@ -1268,10 +1267,10 @@ static int __init __gic_init_bases(struct gic_chip_data *gic,
 
 	if (static_branch_likely(&supports_deactivate_key) && gic == &gic_data[0]) {
 		name = kasprintf(GFP_KERNEL, "GICv2");
-		gic_init_chip(gic, NULL, name, true);
+		gic_init_chip(gic, name, true);
 	} else {
 		name = kasprintf(GFP_KERNEL, "GIC-%d", (int)(gic-&gic_data[0]));
-		gic_init_chip(gic, NULL, name, false);
+		gic_init_chip(gic, name, false);
 	}
 
 	ret = gic_init_bases(gic, handle);
@@ -1460,7 +1459,7 @@ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
 	if (!*gic)
 		return -ENOMEM;
 
-	gic_init_chip(*gic, dev, dev->of_node->name, false);
+	gic_init_chip(*gic, dev->of_node->name, false);
 
 	ret = gic_of_setup(*gic, dev->of_node);
 	if (ret)
@@ -1472,6 +1471,7 @@ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
 		return ret;
 	}
 
+	irq_domain_set_pm_device((*gic)->domain, dev);
 	irq_set_chained_handler_and_data(irq, gic_handle_cascade_irq, *gic);
 
 	return 0;
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 37f9a4499fdb..e83756aca14e 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -508,7 +508,6 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 
 	irq_chip = &p->irq_chip;
 	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;
@@ -523,6 +522,8 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	irq_domain_set_pm_device(p->irq_domain, dev);
+
 	if (p->shared_irqs) {
 		/* request one shared interrupt */
 		if (devm_request_irq(dev, p->irq[0].requested_irq,
-- 
2.30.2


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

* [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 37f9a4499fdb..e83756aca14e 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -508,7 +508,6 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 
 	irq_chip = &p->irq_chip;
 	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;
@@ -523,6 +522,8 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	irq_domain_set_pm_device(p->irq_domain, dev);
+
 	if (p->shared_irqs) {
 		/* request one shared interrupt */
 		if (devm_request_irq(dev, p->irq[0].requested_irq,
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 37f9a4499fdb..e83756aca14e 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -508,7 +508,6 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 
 	irq_chip = &p->irq_chip;
 	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;
@@ -523,6 +522,8 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	irq_domain_set_pm_device(p->irq_domain, dev);
+
 	if (p->shared_irqs) {
 		/* request one shared interrupt */
 		if (devm_request_irq(dev, p->irq[0].requested_irq,
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/12] irqchip/renesas-irqc: Move PM device over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 909325f88239..1ee5e9941f67 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -188,13 +188,14 @@ 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;
 	p->gc->chip_types[0].chip.irq_set_wake	= irqc_irq_set_wake;
 	p->gc->chip_types[0].chip.flags	= IRQCHIP_MASK_ON_SUSPEND;
 
+	irq_domain_set_pm_device(p->irq_domain, dev);
+
 	/* request interrupts one by one */
 	for (k = 0; k < p->number_of_irqs; k++) {
 		if (devm_request_irq(dev, p->irq[k].requested_irq,
-- 
2.30.2


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

* [PATCH 04/12] irqchip/renesas-irqc: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 909325f88239..1ee5e9941f67 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -188,13 +188,14 @@ 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;
 	p->gc->chip_types[0].chip.irq_set_wake	= irqc_irq_set_wake;
 	p->gc->chip_types[0].chip.flags	= IRQCHIP_MASK_ON_SUSPEND;
 
+	irq_domain_set_pm_device(p->irq_domain, dev);
+
 	/* request interrupts one by one */
 	for (k = 0; k < p->number_of_irqs; k++) {
 		if (devm_request_irq(dev, p->irq[k].requested_irq,
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 04/12] irqchip/renesas-irqc: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 909325f88239..1ee5e9941f67 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -188,13 +188,14 @@ 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;
 	p->gc->chip_types[0].chip.irq_set_wake	= irqc_irq_set_wake;
 	p->gc->chip_types[0].chip.flags	= IRQCHIP_MASK_ON_SUSPEND;
 
+	irq_domain_set_pm_device(p->irq_domain, dev);
+
 	/* request interrupts one by one */
 	for (k = 0; k < p->number_of_irqs; k++) {
 		if (devm_request_irq(dev, p->irq[k].requested_irq,
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 05/12] irqchip/imx-intmux: Move PM device over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.
This allows the irq_chip structure to be directly used instead
of taking a copy for each instance.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/irq-imx-intmux.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-intmux.c
index e86ff743e98c..80aaea82468a 100644
--- a/drivers/irqchip/irq-imx-intmux.c
+++ b/drivers/irqchip/irq-imx-intmux.c
@@ -61,7 +61,6 @@
 #define CHAN_MAX_NUM		0x8
 
 struct intmux_irqchip_data {
-	struct irq_chip		chip;
 	u32			saved_reg;
 	int			chanidx;
 	int			irq;
@@ -114,7 +113,7 @@ static void imx_intmux_irq_unmask(struct irq_data *d)
 	raw_spin_unlock_irqrestore(&data->lock, flags);
 }
 
-static struct irq_chip imx_intmux_irq_chip = {
+static struct irq_chip imx_intmux_irq_chip __ro_after_init = {
 	.name		= "intmux",
 	.irq_mask	= imx_intmux_irq_mask,
 	.irq_unmask	= imx_intmux_irq_unmask,
@@ -126,7 +125,7 @@ static int imx_intmux_irq_map(struct irq_domain *h, unsigned int irq,
 	struct intmux_irqchip_data *data = h->host_data;
 
 	irq_set_chip_data(irq, data);
-	irq_set_chip_and_handler(irq, &data->chip, handle_level_irq);
+	irq_set_chip_and_handler(irq, &imx_intmux_irq_chip, handle_level_irq);
 
 	return 0;
 }
@@ -241,8 +240,6 @@ static int imx_intmux_probe(struct platform_device *pdev)
 	}
 
 	for (i = 0; i < channum; i++) {
-		data->irqchip_data[i].chip = imx_intmux_irq_chip;
-		data->irqchip_data[i].chip.parent_device = &pdev->dev;
 		data->irqchip_data[i].chanidx = i;
 
 		data->irqchip_data[i].irq = irq_of_parse_and_map(np, i);
@@ -260,6 +257,7 @@ static int imx_intmux_probe(struct platform_device *pdev)
 			goto out;
 		}
 		data->irqchip_data[i].domain = domain;
+		irq_domain_set_pm_device(domain, &pdev->dev);
 
 		/* disable all interrupt sources of this channel firstly */
 		writel_relaxed(0, data->regs + CHANIER(i));
-- 
2.30.2


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

* [PATCH 05/12] irqchip/imx-intmux: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.
This allows the irq_chip structure to be directly used instead
of taking a copy for each instance.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/irq-imx-intmux.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-intmux.c
index e86ff743e98c..80aaea82468a 100644
--- a/drivers/irqchip/irq-imx-intmux.c
+++ b/drivers/irqchip/irq-imx-intmux.c
@@ -61,7 +61,6 @@
 #define CHAN_MAX_NUM		0x8
 
 struct intmux_irqchip_data {
-	struct irq_chip		chip;
 	u32			saved_reg;
 	int			chanidx;
 	int			irq;
@@ -114,7 +113,7 @@ static void imx_intmux_irq_unmask(struct irq_data *d)
 	raw_spin_unlock_irqrestore(&data->lock, flags);
 }
 
-static struct irq_chip imx_intmux_irq_chip = {
+static struct irq_chip imx_intmux_irq_chip __ro_after_init = {
 	.name		= "intmux",
 	.irq_mask	= imx_intmux_irq_mask,
 	.irq_unmask	= imx_intmux_irq_unmask,
@@ -126,7 +125,7 @@ static int imx_intmux_irq_map(struct irq_domain *h, unsigned int irq,
 	struct intmux_irqchip_data *data = h->host_data;
 
 	irq_set_chip_data(irq, data);
-	irq_set_chip_and_handler(irq, &data->chip, handle_level_irq);
+	irq_set_chip_and_handler(irq, &imx_intmux_irq_chip, handle_level_irq);
 
 	return 0;
 }
@@ -241,8 +240,6 @@ static int imx_intmux_probe(struct platform_device *pdev)
 	}
 
 	for (i = 0; i < channum; i++) {
-		data->irqchip_data[i].chip = imx_intmux_irq_chip;
-		data->irqchip_data[i].chip.parent_device = &pdev->dev;
 		data->irqchip_data[i].chanidx = i;
 
 		data->irqchip_data[i].irq = irq_of_parse_and_map(np, i);
@@ -260,6 +257,7 @@ static int imx_intmux_probe(struct platform_device *pdev)
 			goto out;
 		}
 		data->irqchip_data[i].domain = domain;
+		irq_domain_set_pm_device(domain, &pdev->dev);
 
 		/* disable all interrupt sources of this channel firstly */
 		writel_relaxed(0, data->regs + CHANIER(i));
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 05/12] irqchip/imx-intmux: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.
This allows the irq_chip structure to be directly used instead
of taking a copy for each instance.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/irq-imx-intmux.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-intmux.c
index e86ff743e98c..80aaea82468a 100644
--- a/drivers/irqchip/irq-imx-intmux.c
+++ b/drivers/irqchip/irq-imx-intmux.c
@@ -61,7 +61,6 @@
 #define CHAN_MAX_NUM		0x8
 
 struct intmux_irqchip_data {
-	struct irq_chip		chip;
 	u32			saved_reg;
 	int			chanidx;
 	int			irq;
@@ -114,7 +113,7 @@ static void imx_intmux_irq_unmask(struct irq_data *d)
 	raw_spin_unlock_irqrestore(&data->lock, flags);
 }
 
-static struct irq_chip imx_intmux_irq_chip = {
+static struct irq_chip imx_intmux_irq_chip __ro_after_init = {
 	.name		= "intmux",
 	.irq_mask	= imx_intmux_irq_mask,
 	.irq_unmask	= imx_intmux_irq_unmask,
@@ -126,7 +125,7 @@ static int imx_intmux_irq_map(struct irq_domain *h, unsigned int irq,
 	struct intmux_irqchip_data *data = h->host_data;
 
 	irq_set_chip_data(irq, data);
-	irq_set_chip_and_handler(irq, &data->chip, handle_level_irq);
+	irq_set_chip_and_handler(irq, &imx_intmux_irq_chip, handle_level_irq);
 
 	return 0;
 }
@@ -241,8 +240,6 @@ static int imx_intmux_probe(struct platform_device *pdev)
 	}
 
 	for (i = 0; i < channum; i++) {
-		data->irqchip_data[i].chip = imx_intmux_irq_chip;
-		data->irqchip_data[i].chip.parent_device = &pdev->dev;
 		data->irqchip_data[i].chanidx = i;
 
 		data->irqchip_data[i].irq = irq_of_parse_and_map(np, i);
@@ -260,6 +257,7 @@ static int imx_intmux_probe(struct platform_device *pdev)
 			goto out;
 		}
 		data->irqchip_data[i].domain = domain;
+		irq_domain_set_pm_device(domain, &pdev->dev);
 
 		/* disable all interrupt sources of this channel firstly */
 		writel_relaxed(0, data->regs + CHANIER(i));
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 06/12] gpio: mt7621: Kill parent_device usage
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

This gpio controller sets the parent_device field, but doesn't have
any runtime PM functionality. Get rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-mt7621.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index ccaad1cb3c2e..d8a26e503ca5 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -239,7 +239,6 @@ mediatek_gpio_bank_probe(struct device *dev, int bank)
 
 	rg->chip.offset = bank * MTK_BANK_WIDTH;
 	rg->irq_chip.name = dev_name(dev);
-	rg->irq_chip.parent_device = dev;
 	rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask;
 	rg->irq_chip.irq_mask = mediatek_gpio_irq_mask;
 	rg->irq_chip.irq_mask_ack = mediatek_gpio_irq_mask;
-- 
2.30.2


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

* [PATCH 06/12] gpio: mt7621: Kill parent_device usage
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

This gpio controller sets the parent_device field, but doesn't have
any runtime PM functionality. Get rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-mt7621.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index ccaad1cb3c2e..d8a26e503ca5 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -239,7 +239,6 @@ mediatek_gpio_bank_probe(struct device *dev, int bank)
 
 	rg->chip.offset = bank * MTK_BANK_WIDTH;
 	rg->irq_chip.name = dev_name(dev);
-	rg->irq_chip.parent_device = dev;
 	rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask;
 	rg->irq_chip.irq_mask = mediatek_gpio_irq_mask;
 	rg->irq_chip.irq_mask_ack = mediatek_gpio_irq_mask;
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 06/12] gpio: mt7621: Kill parent_device usage
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

This gpio controller sets the parent_device field, but doesn't have
any runtime PM functionality. Get rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-mt7621.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index ccaad1cb3c2e..d8a26e503ca5 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -239,7 +239,6 @@ mediatek_gpio_bank_probe(struct device *dev, int bank)
 
 	rg->chip.offset = bank * MTK_BANK_WIDTH;
 	rg->irq_chip.name = dev_name(dev);
-	rg->irq_chip.parent_device = dev;
 	rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask;
 	rg->irq_chip.irq_mask = mediatek_gpio_irq_mask;
 	rg->irq_chip.irq_mask_ack = mediatek_gpio_irq_mask;
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 07/12] gpio: omap: Move PM device over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-omap.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index e099c39e0355..80ddc43fd875 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -986,7 +986,8 @@ static void omap_gpio_mod_init(struct gpio_bank *bank)
 		writel_relaxed(0, base + bank->regs->ctrl);
 }
 
-static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
+static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc,
+			       struct device *pm_dev)
 {
 	struct gpio_irq_chip *irq;
 	static int gpio;
@@ -1052,6 +1053,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
 	if (ret)
 		return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n");
 
+	irq_domain_set_pm_device(bank->chip.irq.domain, pm_dev);
 	ret = devm_request_irq(bank->chip.parent, bank->irq,
 			       omap_gpio_irq_handler,
 			       0, dev_name(bank->chip.parent), bank);
@@ -1402,7 +1404,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	irqc->irq_bus_sync_unlock = gpio_irq_bus_sync_unlock,
 	irqc->name = dev_name(&pdev->dev);
 	irqc->flags = IRQCHIP_MASK_ON_SUSPEND;
-	irqc->parent_device = dev;
 
 	bank->irq = platform_get_irq(pdev, 0);
 	if (bank->irq <= 0) {
@@ -1466,7 +1467,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
 
 	omap_gpio_mod_init(bank);
 
-	ret = omap_gpio_chip_init(bank, irqc);
+	ret = omap_gpio_chip_init(bank, irqc, dev);
 	if (ret) {
 		pm_runtime_put_sync(dev);
 		pm_runtime_disable(dev);
-- 
2.30.2


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

* [PATCH 07/12] gpio: omap: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-omap.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index e099c39e0355..80ddc43fd875 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -986,7 +986,8 @@ static void omap_gpio_mod_init(struct gpio_bank *bank)
 		writel_relaxed(0, base + bank->regs->ctrl);
 }
 
-static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
+static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc,
+			       struct device *pm_dev)
 {
 	struct gpio_irq_chip *irq;
 	static int gpio;
@@ -1052,6 +1053,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
 	if (ret)
 		return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n");
 
+	irq_domain_set_pm_device(bank->chip.irq.domain, pm_dev);
 	ret = devm_request_irq(bank->chip.parent, bank->irq,
 			       omap_gpio_irq_handler,
 			       0, dev_name(bank->chip.parent), bank);
@@ -1402,7 +1404,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	irqc->irq_bus_sync_unlock = gpio_irq_bus_sync_unlock,
 	irqc->name = dev_name(&pdev->dev);
 	irqc->flags = IRQCHIP_MASK_ON_SUSPEND;
-	irqc->parent_device = dev;
 
 	bank->irq = platform_get_irq(pdev, 0);
 	if (bank->irq <= 0) {
@@ -1466,7 +1467,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
 
 	omap_gpio_mod_init(bank);
 
-	ret = omap_gpio_chip_init(bank, irqc);
+	ret = omap_gpio_chip_init(bank, irqc, dev);
 	if (ret) {
 		pm_runtime_put_sync(dev);
 		pm_runtime_disable(dev);
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 07/12] gpio: omap: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-omap.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index e099c39e0355..80ddc43fd875 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -986,7 +986,8 @@ static void omap_gpio_mod_init(struct gpio_bank *bank)
 		writel_relaxed(0, base + bank->regs->ctrl);
 }
 
-static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
+static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc,
+			       struct device *pm_dev)
 {
 	struct gpio_irq_chip *irq;
 	static int gpio;
@@ -1052,6 +1053,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
 	if (ret)
 		return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n");
 
+	irq_domain_set_pm_device(bank->chip.irq.domain, pm_dev);
 	ret = devm_request_irq(bank->chip.parent, bank->irq,
 			       omap_gpio_irq_handler,
 			       0, dev_name(bank->chip.parent), bank);
@@ -1402,7 +1404,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	irqc->irq_bus_sync_unlock = gpio_irq_bus_sync_unlock,
 	irqc->name = dev_name(&pdev->dev);
 	irqc->flags = IRQCHIP_MASK_ON_SUSPEND;
-	irqc->parent_device = dev;
 
 	bank->irq = platform_get_irq(pdev, 0);
 	if (bank->irq <= 0) {
@@ -1466,7 +1467,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
 
 	omap_gpio_mod_init(bank);
 
-	ret = omap_gpio_chip_init(bank, irqc);
+	ret = omap_gpio_chip_init(bank, irqc, dev);
 	if (ret) {
 		pm_runtime_put_sync(dev);
 		pm_runtime_disable(dev);
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 08/12] gpio: rcar: Move PM device over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 bd2e16d6e21c..3a76538f27fa 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -530,7 +530,6 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 
 	irq_chip = &p->irq_chip;
 	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;
 	irq_chip->irq_set_type = gpio_rcar_irq_set_type;
@@ -552,6 +551,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	irq_domain_set_pm_device(gpio_chip->irq.domain, dev);
 	ret = devm_request_irq(dev, p->irq_parent, gpio_rcar_irq_handler,
 			       IRQF_SHARED, name, p);
 	if (ret) {
-- 
2.30.2


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

* [PATCH 08/12] gpio: rcar: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 bd2e16d6e21c..3a76538f27fa 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -530,7 +530,6 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 
 	irq_chip = &p->irq_chip;
 	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;
 	irq_chip->irq_set_type = gpio_rcar_irq_set_type;
@@ -552,6 +551,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	irq_domain_set_pm_device(gpio_chip->irq.domain, dev);
 	ret = devm_request_irq(dev, p->irq_parent, gpio_rcar_irq_handler,
 			       IRQF_SHARED, name, p);
 	if (ret) {
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 08/12] gpio: rcar: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 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 bd2e16d6e21c..3a76538f27fa 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -530,7 +530,6 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 
 	irq_chip = &p->irq_chip;
 	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;
 	irq_chip->irq_set_type = gpio_rcar_irq_set_type;
@@ -552,6 +551,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	irq_domain_set_pm_device(gpio_chip->irq.domain, dev);
 	ret = devm_request_irq(dev, p->irq_parent, gpio_rcar_irq_handler,
 			       IRQF_SHARED, name, p);
 	if (ret) {
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 09/12] gpio: tpmx86: Move PM device over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-tqmx86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-tqmx86.c b/drivers/gpio/gpio-tqmx86.c
index 5b103221b58d..fa4bc7481f9a 100644
--- a/drivers/gpio/gpio-tqmx86.c
+++ b/drivers/gpio/gpio-tqmx86.c
@@ -281,7 +281,6 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
 		u8 irq_status;
 
 		irq_chip->name = chip->label;
-		irq_chip->parent_device = &pdev->dev;
 		irq_chip->irq_mask = tqmx86_gpio_irq_mask;
 		irq_chip->irq_unmask = tqmx86_gpio_irq_unmask;
 		irq_chip->irq_set_type = tqmx86_gpio_irq_set_type;
@@ -316,6 +315,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
 		goto out_pm_dis;
 	}
 
+	irq_domain_set_pm_device(girq->domain, dev);
+
 	dev_info(dev, "GPIO functionality initialized with %d pins\n",
 		 chip->ngpio);
 
-- 
2.30.2


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

* [PATCH 09/12] gpio: tpmx86: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-tqmx86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-tqmx86.c b/drivers/gpio/gpio-tqmx86.c
index 5b103221b58d..fa4bc7481f9a 100644
--- a/drivers/gpio/gpio-tqmx86.c
+++ b/drivers/gpio/gpio-tqmx86.c
@@ -281,7 +281,6 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
 		u8 irq_status;
 
 		irq_chip->name = chip->label;
-		irq_chip->parent_device = &pdev->dev;
 		irq_chip->irq_mask = tqmx86_gpio_irq_mask;
 		irq_chip->irq_unmask = tqmx86_gpio_irq_unmask;
 		irq_chip->irq_set_type = tqmx86_gpio_irq_set_type;
@@ -316,6 +315,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
 		goto out_pm_dis;
 	}
 
+	irq_domain_set_pm_device(girq->domain, dev);
+
 	dev_info(dev, "GPIO functionality initialized with %d pins\n",
 		 chip->ngpio);
 
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 09/12] gpio: tpmx86: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/gpio/gpio-tqmx86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-tqmx86.c b/drivers/gpio/gpio-tqmx86.c
index 5b103221b58d..fa4bc7481f9a 100644
--- a/drivers/gpio/gpio-tqmx86.c
+++ b/drivers/gpio/gpio-tqmx86.c
@@ -281,7 +281,6 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
 		u8 irq_status;
 
 		irq_chip->name = chip->label;
-		irq_chip->parent_device = &pdev->dev;
 		irq_chip->irq_mask = tqmx86_gpio_irq_mask;
 		irq_chip->irq_unmask = tqmx86_gpio_irq_unmask;
 		irq_chip->irq_set_type = tqmx86_gpio_irq_set_type;
@@ -316,6 +315,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
 		goto out_pm_dis;
 	}
 
+	irq_domain_set_pm_device(girq->domain, dev);
+
 	dev_info(dev, "GPIO functionality initialized with %d pins\n",
 		 chip->ngpio);
 
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

The npcm driver has a bunch of references to the irq_chip parent_device
field, but never sets it.

Fix it by fishing that reference from somewhere else, but it is
obvious that these debug statements were never used. Also remove
an unused field in a local data structure.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4d81908d6725..3995e5f7f115 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -78,7 +78,6 @@ struct npcm7xx_gpio {
 	struct gpio_chip	gc;
 	int			irqbase;
 	int			irq;
-	void			*priv;
 	struct irq_chip		irq_chip;
 	u32			pinctrl_id;
 	int (*direction_input)(struct gpio_chip *chip, unsigned offset);
@@ -226,7 +225,7 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	chained_irq_enter(chip, desc);
 	sts = ioread32(bank->base + NPCM7XX_GP_N_EVST);
 	en  = ioread32(bank->base + NPCM7XX_GP_N_EVEN);
-	dev_dbg(chip->parent_device, "==> got irq sts %.8x %.8x\n", sts,
+	dev_dbg(bank->gc.parent, "==> got irq sts %.8x %.8x\n", sts,
 		en);
 
 	sts &= en;
@@ -241,33 +240,33 @@ static int npcmgpio_set_irq_type(struct irq_data *d, unsigned int type)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = BIT(d->hwirq);
 
-	dev_dbg(d->chip->parent_device, "setirqtype: %u.%u = %u\n", gpio,
+	dev_dbg(bank->gc.parent, "setirqtype: %u.%u = %u\n", gpio,
 		d->irq, type);
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		dev_dbg(d->chip->parent_device, "edge.rising\n");
+		dev_dbg(bank->gc.parent, "edge.rising\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		dev_dbg(d->chip->parent_device, "edge.falling\n");
+		dev_dbg(bank->gc.parent, "edge.falling\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		dev_dbg(d->chip->parent_device, "edge.both\n");
+		dev_dbg(bank->gc.parent, "edge.both\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		dev_dbg(d->chip->parent_device, "level.low\n");
+		dev_dbg(bank->gc.parent, "level.low\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		dev_dbg(d->chip->parent_device, "level.high\n");
+		dev_dbg(bank->gc.parent, "level.high\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	default:
-		dev_dbg(d->chip->parent_device, "invalid irq type\n");
+		dev_dbg(bank->gc.parent, "invalid irq type\n");
 		return -EINVAL;
 	}
 
@@ -289,7 +288,7 @@ static void npcmgpio_irq_ack(struct irq_data *d)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = d->hwirq;
 
-	dev_dbg(d->chip->parent_device, "irq_ack: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_ack: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVST);
 }
 
@@ -301,7 +300,7 @@ static void npcmgpio_irq_mask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Clear events */
-	dev_dbg(d->chip->parent_device, "irq_mask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_mask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENC);
 }
 
@@ -313,7 +312,7 @@ static void npcmgpio_irq_unmask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Enable events */
-	dev_dbg(d->chip->parent_device, "irq_unmask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_unmask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENS);
 }
 
@@ -323,7 +322,7 @@ static unsigned int npcmgpio_irq_startup(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* active-high, input, clear interrupt, enable interrupt */
-	dev_dbg(d->chip->parent_device, "startup: %u.%u\n", gpio, d->irq);
+	dev_dbg(gc_parent, "startup: %u.%u\n", gpio, d->irq);
 	npcmgpio_direction_input(gc, gpio);
 	npcmgpio_irq_ack(d);
 	npcmgpio_irq_unmask(d);
-- 
2.30.2


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

* [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

The npcm driver has a bunch of references to the irq_chip parent_device
field, but never sets it.

Fix it by fishing that reference from somewhere else, but it is
obvious that these debug statements were never used. Also remove
an unused field in a local data structure.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4d81908d6725..3995e5f7f115 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -78,7 +78,6 @@ struct npcm7xx_gpio {
 	struct gpio_chip	gc;
 	int			irqbase;
 	int			irq;
-	void			*priv;
 	struct irq_chip		irq_chip;
 	u32			pinctrl_id;
 	int (*direction_input)(struct gpio_chip *chip, unsigned offset);
@@ -226,7 +225,7 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	chained_irq_enter(chip, desc);
 	sts = ioread32(bank->base + NPCM7XX_GP_N_EVST);
 	en  = ioread32(bank->base + NPCM7XX_GP_N_EVEN);
-	dev_dbg(chip->parent_device, "==> got irq sts %.8x %.8x\n", sts,
+	dev_dbg(bank->gc.parent, "==> got irq sts %.8x %.8x\n", sts,
 		en);
 
 	sts &= en;
@@ -241,33 +240,33 @@ static int npcmgpio_set_irq_type(struct irq_data *d, unsigned int type)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = BIT(d->hwirq);
 
-	dev_dbg(d->chip->parent_device, "setirqtype: %u.%u = %u\n", gpio,
+	dev_dbg(bank->gc.parent, "setirqtype: %u.%u = %u\n", gpio,
 		d->irq, type);
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		dev_dbg(d->chip->parent_device, "edge.rising\n");
+		dev_dbg(bank->gc.parent, "edge.rising\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		dev_dbg(d->chip->parent_device, "edge.falling\n");
+		dev_dbg(bank->gc.parent, "edge.falling\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		dev_dbg(d->chip->parent_device, "edge.both\n");
+		dev_dbg(bank->gc.parent, "edge.both\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		dev_dbg(d->chip->parent_device, "level.low\n");
+		dev_dbg(bank->gc.parent, "level.low\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		dev_dbg(d->chip->parent_device, "level.high\n");
+		dev_dbg(bank->gc.parent, "level.high\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	default:
-		dev_dbg(d->chip->parent_device, "invalid irq type\n");
+		dev_dbg(bank->gc.parent, "invalid irq type\n");
 		return -EINVAL;
 	}
 
@@ -289,7 +288,7 @@ static void npcmgpio_irq_ack(struct irq_data *d)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = d->hwirq;
 
-	dev_dbg(d->chip->parent_device, "irq_ack: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_ack: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVST);
 }
 
@@ -301,7 +300,7 @@ static void npcmgpio_irq_mask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Clear events */
-	dev_dbg(d->chip->parent_device, "irq_mask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_mask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENC);
 }
 
@@ -313,7 +312,7 @@ static void npcmgpio_irq_unmask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Enable events */
-	dev_dbg(d->chip->parent_device, "irq_unmask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_unmask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENS);
 }
 
@@ -323,7 +322,7 @@ static unsigned int npcmgpio_irq_startup(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* active-high, input, clear interrupt, enable interrupt */
-	dev_dbg(d->chip->parent_device, "startup: %u.%u\n", gpio, d->irq);
+	dev_dbg(gc_parent, "startup: %u.%u\n", gpio, d->irq);
 	npcmgpio_direction_input(gc, gpio);
 	npcmgpio_irq_ack(d);
 	npcmgpio_irq_unmask(d);
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

The npcm driver has a bunch of references to the irq_chip parent_device
field, but never sets it.

Fix it by fishing that reference from somewhere else, but it is
obvious that these debug statements were never used. Also remove
an unused field in a local data structure.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4d81908d6725..3995e5f7f115 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -78,7 +78,6 @@ struct npcm7xx_gpio {
 	struct gpio_chip	gc;
 	int			irqbase;
 	int			irq;
-	void			*priv;
 	struct irq_chip		irq_chip;
 	u32			pinctrl_id;
 	int (*direction_input)(struct gpio_chip *chip, unsigned offset);
@@ -226,7 +225,7 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	chained_irq_enter(chip, desc);
 	sts = ioread32(bank->base + NPCM7XX_GP_N_EVST);
 	en  = ioread32(bank->base + NPCM7XX_GP_N_EVEN);
-	dev_dbg(chip->parent_device, "==> got irq sts %.8x %.8x\n", sts,
+	dev_dbg(bank->gc.parent, "==> got irq sts %.8x %.8x\n", sts,
 		en);
 
 	sts &= en;
@@ -241,33 +240,33 @@ static int npcmgpio_set_irq_type(struct irq_data *d, unsigned int type)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = BIT(d->hwirq);
 
-	dev_dbg(d->chip->parent_device, "setirqtype: %u.%u = %u\n", gpio,
+	dev_dbg(bank->gc.parent, "setirqtype: %u.%u = %u\n", gpio,
 		d->irq, type);
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		dev_dbg(d->chip->parent_device, "edge.rising\n");
+		dev_dbg(bank->gc.parent, "edge.rising\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		dev_dbg(d->chip->parent_device, "edge.falling\n");
+		dev_dbg(bank->gc.parent, "edge.falling\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		dev_dbg(d->chip->parent_device, "edge.both\n");
+		dev_dbg(bank->gc.parent, "edge.both\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		dev_dbg(d->chip->parent_device, "level.low\n");
+		dev_dbg(bank->gc.parent, "level.low\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		dev_dbg(d->chip->parent_device, "level.high\n");
+		dev_dbg(bank->gc.parent, "level.high\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	default:
-		dev_dbg(d->chip->parent_device, "invalid irq type\n");
+		dev_dbg(bank->gc.parent, "invalid irq type\n");
 		return -EINVAL;
 	}
 
@@ -289,7 +288,7 @@ static void npcmgpio_irq_ack(struct irq_data *d)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = d->hwirq;
 
-	dev_dbg(d->chip->parent_device, "irq_ack: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_ack: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVST);
 }
 
@@ -301,7 +300,7 @@ static void npcmgpio_irq_mask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Clear events */
-	dev_dbg(d->chip->parent_device, "irq_mask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_mask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENC);
 }
 
@@ -313,7 +312,7 @@ static void npcmgpio_irq_unmask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Enable events */
-	dev_dbg(d->chip->parent_device, "irq_unmask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_unmask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENS);
 }
 
@@ -323,7 +322,7 @@ static unsigned int npcmgpio_irq_startup(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* active-high, input, clear interrupt, enable interrupt */
-	dev_dbg(d->chip->parent_device, "startup: %u.%u\n", gpio, d->irq);
+	dev_dbg(gc_parent, "startup: %u.%u\n", gpio, d->irq);
 	npcmgpio_direction_input(gc, gpio);
 	npcmgpio_irq_ack(d);
 	npcmgpio_irq_unmask(d);
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/pinctrl/pinctrl-starfive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index 0b912152a405..5be9866c2b3c 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
 	sfp->gc.base = -1;
 	sfp->gc.ngpio = NR_GPIOS;
 
-	starfive_irq_chip.parent_device = dev;
 	starfive_irq_chip.name = sfp->gc.label;
 
 	sfp->gc.irq.chip = &starfive_irq_chip;
@@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "could not register gpiochip\n");
 
+	irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
+
 out_pinctrl_enable:
 	return pinctrl_enable(sfp->pctl);
 }
-- 
2.30.2


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

* [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/pinctrl/pinctrl-starfive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index 0b912152a405..5be9866c2b3c 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
 	sfp->gc.base = -1;
 	sfp->gc.ngpio = NR_GPIOS;
 
-	starfive_irq_chip.parent_device = dev;
 	starfive_irq_chip.name = sfp->gc.label;
 
 	sfp->gc.irq.chip = &starfive_irq_chip;
@@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "could not register gpiochip\n");
 
+	irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
+
 out_pinctrl_enable:
 	return pinctrl_enable(sfp->pctl);
 }
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/pinctrl/pinctrl-starfive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index 0b912152a405..5be9866c2b3c 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
 	sfp->gc.base = -1;
 	sfp->gc.ngpio = NR_GPIOS;
 
-	starfive_irq_chip.parent_device = dev;
 	starfive_irq_chip.name = sfp->gc.label;
 
 	sfp->gc.irq.chip = &starfive_irq_chip;
@@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "could not register gpiochip\n");
 
+	irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
+
 out_pinctrl_enable:
 	return pinctrl_enable(sfp->pctl);
 }
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 12/12] genirq: Kill irq_chip::parent_device
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-01 12:03   ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Now that noone is using irq_chip::parent_device in the tree, get
rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/irq.h | 2 --
 kernel/irq/chip.c   | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 848e1e12c5c6..2cb2e2ac2703 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -456,7 +456,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
 /**
  * struct irq_chip - hardware interrupt chip descriptor
  *
- * @parent_device:	pointer to parent device for irqchip
  * @name:		name for /proc/interrupts
  * @irq_startup:	start up the interrupt (defaults to ->enable if NULL)
  * @irq_shutdown:	shut down the interrupt (defaults to ->disable if NULL)
@@ -503,7 +502,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
  * @flags:		chip specific flags
  */
 struct irq_chip {
-	struct device	*parent_device;
 	const char	*name;
 	unsigned int	(*irq_startup)(struct irq_data *data);
 	void		(*irq_shutdown)(struct irq_data *data);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index a2a12cdbe872..24b6f2b40e5e 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1560,9 +1560,6 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 
 static struct device *irq_get_parent_device(struct irq_data *data)
 {
-	if (data->chip->parent_device)
-		return data->chip->parent_device;
-
 	if (data->domain)
 		return data->domain->dev;
 
-- 
2.30.2


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

* [PATCH 12/12] genirq: Kill irq_chip::parent_device
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Now that noone is using irq_chip::parent_device in the tree, get
rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/irq.h | 2 --
 kernel/irq/chip.c   | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 848e1e12c5c6..2cb2e2ac2703 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -456,7 +456,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
 /**
  * struct irq_chip - hardware interrupt chip descriptor
  *
- * @parent_device:	pointer to parent device for irqchip
  * @name:		name for /proc/interrupts
  * @irq_startup:	start up the interrupt (defaults to ->enable if NULL)
  * @irq_shutdown:	shut down the interrupt (defaults to ->disable if NULL)
@@ -503,7 +502,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
  * @flags:		chip specific flags
  */
 struct irq_chip {
-	struct device	*parent_device;
 	const char	*name;
 	unsigned int	(*irq_startup)(struct irq_data *data);
 	void		(*irq_shutdown)(struct irq_data *data);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index a2a12cdbe872..24b6f2b40e5e 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1560,9 +1560,6 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 
 static struct device *irq_get_parent_device(struct irq_data *data)
 {
-	if (data->chip->parent_device)
-		return data->chip->parent_device;
-
 	if (data->domain)
 		return data->domain->dev;
 
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH 12/12] genirq: Kill irq_chip::parent_device
@ 2022-02-01 12:03   ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 12:03 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel, linux-omap
  Cc: Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Now that noone is using irq_chip::parent_device in the tree, get
rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 include/linux/irq.h | 2 --
 kernel/irq/chip.c   | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 848e1e12c5c6..2cb2e2ac2703 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -456,7 +456,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
 /**
  * struct irq_chip - hardware interrupt chip descriptor
  *
- * @parent_device:	pointer to parent device for irqchip
  * @name:		name for /proc/interrupts
  * @irq_startup:	start up the interrupt (defaults to ->enable if NULL)
  * @irq_shutdown:	shut down the interrupt (defaults to ->disable if NULL)
@@ -503,7 +502,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
  * @flags:		chip specific flags
  */
 struct irq_chip {
-	struct device	*parent_device;
 	const char	*name;
 	unsigned int	(*irq_startup)(struct irq_data *data);
 	void		(*irq_shutdown)(struct irq_data *data);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index a2a12cdbe872..24b6f2b40e5e 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1560,9 +1560,6 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 
 static struct device *irq_get_parent_device(struct irq_data *data)
 {
-	if (data->chip->parent_device)
-		return data->chip->parent_device;
-
 	if (data->domain)
 		return data->domain->dev;
 
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
  (?)
@ 2022-02-01 15:16     ` Emil Renner Berthing
  -1 siblings, 0 replies; 94+ messages in thread
From: Emil Renner Berthing @ 2022-02-01 15:16 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
>
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> index 0b912152a405..5be9866c2b3c 100644
> --- a/drivers/pinctrl/pinctrl-starfive.c
> +++ b/drivers/pinctrl/pinctrl-starfive.c
> @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
>         sfp->gc.base = -1;
>         sfp->gc.ngpio = NR_GPIOS;
>
> -       starfive_irq_chip.parent_device = dev;
>         starfive_irq_chip.name = sfp->gc.label;
>
>         sfp->gc.irq.chip = &starfive_irq_chip;
> @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
>         if (ret)
>                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
>
> +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> +

The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
shouldn't this be set before registering the gpio_chip with
devm_gpiochip_add_data above?

>  out_pinctrl_enable:
>         return pinctrl_enable(sfp->pctl);
>  }
> --
> 2.30.2
>

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
@ 2022-02-01 15:16     ` Emil Renner Berthing
  0 siblings, 0 replies; 94+ messages in thread
From: Emil Renner Berthing @ 2022-02-01 15:16 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
>
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> index 0b912152a405..5be9866c2b3c 100644
> --- a/drivers/pinctrl/pinctrl-starfive.c
> +++ b/drivers/pinctrl/pinctrl-starfive.c
> @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
>         sfp->gc.base = -1;
>         sfp->gc.ngpio = NR_GPIOS;
>
> -       starfive_irq_chip.parent_device = dev;
>         starfive_irq_chip.name = sfp->gc.label;
>
>         sfp->gc.irq.chip = &starfive_irq_chip;
> @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
>         if (ret)
>                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
>
> +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> +

The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
shouldn't this be set before registering the gpio_chip with
devm_gpiochip_add_data above?

>  out_pinctrl_enable:
>         return pinctrl_enable(sfp->pctl);
>  }
> --
> 2.30.2
>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
@ 2022-02-01 15:16     ` Emil Renner Berthing
  0 siblings, 0 replies; 94+ messages in thread
From: Emil Renner Berthing @ 2022-02-01 15:16 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
>
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> index 0b912152a405..5be9866c2b3c 100644
> --- a/drivers/pinctrl/pinctrl-starfive.c
> +++ b/drivers/pinctrl/pinctrl-starfive.c
> @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
>         sfp->gc.base = -1;
>         sfp->gc.ngpio = NR_GPIOS;
>
> -       starfive_irq_chip.parent_device = dev;
>         starfive_irq_chip.name = sfp->gc.label;
>
>         sfp->gc.irq.chip = &starfive_irq_chip;
> @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
>         if (ret)
>                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
>
> +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> +

The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
shouldn't this be set before registering the gpio_chip with
devm_gpiochip_add_data above?

>  out_pinctrl_enable:
>         return pinctrl_enable(sfp->pctl);
>  }
> --
> 2.30.2
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
  2022-02-01 15:16     ` Emil Renner Berthing
  (?)
@ 2022-02-01 15:30       ` Emil Renner Berthing
  -1 siblings, 0 replies; 94+ messages in thread
From: Emil Renner Berthing @ 2022-02-01 15:30 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 1 Feb 2022 at 16:16, Emil Renner Berthing <kernel@esmil.dk> wrote:
> On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
> >
> > Move the reference to the device over to the irq domain.
> >
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> >  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> > index 0b912152a405..5be9866c2b3c 100644
> > --- a/drivers/pinctrl/pinctrl-starfive.c
> > +++ b/drivers/pinctrl/pinctrl-starfive.c
> > @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
> >         sfp->gc.base = -1;
> >         sfp->gc.ngpio = NR_GPIOS;
> >
> > -       starfive_irq_chip.parent_device = dev;
> >         starfive_irq_chip.name = sfp->gc.label;
> >
> >         sfp->gc.irq.chip = &starfive_irq_chip;
> > @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
> >         if (ret)
> >                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
> >
> > +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> > +
>
> The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
> shouldn't this be set before registering the gpio_chip with
> devm_gpiochip_add_data above?

Ah, no. sfp->gc.irq.domain is a pointer to an irq_domain that is
initialised when adding the gpio_chip.

Reviewed-by: Emil Renner Berthing <kernel@esmil.dk>

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
@ 2022-02-01 15:30       ` Emil Renner Berthing
  0 siblings, 0 replies; 94+ messages in thread
From: Emil Renner Berthing @ 2022-02-01 15:30 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 1 Feb 2022 at 16:16, Emil Renner Berthing <kernel@esmil.dk> wrote:
> On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
> >
> > Move the reference to the device over to the irq domain.
> >
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> >  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> > index 0b912152a405..5be9866c2b3c 100644
> > --- a/drivers/pinctrl/pinctrl-starfive.c
> > +++ b/drivers/pinctrl/pinctrl-starfive.c
> > @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
> >         sfp->gc.base = -1;
> >         sfp->gc.ngpio = NR_GPIOS;
> >
> > -       starfive_irq_chip.parent_device = dev;
> >         starfive_irq_chip.name = sfp->gc.label;
> >
> >         sfp->gc.irq.chip = &starfive_irq_chip;
> > @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
> >         if (ret)
> >                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
> >
> > +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> > +
>
> The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
> shouldn't this be set before registering the gpio_chip with
> devm_gpiochip_add_data above?

Ah, no. sfp->gc.irq.domain is a pointer to an irq_domain that is
initialised when adding the gpio_chip.

Reviewed-by: Emil Renner Berthing <kernel@esmil.dk>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
@ 2022-02-01 15:30       ` Emil Renner Berthing
  0 siblings, 0 replies; 94+ messages in thread
From: Emil Renner Berthing @ 2022-02-01 15:30 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 1 Feb 2022 at 16:16, Emil Renner Berthing <kernel@esmil.dk> wrote:
> On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
> >
> > Move the reference to the device over to the irq domain.
> >
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> >  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> > index 0b912152a405..5be9866c2b3c 100644
> > --- a/drivers/pinctrl/pinctrl-starfive.c
> > +++ b/drivers/pinctrl/pinctrl-starfive.c
> > @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
> >         sfp->gc.base = -1;
> >         sfp->gc.ngpio = NR_GPIOS;
> >
> > -       starfive_irq_chip.parent_device = dev;
> >         starfive_irq_chip.name = sfp->gc.label;
> >
> >         sfp->gc.irq.chip = &starfive_irq_chip;
> > @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
> >         if (ret)
> >                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
> >
> > +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> > +
>
> The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
> shouldn't this be set before registering the gpio_chip with
> devm_gpiochip_add_data above?

Ah, no. sfp->gc.irq.domain is a pointer to an irq_domain that is
initialised when adding the gpio_chip.

Reviewed-by: Emil Renner Berthing <kernel@esmil.dk>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
  2022-02-01 15:16     ` Emil Renner Berthing
  (?)
@ 2022-02-01 16:06       ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 16:06 UTC (permalink / raw)
  To: Emil Renner Berthing
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 01 Feb 2022 15:16:39 +0000,
Emil Renner Berthing <kernel@esmil.dk> wrote:
> 
> On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
> >
> > Move the reference to the device over to the irq domain.
> >
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> >  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> > index 0b912152a405..5be9866c2b3c 100644
> > --- a/drivers/pinctrl/pinctrl-starfive.c
> > +++ b/drivers/pinctrl/pinctrl-starfive.c
> > @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
> >         sfp->gc.base = -1;
> >         sfp->gc.ngpio = NR_GPIOS;
> >
> > -       starfive_irq_chip.parent_device = dev;
> >         starfive_irq_chip.name = sfp->gc.label;
> >
> >         sfp->gc.irq.chip = &starfive_irq_chip;
> > @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
> >         if (ret)
> >                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
> >
> > +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> > +
> 
> The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
> shouldn't this be set before registering the gpio_chip with
> devm_gpiochip_add_data above?

It is devm_gpiochip_add_data() that create the domain, so there is
nothing to set before.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
@ 2022-02-01 16:06       ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 16:06 UTC (permalink / raw)
  To: Emil Renner Berthing
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 01 Feb 2022 15:16:39 +0000,
Emil Renner Berthing <kernel@esmil.dk> wrote:
> 
> On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
> >
> > Move the reference to the device over to the irq domain.
> >
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> >  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> > index 0b912152a405..5be9866c2b3c 100644
> > --- a/drivers/pinctrl/pinctrl-starfive.c
> > +++ b/drivers/pinctrl/pinctrl-starfive.c
> > @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
> >         sfp->gc.base = -1;
> >         sfp->gc.ngpio = NR_GPIOS;
> >
> > -       starfive_irq_chip.parent_device = dev;
> >         starfive_irq_chip.name = sfp->gc.label;
> >
> >         sfp->gc.irq.chip = &starfive_irq_chip;
> > @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
> >         if (ret)
> >                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
> >
> > +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> > +
> 
> The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
> shouldn't this be set before registering the gpio_chip with
> devm_gpiochip_add_data above?

It is devm_gpiochip_add_data() that create the domain, so there is
nothing to set before.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain
@ 2022-02-01 16:06       ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-01 16:06 UTC (permalink / raw)
  To: Emil Renner Berthing
  Cc: open list:GPIO SUBSYSTEM, linux-arm-kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-omap, Linus Walleij,
	Bartosz Golaszewski, Matthias Brugger, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, Thomas Gleixner, Shawn Guo,
	Sascha Hauer, Avi Fishman, Tomer Maimon, Tali Perry

On Tue, 01 Feb 2022 15:16:39 +0000,
Emil Renner Berthing <kernel@esmil.dk> wrote:
> 
> On Tue, 1 Feb 2022 at 13:19, Marc Zyngier <maz@kernel.org> wrote:
> >
> > Move the reference to the device over to the irq domain.
> >
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> >  drivers/pinctrl/pinctrl-starfive.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
> > index 0b912152a405..5be9866c2b3c 100644
> > --- a/drivers/pinctrl/pinctrl-starfive.c
> > +++ b/drivers/pinctrl/pinctrl-starfive.c
> > @@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
> >         sfp->gc.base = -1;
> >         sfp->gc.ngpio = NR_GPIOS;
> >
> > -       starfive_irq_chip.parent_device = dev;
> >         starfive_irq_chip.name = sfp->gc.label;
> >
> >         sfp->gc.irq.chip = &starfive_irq_chip;
> > @@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
> >         if (ret)
> >                 return dev_err_probe(dev, ret, "could not register gpiochip\n");
> >
> > +       irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
> > +
> 
> The gpio framework uses the irq_domain at sfp->gc.irq.domain, so
> shouldn't this be set before registering the gpio_chip with
> devm_gpiochip_add_data above?

It is devm_gpiochip_add_data() that create the domain, so there is
nothing to set before.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
  2022-02-01 12:02   ` Marc Zyngier
  (?)
@ 2022-02-02 14:25     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:25 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:15 PM Marc Zyngier <maz@kernel.org> wrote:
> As a preparation to moving the reference to the device used for
> runtime power management, add a new 'dev' field to the irqdomain
> structure for that exact purpose.
>
> The irq_chip_pm_{get,put}() helpers are made aware of the dual
> location via a new private helper.
>
> No functional change intended.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

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

* Re: [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
@ 2022-02-02 14:25     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:25 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:15 PM Marc Zyngier <maz@kernel.org> wrote:
> As a preparation to moving the reference to the device used for
> runtime power management, add a new 'dev' field to the irqdomain
> structure for that exact purpose.
>
> The irq_chip_pm_{get,put}() helpers are made aware of the dual
> location via a new private helper.
>
> No functional change intended.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
@ 2022-02-02 14:25     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:25 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:15 PM Marc Zyngier <maz@kernel.org> wrote:
> As a preparation to moving the reference to the device used for
> runtime power management, add a new 'dev' field to the irqdomain
> structure for that exact purpose.
>
> The irq_chip_pm_{get,put}() helpers are made aware of the dual
> location via a new private helper.
>
> No functional change intended.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 02/12] irqchip/gic: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
  (?)
@ 2022-02-02 14:25     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:25 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:16 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the GIC device over to the irq domain.
> This allows for some localised cleanup.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

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

* Re: [PATCH 02/12] irqchip/gic: Move PM device over to irq domain
@ 2022-02-02 14:25     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:25 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:16 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the GIC device over to the irq domain.
> This allows for some localised cleanup.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 02/12] irqchip/gic: Move PM device over to irq domain
@ 2022-02-02 14:25     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:25 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:16 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the GIC device over to the irq domain.
> This allows for some localised cleanup.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
  (?)
@ 2022-02-02 14:27     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:27 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Hi Marc,

On Tue, Feb 1, 2022 at 1:12 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Thanks for your patch!

s/gpio/irqpin/ in the one-line summary?

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

Wake-up still works fine on R-Mobile A1 and SH-Mobile AG5, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

* Re: [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
@ 2022-02-02 14:27     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:27 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Hi Marc,

On Tue, Feb 1, 2022 at 1:12 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Thanks for your patch!

s/gpio/irqpin/ in the one-line summary?

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

Wake-up still works fine on R-Mobile A1 and SH-Mobile AG5, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
@ 2022-02-02 14:27     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:27 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

Hi Marc,

On Tue, Feb 1, 2022 at 1:12 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Thanks for your patch!

s/gpio/irqpin/ in the one-line summary?

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

Wake-up still works fine on R-Mobile A1 and SH-Mobile AG5, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/12] irqchip/renesas-irqc: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
  (?)
@ 2022-02-02 14:28     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:15 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

Wake-up still works fine on R-Mobile APE6 and R-Car M2-W, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

* Re: [PATCH 04/12] irqchip/renesas-irqc: Move PM device over to irq domain
@ 2022-02-02 14:28     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:15 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

Wake-up still works fine on R-Mobile APE6 and R-Car M2-W, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 04/12] irqchip/renesas-irqc: Move PM device over to irq domain
@ 2022-02-02 14:28     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:15 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

Wake-up still works fine on R-Mobile APE6 and R-Car M2-W, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 08/12] gpio: rcar: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
  (?)
@ 2022-02-02 14:28     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:16 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

Wake-up still works fine on R-Car M2-W, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

* Re: [PATCH 08/12] gpio: rcar: Move PM device over to irq domain
@ 2022-02-02 14:28     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:16 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

Wake-up still works fine on R-Car M2-W, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 08/12] gpio: rcar: Move PM device over to irq domain
@ 2022-02-02 14:28     ` Geert Uytterhoeven
  0 siblings, 0 replies; 94+ messages in thread
From: Geert Uytterhoeven @ 2022-02-02 14:28 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:16 PM Marc Zyngier <maz@kernel.org> wrote:
> Move the reference to the device over to the irq domain.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

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

Wake-up still works fine on R-Car M2-W, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
  2022-02-01 12:02   ` Marc Zyngier
  (?)
@ 2022-02-03  7:04     ` Tony Lindgren
  -1 siblings, 0 replies; 94+ messages in thread
From: Tony Lindgren @ 2022-02-03  7:04 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

* Marc Zyngier <maz@kernel.org> [220201 12:03]:
> As a preparation to moving the reference to the device used for
> runtime power management, add a new 'dev' field to the irqdomain
> structure for that exact purpose.
> 
> The irq_chip_pm_{get,put}() helpers are made aware of the dual
> location via a new private helper.
> 
> No functional change intended.

Works for me:

Tested-by: Tony Lindgren <tony@atomide.com>

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

* Re: [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
@ 2022-02-03  7:04     ` Tony Lindgren
  0 siblings, 0 replies; 94+ messages in thread
From: Tony Lindgren @ 2022-02-03  7:04 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

* Marc Zyngier <maz@kernel.org> [220201 12:03]:
> As a preparation to moving the reference to the device used for
> runtime power management, add a new 'dev' field to the irqdomain
> structure for that exact purpose.
> 
> The irq_chip_pm_{get,put}() helpers are made aware of the dual
> location via a new private helper.
> 
> No functional change intended.

Works for me:

Tested-by: Tony Lindgren <tony@atomide.com>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 01/12] genirq: Allow the PM device to originate from irq domain
@ 2022-02-03  7:04     ` Tony Lindgren
  0 siblings, 0 replies; 94+ messages in thread
From: Tony Lindgren @ 2022-02-03  7:04 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

* Marc Zyngier <maz@kernel.org> [220201 12:03]:
> As a preparation to moving the reference to the device used for
> runtime power management, add a new 'dev' field to the irqdomain
> structure for that exact purpose.
> 
> The irq_chip_pm_{get,put}() helpers are made aware of the dual
> location via a new private helper.
> 
> No functional change intended.

Works for me:

Tested-by: Tony Lindgren <tony@atomide.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 07/12] gpio: omap: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
  (?)
@ 2022-02-03  7:05     ` Tony Lindgren
  -1 siblings, 0 replies; 94+ messages in thread
From: Tony Lindgren @ 2022-02-03  7:05 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

* Marc Zyngier <maz@kernel.org> [220201 12:03]:
> Move the reference to the device over to the irq domain.

PM still work for me:

Tested-by: Tony Lindgren <tony@atomide.com>

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

* Re: [PATCH 07/12] gpio: omap: Move PM device over to irq domain
@ 2022-02-03  7:05     ` Tony Lindgren
  0 siblings, 0 replies; 94+ messages in thread
From: Tony Lindgren @ 2022-02-03  7:05 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

* Marc Zyngier <maz@kernel.org> [220201 12:03]:
> Move the reference to the device over to the irq domain.

PM still work for me:

Tested-by: Tony Lindgren <tony@atomide.com>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 07/12] gpio: omap: Move PM device over to irq domain
@ 2022-02-03  7:05     ` Tony Lindgren
  0 siblings, 0 replies; 94+ messages in thread
From: Tony Lindgren @ 2022-02-03  7:05 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

* Marc Zyngier <maz@kernel.org> [220201 12:03]:
> Move the reference to the device over to the irq domain.

PM still work for me:

Tested-by: Tony Lindgren <tony@atomide.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
  2022-02-01 12:02 ` Marc Zyngier
  (?)
@ 2022-02-08 11:13   ` Bartosz Golaszewski
  -1 siblings, 0 replies; 94+ messages in thread
From: Bartosz Golaszewski @ 2022-02-08 11:13 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM,
	moderated list:ARM/Mediatek SoC...,
	Linux Kernel Mailing List, Linux-OMAP, Linus Walleij,
	Matthias Brugger, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, Thomas Gleixner, Shawn Guo, Sascha Hauer,
	Avi Fishman, Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:03 PM Marc Zyngier <maz@kernel.org> wrote:
>
> Our irq_chip data structure currently suffers from two problems:
>
> (1) the 'name' field is often dynamically populated with a reference
>     to the underlying HW (DT node dame, for example)
>
> (2) the 'parent_device' which is used to implement runtime PM is also
>     dynamically populated
>
> (3) there is at least one instance of a subsystem messing with the
>     internals of irq_chip structures (gpiochip_set_irq_hooks is
>     what I know about)
>
> These things mean that although the primary use of irq_chip is to only
> contain function pointers and other *static* information, the above
> two fields result in these structures being copied in a number of
> drivers. Eventually, it would be much better if the various drivers
> would use irq_chip as an 'ops' data structure (potentially made
> read-only), and keep the dynamic information somewhere more suitable.
>
> For (2) we already have the irqdomain structure that is designed to
> deal with the context in which interrupts are used, and it makes sense
> to move the 'parent_device' field over to this structure. This is what
> this small series is doing, with some minor cleanup on the way.
>
> (1) and (3) will be dealt in separate series (and I don't have a good
> solution for (3) yet).
>
> Thanks,
>
>         M.
>
> Marc Zyngier (12):
>   genirq: Allow the PM device to originate from irq domain
>   irqchip/gic: Move PM device over to irq domain
>   irqchip/renesas-intc-gpio: Move PM device over to irq domain
>   irqchip/renesas-irqc: Move PM device over to irq domain
>   irqchip/imx-intmux: Move PM device over to irq domain
>   gpio: mt7621: Kill parent_device usage
>   gpio: omap: Move PM device over to irq domain
>   gpio: rcar: Move PM device over to irq domain
>   gpio: tpmx86: Move PM device over to irq domain
>   pinctrl: npcm: Fix broken references to chip->parent_device
>   pinctrl: starfive: Move PM device over to irq domain
>   genirq: Kill irq_chip::parent_device
>
>  drivers/gpio/gpio-mt7621.c                |  1 -
>  drivers/gpio/gpio-omap.c                  |  7 ++++---
>  drivers/gpio/gpio-rcar.c                  |  2 +-
>  drivers/gpio/gpio-tqmx86.c                |  3 ++-
>  drivers/irqchip/irq-gic.c                 | 12 +++++------
>  drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
>  drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
>  drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
>  drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
>  drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
>  include/linux/irq.h                       |  2 --
>  include/linux/irqdomain.h                 | 10 +++++++++
>  kernel/irq/chip.c                         | 20 +++++++++++++-----
>  13 files changed, 59 insertions(+), 40 deletions(-)
>
> --
> 2.30.2
>

The changes for GPIO are small so:

Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>

You can take it through your tree and if there are any conflicts, I'll
just ask for an immutable branch.

Bart

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
@ 2022-02-08 11:13   ` Bartosz Golaszewski
  0 siblings, 0 replies; 94+ messages in thread
From: Bartosz Golaszewski @ 2022-02-08 11:13 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM,
	moderated list:ARM/Mediatek SoC...,
	Linux Kernel Mailing List, Linux-OMAP, Linus Walleij,
	Matthias Brugger, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, Thomas Gleixner, Shawn Guo, Sascha Hauer,
	Avi Fishman, Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:03 PM Marc Zyngier <maz@kernel.org> wrote:
>
> Our irq_chip data structure currently suffers from two problems:
>
> (1) the 'name' field is often dynamically populated with a reference
>     to the underlying HW (DT node dame, for example)
>
> (2) the 'parent_device' which is used to implement runtime PM is also
>     dynamically populated
>
> (3) there is at least one instance of a subsystem messing with the
>     internals of irq_chip structures (gpiochip_set_irq_hooks is
>     what I know about)
>
> These things mean that although the primary use of irq_chip is to only
> contain function pointers and other *static* information, the above
> two fields result in these structures being copied in a number of
> drivers. Eventually, it would be much better if the various drivers
> would use irq_chip as an 'ops' data structure (potentially made
> read-only), and keep the dynamic information somewhere more suitable.
>
> For (2) we already have the irqdomain structure that is designed to
> deal with the context in which interrupts are used, and it makes sense
> to move the 'parent_device' field over to this structure. This is what
> this small series is doing, with some minor cleanup on the way.
>
> (1) and (3) will be dealt in separate series (and I don't have a good
> solution for (3) yet).
>
> Thanks,
>
>         M.
>
> Marc Zyngier (12):
>   genirq: Allow the PM device to originate from irq domain
>   irqchip/gic: Move PM device over to irq domain
>   irqchip/renesas-intc-gpio: Move PM device over to irq domain
>   irqchip/renesas-irqc: Move PM device over to irq domain
>   irqchip/imx-intmux: Move PM device over to irq domain
>   gpio: mt7621: Kill parent_device usage
>   gpio: omap: Move PM device over to irq domain
>   gpio: rcar: Move PM device over to irq domain
>   gpio: tpmx86: Move PM device over to irq domain
>   pinctrl: npcm: Fix broken references to chip->parent_device
>   pinctrl: starfive: Move PM device over to irq domain
>   genirq: Kill irq_chip::parent_device
>
>  drivers/gpio/gpio-mt7621.c                |  1 -
>  drivers/gpio/gpio-omap.c                  |  7 ++++---
>  drivers/gpio/gpio-rcar.c                  |  2 +-
>  drivers/gpio/gpio-tqmx86.c                |  3 ++-
>  drivers/irqchip/irq-gic.c                 | 12 +++++------
>  drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
>  drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
>  drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
>  drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
>  drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
>  include/linux/irq.h                       |  2 --
>  include/linux/irqdomain.h                 | 10 +++++++++
>  kernel/irq/chip.c                         | 20 +++++++++++++-----
>  13 files changed, 59 insertions(+), 40 deletions(-)
>
> --
> 2.30.2
>

The changes for GPIO are small so:

Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>

You can take it through your tree and if there are any conflicts, I'll
just ask for an immutable branch.

Bart

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain
@ 2022-02-08 11:13   ` Bartosz Golaszewski
  0 siblings, 0 replies; 94+ messages in thread
From: Bartosz Golaszewski @ 2022-02-08 11:13 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: open list:GPIO SUBSYSTEM, Linux ARM,
	moderated list:ARM/Mediatek SoC...,
	Linux Kernel Mailing List, Linux-OMAP, Linus Walleij,
	Matthias Brugger, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, Thomas Gleixner, Shawn Guo, Sascha Hauer,
	Avi Fishman, Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:03 PM Marc Zyngier <maz@kernel.org> wrote:
>
> Our irq_chip data structure currently suffers from two problems:
>
> (1) the 'name' field is often dynamically populated with a reference
>     to the underlying HW (DT node dame, for example)
>
> (2) the 'parent_device' which is used to implement runtime PM is also
>     dynamically populated
>
> (3) there is at least one instance of a subsystem messing with the
>     internals of irq_chip structures (gpiochip_set_irq_hooks is
>     what I know about)
>
> These things mean that although the primary use of irq_chip is to only
> contain function pointers and other *static* information, the above
> two fields result in these structures being copied in a number of
> drivers. Eventually, it would be much better if the various drivers
> would use irq_chip as an 'ops' data structure (potentially made
> read-only), and keep the dynamic information somewhere more suitable.
>
> For (2) we already have the irqdomain structure that is designed to
> deal with the context in which interrupts are used, and it makes sense
> to move the 'parent_device' field over to this structure. This is what
> this small series is doing, with some minor cleanup on the way.
>
> (1) and (3) will be dealt in separate series (and I don't have a good
> solution for (3) yet).
>
> Thanks,
>
>         M.
>
> Marc Zyngier (12):
>   genirq: Allow the PM device to originate from irq domain
>   irqchip/gic: Move PM device over to irq domain
>   irqchip/renesas-intc-gpio: Move PM device over to irq domain
>   irqchip/renesas-irqc: Move PM device over to irq domain
>   irqchip/imx-intmux: Move PM device over to irq domain
>   gpio: mt7621: Kill parent_device usage
>   gpio: omap: Move PM device over to irq domain
>   gpio: rcar: Move PM device over to irq domain
>   gpio: tpmx86: Move PM device over to irq domain
>   pinctrl: npcm: Fix broken references to chip->parent_device
>   pinctrl: starfive: Move PM device over to irq domain
>   genirq: Kill irq_chip::parent_device
>
>  drivers/gpio/gpio-mt7621.c                |  1 -
>  drivers/gpio/gpio-omap.c                  |  7 ++++---
>  drivers/gpio/gpio-rcar.c                  |  2 +-
>  drivers/gpio/gpio-tqmx86.c                |  3 ++-
>  drivers/irqchip/irq-gic.c                 | 12 +++++------
>  drivers/irqchip/irq-imx-intmux.c          |  8 +++-----
>  drivers/irqchip/irq-renesas-intc-irqpin.c |  3 ++-
>  drivers/irqchip/irq-renesas-irqc.c        |  3 ++-
>  drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 +++++++++++------------
>  drivers/pinctrl/pinctrl-starfive.c        |  3 ++-
>  include/linux/irq.h                       |  2 --
>  include/linux/irqdomain.h                 | 10 +++++++++
>  kernel/irq/chip.c                         | 20 +++++++++++++-----
>  13 files changed, 59 insertions(+), 40 deletions(-)
>
> --
> 2.30.2
>

The changes for GPIO are small so:

Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>

You can take it through your tree and if there are any conflicts, I'll
just ask for an immutable branch.

Bart

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

* Re: [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
  2022-02-02 14:27     ` Geert Uytterhoeven
  (?)
@ 2022-02-09 13:40       ` Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-09 13:40 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On 2022-02-02 14:27, Geert Uytterhoeven wrote:
> Hi Marc,
> 
> On Tue, Feb 1, 2022 at 1:12 PM Marc Zyngier <maz@kernel.org> wrote:
>> Move the reference to the device over to the irq domain.
>> 
>> Signed-off-by: Marc Zyngier <maz@kernel.org>
> 
> Thanks for your patch!
> 
> s/gpio/irqpin/ in the one-line summary?

Indeed, now fixed.

Thanks,

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

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

* Re: [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
@ 2022-02-09 13:40       ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-09 13:40 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On 2022-02-02 14:27, Geert Uytterhoeven wrote:
> Hi Marc,
> 
> On Tue, Feb 1, 2022 at 1:12 PM Marc Zyngier <maz@kernel.org> wrote:
>> Move the reference to the device over to the irq domain.
>> 
>> Signed-off-by: Marc Zyngier <maz@kernel.org>
> 
> Thanks for your patch!
> 
> s/gpio/irqpin/ in the one-line summary?

Indeed, now fixed.

Thanks,

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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 03/12] irqchip/renesas-intc-gpio: Move PM device over to irq domain
@ 2022-02-09 13:40       ` Marc Zyngier
  0 siblings, 0 replies; 94+ messages in thread
From: Marc Zyngier @ 2022-02-09 13:40 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: open list:GPIO SUBSYSTEM, Linux ARM, linux-mediatek,
	Linux Kernel Mailing List,
	open list:TI ETHERNET SWITCH DRIVER (CPSW),
	Linus Walleij, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On 2022-02-02 14:27, Geert Uytterhoeven wrote:
> Hi Marc,
> 
> On Tue, Feb 1, 2022 at 1:12 PM Marc Zyngier <maz@kernel.org> wrote:
>> Move the reference to the device over to the irq domain.
>> 
>> Signed-off-by: Marc Zyngier <maz@kernel.org>
> 
> Thanks for your patch!
> 
> s/gpio/irqpin/ in the one-line summary?

Indeed, now fixed.

Thanks,

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [irqchip: irq/irqchip-next] genirq: Kill irq_chip::parent_device
  2022-02-01 12:03   ` Marc Zyngier
  (?)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     d3a33cefbb37d963bab883aca5b96109d61071a8
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/d3a33cefbb37d963bab883aca5b96109d61071a8
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:10 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:54 

genirq: Kill irq_chip::parent_device

Now that noone is using irq_chip::parent_device in the tree, get
rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-13-maz@kernel.org
---
 include/linux/irq.h | 2 --
 kernel/irq/chip.c   | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 848e1e1..2cb2e2a 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -456,7 +456,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
 /**
  * struct irq_chip - hardware interrupt chip descriptor
  *
- * @parent_device:	pointer to parent device for irqchip
  * @name:		name for /proc/interrupts
  * @irq_startup:	start up the interrupt (defaults to ->enable if NULL)
  * @irq_shutdown:	shut down the interrupt (defaults to ->disable if NULL)
@@ -503,7 +502,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
  * @flags:		chip specific flags
  */
 struct irq_chip {
-	struct device	*parent_device;
 	const char	*name;
 	unsigned int	(*irq_startup)(struct irq_data *data);
 	void		(*irq_shutdown)(struct irq_data *data);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index a2a12cd..24b6f2b 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1560,9 +1560,6 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 
 static struct device *irq_get_parent_device(struct irq_data *data)
 {
-	if (data->chip->parent_device)
-		return data->chip->parent_device;
-
 	if (data->domain)
 		return data->domain->dev;
 

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

* [irqchip: irq/irqchip-next] pinctrl: starfive: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
                     ` (2 preceding siblings ...)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Marc Zyngier, Emil Renner Berthing, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     de72f9429628e9c5b1124087c36bd7457b2ab241
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/de72f9429628e9c5b1124087c36bd7457b2ab241
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:09 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:54 

pinctrl: starfive: Move PM device over to irq domain

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Emil Renner Berthing <kernel@esmil.dk>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-12-maz@kernel.org
---
 drivers/pinctrl/pinctrl-starfive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index 0b91215..5be9866 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
 	sfp->gc.base = -1;
 	sfp->gc.ngpio = NR_GPIOS;
 
-	starfive_irq_chip.parent_device = dev;
 	starfive_irq_chip.name = sfp->gc.label;
 
 	sfp->gc.irq.chip = &starfive_irq_chip;
@@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "could not register gpiochip\n");
 
+	irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
+
 out_pinctrl_enable:
 	return pinctrl_enable(sfp->pctl);
 }

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

* [irqchip: irq/irqchip-next] pinctrl: npcm: Fix broken references to chip->parent_device
  2022-02-01 12:03   ` Marc Zyngier
  (?)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     03182a20db448774a4cf5f2e5b1c4bd660746ebe
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/03182a20db448774a4cf5f2e5b1c4bd660746ebe
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:08 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:54 

pinctrl: npcm: Fix broken references to chip->parent_device

The npcm driver has a bunch of references to the irq_chip parent_device
field, but never sets it.

Fix it by fishing that reference from somewhere else, but it is
obvious that these debug statements were never used. Also remove
an unused field in a local data structure.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-11-maz@kernel.org
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 ++++++++++------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4d81908..3995e5f 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -78,7 +78,6 @@ struct npcm7xx_gpio {
 	struct gpio_chip	gc;
 	int			irqbase;
 	int			irq;
-	void			*priv;
 	struct irq_chip		irq_chip;
 	u32			pinctrl_id;
 	int (*direction_input)(struct gpio_chip *chip, unsigned offset);
@@ -226,7 +225,7 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	chained_irq_enter(chip, desc);
 	sts = ioread32(bank->base + NPCM7XX_GP_N_EVST);
 	en  = ioread32(bank->base + NPCM7XX_GP_N_EVEN);
-	dev_dbg(chip->parent_device, "==> got irq sts %.8x %.8x\n", sts,
+	dev_dbg(bank->gc.parent, "==> got irq sts %.8x %.8x\n", sts,
 		en);
 
 	sts &= en;
@@ -241,33 +240,33 @@ static int npcmgpio_set_irq_type(struct irq_data *d, unsigned int type)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = BIT(d->hwirq);
 
-	dev_dbg(d->chip->parent_device, "setirqtype: %u.%u = %u\n", gpio,
+	dev_dbg(bank->gc.parent, "setirqtype: %u.%u = %u\n", gpio,
 		d->irq, type);
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		dev_dbg(d->chip->parent_device, "edge.rising\n");
+		dev_dbg(bank->gc.parent, "edge.rising\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		dev_dbg(d->chip->parent_device, "edge.falling\n");
+		dev_dbg(bank->gc.parent, "edge.falling\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		dev_dbg(d->chip->parent_device, "edge.both\n");
+		dev_dbg(bank->gc.parent, "edge.both\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		dev_dbg(d->chip->parent_device, "level.low\n");
+		dev_dbg(bank->gc.parent, "level.low\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		dev_dbg(d->chip->parent_device, "level.high\n");
+		dev_dbg(bank->gc.parent, "level.high\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	default:
-		dev_dbg(d->chip->parent_device, "invalid irq type\n");
+		dev_dbg(bank->gc.parent, "invalid irq type\n");
 		return -EINVAL;
 	}
 
@@ -289,7 +288,7 @@ static void npcmgpio_irq_ack(struct irq_data *d)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = d->hwirq;
 
-	dev_dbg(d->chip->parent_device, "irq_ack: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_ack: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVST);
 }
 
@@ -301,7 +300,7 @@ static void npcmgpio_irq_mask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Clear events */
-	dev_dbg(d->chip->parent_device, "irq_mask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_mask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENC);
 }
 
@@ -313,7 +312,7 @@ static void npcmgpio_irq_unmask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Enable events */
-	dev_dbg(d->chip->parent_device, "irq_unmask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_unmask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENS);
 }
 
@@ -323,7 +322,7 @@ static unsigned int npcmgpio_irq_startup(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* active-high, input, clear interrupt, enable interrupt */
-	dev_dbg(d->chip->parent_device, "startup: %u.%u\n", gpio, d->irq);
+	dev_dbg(gc_parent, "startup: %u.%u\n", gpio, d->irq);
 	npcmgpio_direction_input(gc, gpio);
 	npcmgpio_irq_ack(d);
 	npcmgpio_irq_unmask(d);

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

* [irqchip: irq/irqchip-next] gpio: tpmx86: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
  (?)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     924610607f191bee4379bc3775b0fd025ad7e922
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/924610607f191bee4379bc3775b0fd025ad7e922
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:07 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:54 

gpio: tpmx86: Move PM device over to irq domain

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-10-maz@kernel.org
---
 drivers/gpio/gpio-tqmx86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-tqmx86.c b/drivers/gpio/gpio-tqmx86.c
index 5b10322..fa4bc74 100644
--- a/drivers/gpio/gpio-tqmx86.c
+++ b/drivers/gpio/gpio-tqmx86.c
@@ -281,7 +281,6 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
 		u8 irq_status;
 
 		irq_chip->name = chip->label;
-		irq_chip->parent_device = &pdev->dev;
 		irq_chip->irq_mask = tqmx86_gpio_irq_mask;
 		irq_chip->irq_unmask = tqmx86_gpio_irq_unmask;
 		irq_chip->irq_set_type = tqmx86_gpio_irq_set_type;
@@ -316,6 +315,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)
 		goto out_pm_dis;
 	}
 
+	irq_domain_set_pm_device(girq->domain, dev);
+
 	dev_info(dev, "GPIO functionality initialized with %d pins\n",
 		 chip->ngpio);
 

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

* [irqchip: irq/irqchip-next] gpio: rcar: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
                     ` (2 preceding siblings ...)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Geert Uytterhoeven, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     373d664b7d3babe1743f64746bc3c553ac23a1bd
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/373d664b7d3babe1743f64746bc3c553ac23a1bd
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:06 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:53 

gpio: rcar: Move PM device over to irq domain

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-9-maz@kernel.org
---
 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 bd2e16d..3a76538 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -530,7 +530,6 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 
 	irq_chip = &p->irq_chip;
 	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;
 	irq_chip->irq_set_type = gpio_rcar_irq_set_type;
@@ -552,6 +551,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	irq_domain_set_pm_device(gpio_chip->irq.domain, dev);
 	ret = devm_request_irq(dev, p->irq_parent, gpio_rcar_irq_handler,
 			       IRQF_SHARED, name, p);
 	if (ret) {

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

* [irqchip: irq/irqchip-next] gpio: omap: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
                     ` (2 preceding siblings ...)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Tony Lindgren, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     989c78f25ade0af66426b935f1113d4b0fe390c5
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/989c78f25ade0af66426b935f1113d4b0fe390c5
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:05 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:53 

gpio: omap: Move PM device over to irq domain

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-8-maz@kernel.org
---
 drivers/gpio/gpio-omap.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index e099c39..80ddc43 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -986,7 +986,8 @@ static void omap_gpio_mod_init(struct gpio_bank *bank)
 		writel_relaxed(0, base + bank->regs->ctrl);
 }
 
-static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
+static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc,
+			       struct device *pm_dev)
 {
 	struct gpio_irq_chip *irq;
 	static int gpio;
@@ -1052,6 +1053,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
 	if (ret)
 		return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n");
 
+	irq_domain_set_pm_device(bank->chip.irq.domain, pm_dev);
 	ret = devm_request_irq(bank->chip.parent, bank->irq,
 			       omap_gpio_irq_handler,
 			       0, dev_name(bank->chip.parent), bank);
@@ -1402,7 +1404,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	irqc->irq_bus_sync_unlock = gpio_irq_bus_sync_unlock,
 	irqc->name = dev_name(&pdev->dev);
 	irqc->flags = IRQCHIP_MASK_ON_SUSPEND;
-	irqc->parent_device = dev;
 
 	bank->irq = platform_get_irq(pdev, 0);
 	if (bank->irq <= 0) {
@@ -1466,7 +1467,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
 
 	omap_gpio_mod_init(bank);
 
-	ret = omap_gpio_chip_init(bank, irqc);
+	ret = omap_gpio_chip_init(bank, irqc, dev);
 	if (ret) {
 		pm_runtime_put_sync(dev);
 		pm_runtime_disable(dev);

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

* [irqchip: irq/irqchip-next] gpio: mt7621: Kill parent_device usage
  2022-02-01 12:03   ` Marc Zyngier
  (?)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     4b9558f92036c968119e1de383f604c19b3ca99b
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4b9558f92036c968119e1de383f604c19b3ca99b
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:04 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:53 

gpio: mt7621: Kill parent_device usage

This gpio controller sets the parent_device field, but doesn't have
any runtime PM functionality. Get rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-7-maz@kernel.org
---
 drivers/gpio/gpio-mt7621.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index ccaad1c..d8a26e5 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -239,7 +239,6 @@ mediatek_gpio_bank_probe(struct device *dev, int bank)
 
 	rg->chip.offset = bank * MTK_BANK_WIDTH;
 	rg->irq_chip.name = dev_name(dev);
-	rg->irq_chip.parent_device = dev;
 	rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask;
 	rg->irq_chip.irq_mask = mediatek_gpio_irq_mask;
 	rg->irq_chip.irq_mask_ack = mediatek_gpio_irq_mask;

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

* [irqchip: irq/irqchip-next] irqchip/imx-intmux: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
  (?)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     fb140b9c0fe1109ac2269443216d114751a030c0
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/fb140b9c0fe1109ac2269443216d114751a030c0
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:03 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:53 

irqchip/imx-intmux: Move PM device over to irq domain

Move the reference to the device over to the irq domain.
This allows the irq_chip structure to be directly used instead
of taking a copy for each instance.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-6-maz@kernel.org
---
 drivers/irqchip/irq-imx-intmux.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-intmux.c
index e86ff74..80aaea8 100644
--- a/drivers/irqchip/irq-imx-intmux.c
+++ b/drivers/irqchip/irq-imx-intmux.c
@@ -61,7 +61,6 @@
 #define CHAN_MAX_NUM		0x8
 
 struct intmux_irqchip_data {
-	struct irq_chip		chip;
 	u32			saved_reg;
 	int			chanidx;
 	int			irq;
@@ -114,7 +113,7 @@ static void imx_intmux_irq_unmask(struct irq_data *d)
 	raw_spin_unlock_irqrestore(&data->lock, flags);
 }
 
-static struct irq_chip imx_intmux_irq_chip = {
+static struct irq_chip imx_intmux_irq_chip __ro_after_init = {
 	.name		= "intmux",
 	.irq_mask	= imx_intmux_irq_mask,
 	.irq_unmask	= imx_intmux_irq_unmask,
@@ -126,7 +125,7 @@ static int imx_intmux_irq_map(struct irq_domain *h, unsigned int irq,
 	struct intmux_irqchip_data *data = h->host_data;
 
 	irq_set_chip_data(irq, data);
-	irq_set_chip_and_handler(irq, &data->chip, handle_level_irq);
+	irq_set_chip_and_handler(irq, &imx_intmux_irq_chip, handle_level_irq);
 
 	return 0;
 }
@@ -241,8 +240,6 @@ static int imx_intmux_probe(struct platform_device *pdev)
 	}
 
 	for (i = 0; i < channum; i++) {
-		data->irqchip_data[i].chip = imx_intmux_irq_chip;
-		data->irqchip_data[i].chip.parent_device = &pdev->dev;
 		data->irqchip_data[i].chanidx = i;
 
 		data->irqchip_data[i].irq = irq_of_parse_and_map(np, i);
@@ -260,6 +257,7 @@ static int imx_intmux_probe(struct platform_device *pdev)
 			goto out;
 		}
 		data->irqchip_data[i].domain = domain;
+		irq_domain_set_pm_device(domain, &pdev->dev);
 
 		/* disable all interrupt sources of this channel firstly */
 		writel_relaxed(0, data->regs + CHANIER(i));

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

* [irqchip: irq/irqchip-next] irqchip/renesas-irqc: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
                     ` (2 preceding siblings ...)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Geert Uytterhoeven, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     c3ec838e3a390e62cb71a11041db43d0b3b42c99
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/c3ec838e3a390e62cb71a11041db43d0b3b42c99
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:02 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:53 

irqchip/renesas-irqc: Move PM device over to irq domain

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-5-maz@kernel.org
---
 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 909325f..1ee5e99 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -188,13 +188,14 @@ 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;
 	p->gc->chip_types[0].chip.irq_set_wake	= irqc_irq_set_wake;
 	p->gc->chip_types[0].chip.flags	= IRQCHIP_MASK_ON_SUSPEND;
 
+	irq_domain_set_pm_device(p->irq_domain, dev);
+
 	/* request interrupts one by one */
 	for (k = 0; k < p->number_of_irqs; k++) {
 		if (devm_request_irq(dev, p->irq[k].requested_irq,

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

* [irqchip: irq/irqchip-next] irqchip/renesas-intc-irqpin: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
                     ` (2 preceding siblings ...)
  (?)
@ 2022-02-09 16:17   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Geert Uytterhoeven, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     c2ea6b9b03c1acde89c6100aff894e64386e72cc
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/c2ea6b9b03c1acde89c6100aff894e64386e72cc
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:01 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:36:44 

irqchip/renesas-intc-irqpin: Move PM device over to irq domain

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-4-maz@kernel.org
---
 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 37f9a44..e83756a 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -508,7 +508,6 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 
 	irq_chip = &p->irq_chip;
 	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;
@@ -523,6 +522,8 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 		goto err0;
 	}
 
+	irq_domain_set_pm_device(p->irq_domain, dev);
+
 	if (p->shared_irqs) {
 		/* request one shared interrupt */
 		if (devm_request_irq(dev, p->irq[0].requested_irq,

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

* [irqchip: irq/irqchip-next] irqchip/gic: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
                     ` (2 preceding siblings ...)
  (?)
@ 2022-02-09 16:18   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Geert Uytterhoeven, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     e95f3efdeb499accf2b05333a1eac7862f5a10f6
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/e95f3efdeb499accf2b05333a1eac7862f5a10f6
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:00 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:35:56 

irqchip/gic: Move PM device over to irq domain

Move the reference to the GIC device over to the irq domain.
This allows for some localised cleanup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-3-maz@kernel.org
---
 drivers/irqchip/irq-gic.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index b8bb46c..fb741b4 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -1127,13 +1127,12 @@ static const struct irq_domain_ops gic_irq_domain_ops = {
 	.unmap = gic_irq_domain_unmap,
 };
 
-static void gic_init_chip(struct gic_chip_data *gic, struct device *dev,
-			  const char *name, bool use_eoimode1)
+static void gic_init_chip(struct gic_chip_data *gic, const char *name,
+			  bool use_eoimode1)
 {
 	/* Initialize irq_chip */
 	gic->chip = gic_chip;
 	gic->chip.name = name;
-	gic->chip.parent_device = dev;
 
 	if (use_eoimode1) {
 		gic->chip.irq_mask = gic_eoimode1_mask_irq;
@@ -1268,10 +1267,10 @@ static int __init __gic_init_bases(struct gic_chip_data *gic,
 
 	if (static_branch_likely(&supports_deactivate_key) && gic == &gic_data[0]) {
 		name = kasprintf(GFP_KERNEL, "GICv2");
-		gic_init_chip(gic, NULL, name, true);
+		gic_init_chip(gic, name, true);
 	} else {
 		name = kasprintf(GFP_KERNEL, "GIC-%d", (int)(gic-&gic_data[0]));
-		gic_init_chip(gic, NULL, name, false);
+		gic_init_chip(gic, name, false);
 	}
 
 	ret = gic_init_bases(gic, handle);
@@ -1460,7 +1459,7 @@ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
 	if (!*gic)
 		return -ENOMEM;
 
-	gic_init_chip(*gic, dev, dev->of_node->name, false);
+	gic_init_chip(*gic, dev->of_node->name, false);
 
 	ret = gic_of_setup(*gic, dev->of_node);
 	if (ret)
@@ -1472,6 +1471,7 @@ int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
 		return ret;
 	}
 
+	irq_domain_set_pm_device((*gic)->domain, dev);
 	irq_set_chained_handler_and_data(irq, gic_handle_cascade_irq, *gic);
 
 	return 0;

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

* [irqchip: irq/irqchip-next] genirq: Allow the PM device to originate from irq domain
  2022-02-01 12:02   ` Marc Zyngier
                     ` (3 preceding siblings ...)
  (?)
@ 2022-02-09 16:18   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-09 16:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Marc Zyngier, Geert Uytterhoeven, Tony Lindgren,
	Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     1f8863bfb5ca500ea1c7669b16b1931ba27fce20
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/1f8863bfb5ca500ea1c7669b16b1931ba27fce20
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:02:59 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Wed, 09 Feb 2022 13:35:56 

genirq: Allow the PM device to originate from irq domain

As a preparation to moving the reference to the device used for
runtime power management, add a new 'dev' field to the irqdomain
structure for that exact purpose.

The irq_chip_pm_{get,put}() helpers are made aware of the dual
location via a new private helper.

No functional change intended.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-2-maz@kernel.org
---
 include/linux/irqdomain.h | 10 ++++++++++
 kernel/irq/chip.c         | 23 ++++++++++++++++++-----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index d476405..be25a33 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -151,6 +151,8 @@ struct irq_domain_chip_generic;
  * @gc: Pointer to a list of generic chips. There is a helper function for
  *      setting up one or more generic chips for interrupt controllers
  *      drivers using the generic chip library which uses this pointer.
+ * @dev: Pointer to a device that the domain represent, and that will be
+ *       used for power management purposes.
  * @parent: Pointer to parent irq_domain to support hierarchy irq_domains
  *
  * Revmap data, used internally by irq_domain
@@ -171,6 +173,7 @@ struct irq_domain {
 	struct fwnode_handle *fwnode;
 	enum irq_domain_bus_token bus_token;
 	struct irq_domain_chip_generic *gc;
+	struct device *dev;
 #ifdef	CONFIG_IRQ_DOMAIN_HIERARCHY
 	struct irq_domain *parent;
 #endif
@@ -226,6 +229,13 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
 	return to_of_node(d->fwnode);
 }
 
+static inline void irq_domain_set_pm_device(struct irq_domain *d,
+					    struct device *dev)
+{
+	if (d)
+		d->dev = dev;
+}
+
 #ifdef CONFIG_IRQ_DOMAIN
 struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id,
 						const char *name, phys_addr_t *pa);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index c093246..a2a12cd 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1558,6 +1558,17 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 	return 0;
 }
 
+static struct device *irq_get_parent_device(struct irq_data *data)
+{
+	if (data->chip->parent_device)
+		return data->chip->parent_device;
+
+	if (data->domain)
+		return data->domain->dev;
+
+	return NULL;
+}
+
 /**
  * irq_chip_pm_get - Enable power for an IRQ chip
  * @data:	Pointer to interrupt specific data
@@ -1567,12 +1578,13 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
  */
 int irq_chip_pm_get(struct irq_data *data)
 {
+	struct device *dev = irq_get_parent_device(data);
 	int retval;
 
-	if (IS_ENABLED(CONFIG_PM) && data->chip->parent_device) {
-		retval = pm_runtime_get_sync(data->chip->parent_device);
+	if (IS_ENABLED(CONFIG_PM) && dev) {
+		retval = pm_runtime_get_sync(dev);
 		if (retval < 0) {
-			pm_runtime_put_noidle(data->chip->parent_device);
+			pm_runtime_put_noidle(dev);
 			return retval;
 		}
 	}
@@ -1590,10 +1602,11 @@ int irq_chip_pm_get(struct irq_data *data)
  */
 int irq_chip_pm_put(struct irq_data *data)
 {
+	struct device *dev = irq_get_parent_device(data);
 	int retval = 0;
 
-	if (IS_ENABLED(CONFIG_PM) && data->chip->parent_device)
-		retval = pm_runtime_put(data->chip->parent_device);
+	if (IS_ENABLED(CONFIG_PM) && dev)
+		retval = pm_runtime_put(dev);
 
 	return (retval < 0) ? retval : 0;
 }

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

* [irqchip: irq/irqchip-next] genirq: Kill irq_chip::parent_device
  2022-02-01 12:03   ` Marc Zyngier
                     ` (2 preceding siblings ...)
  (?)
@ 2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-10 11:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     beb0622138cd2848dec06b0651a988c39d099574
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/beb0622138cd2848dec06b0651a988c39d099574
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:10 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 10 Feb 2022 11:07:04 

genirq: Kill irq_chip::parent_device

Now that noone is using irq_chip::parent_device in the tree, get
rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-13-maz@kernel.org
---
 include/linux/irq.h | 2 --
 kernel/irq/chip.c   | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 848e1e1..2cb2e2a 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -456,7 +456,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
 /**
  * struct irq_chip - hardware interrupt chip descriptor
  *
- * @parent_device:	pointer to parent device for irqchip
  * @name:		name for /proc/interrupts
  * @irq_startup:	start up the interrupt (defaults to ->enable if NULL)
  * @irq_shutdown:	shut down the interrupt (defaults to ->disable if NULL)
@@ -503,7 +502,6 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
  * @flags:		chip specific flags
  */
 struct irq_chip {
-	struct device	*parent_device;
 	const char	*name;
 	unsigned int	(*irq_startup)(struct irq_data *data);
 	void		(*irq_shutdown)(struct irq_data *data);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index a2a12cd..24b6f2b 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1560,9 +1560,6 @@ int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 
 static struct device *irq_get_parent_device(struct irq_data *data)
 {
-	if (data->chip->parent_device)
-		return data->chip->parent_device;
-
 	if (data->domain)
 		return data->domain->dev;
 

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

* [irqchip: irq/irqchip-next] pinctrl: starfive: Move PM device over to irq domain
  2022-02-01 12:03   ` Marc Zyngier
                     ` (3 preceding siblings ...)
  (?)
@ 2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-10 11:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Marc Zyngier, Emil Renner Berthing, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     0d872ed9e2148a8ba29de5a71c352fa54abf8e5e
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/0d872ed9e2148a8ba29de5a71c352fa54abf8e5e
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:09 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 10 Feb 2022 11:07:04 

pinctrl: starfive: Move PM device over to irq domain

Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Emil Renner Berthing <kernel@esmil.dk>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-12-maz@kernel.org
---
 drivers/pinctrl/pinctrl-starfive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-starfive.c b/drivers/pinctrl/pinctrl-starfive.c
index 0b91215..5be9866 100644
--- a/drivers/pinctrl/pinctrl-starfive.c
+++ b/drivers/pinctrl/pinctrl-starfive.c
@@ -1307,7 +1307,6 @@ static int starfive_probe(struct platform_device *pdev)
 	sfp->gc.base = -1;
 	sfp->gc.ngpio = NR_GPIOS;
 
-	starfive_irq_chip.parent_device = dev;
 	starfive_irq_chip.name = sfp->gc.label;
 
 	sfp->gc.irq.chip = &starfive_irq_chip;
@@ -1330,6 +1329,8 @@ static int starfive_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "could not register gpiochip\n");
 
+	irq_domain_set_pm_device(sfp->gc.irq.domain, dev);
+
 out_pinctrl_enable:
 	return pinctrl_enable(sfp->pctl);
 }

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

* [irqchip: irq/irqchip-next] pinctrl: npcm: Fix broken references to chip->parent_device
  2022-02-01 12:03   ` Marc Zyngier
                     ` (2 preceding siblings ...)
  (?)
@ 2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
  -1 siblings, 0 replies; 94+ messages in thread
From: irqchip-bot for Marc Zyngier @ 2022-02-10 11:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Bartosz Golaszewski, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     f7e53e2255808ca3abcc8f38d18ad0823425e771
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/f7e53e2255808ca3abcc8f38d18ad0823425e771
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 01 Feb 2022 12:03:08 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 10 Feb 2022 11:07:04 

pinctrl: npcm: Fix broken references to chip->parent_device

The npcm driver has a bunch of references to the irq_chip parent_device
field, but never sets it.

Fix it by fishing that reference from somewhere else, but it is
obvious that these debug statements were never used. Also remove
an unused field in a local data structure.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-11-maz@kernel.org
---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 25 ++++++++++------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4d81908..ba536fd 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -78,7 +78,6 @@ struct npcm7xx_gpio {
 	struct gpio_chip	gc;
 	int			irqbase;
 	int			irq;
-	void			*priv;
 	struct irq_chip		irq_chip;
 	u32			pinctrl_id;
 	int (*direction_input)(struct gpio_chip *chip, unsigned offset);
@@ -226,7 +225,7 @@ static void npcmgpio_irq_handler(struct irq_desc *desc)
 	chained_irq_enter(chip, desc);
 	sts = ioread32(bank->base + NPCM7XX_GP_N_EVST);
 	en  = ioread32(bank->base + NPCM7XX_GP_N_EVEN);
-	dev_dbg(chip->parent_device, "==> got irq sts %.8x %.8x\n", sts,
+	dev_dbg(bank->gc.parent, "==> got irq sts %.8x %.8x\n", sts,
 		en);
 
 	sts &= en;
@@ -241,33 +240,33 @@ static int npcmgpio_set_irq_type(struct irq_data *d, unsigned int type)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = BIT(d->hwirq);
 
-	dev_dbg(d->chip->parent_device, "setirqtype: %u.%u = %u\n", gpio,
+	dev_dbg(bank->gc.parent, "setirqtype: %u.%u = %u\n", gpio,
 		d->irq, type);
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		dev_dbg(d->chip->parent_device, "edge.rising\n");
+		dev_dbg(bank->gc.parent, "edge.rising\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		dev_dbg(d->chip->parent_device, "edge.falling\n");
+		dev_dbg(bank->gc.parent, "edge.falling\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		dev_dbg(d->chip->parent_device, "edge.both\n");
+		dev_dbg(bank->gc.parent, "edge.both\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_EVBE, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		dev_dbg(d->chip->parent_device, "level.low\n");
+		dev_dbg(bank->gc.parent, "level.low\n");
 		npcm_gpio_set(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		dev_dbg(d->chip->parent_device, "level.high\n");
+		dev_dbg(bank->gc.parent, "level.high\n");
 		npcm_gpio_clr(&bank->gc, bank->base + NPCM7XX_GP_N_POL, gpio);
 		break;
 	default:
-		dev_dbg(d->chip->parent_device, "invalid irq type\n");
+		dev_dbg(bank->gc.parent, "invalid irq type\n");
 		return -EINVAL;
 	}
 
@@ -289,7 +288,7 @@ static void npcmgpio_irq_ack(struct irq_data *d)
 		gpiochip_get_data(irq_data_get_irq_chip_data(d));
 	unsigned int gpio = d->hwirq;
 
-	dev_dbg(d->chip->parent_device, "irq_ack: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_ack: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVST);
 }
 
@@ -301,7 +300,7 @@ static void npcmgpio_irq_mask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Clear events */
-	dev_dbg(d->chip->parent_device, "irq_mask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_mask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENC);
 }
 
@@ -313,7 +312,7 @@ static void npcmgpio_irq_unmask(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* Enable events */
-	dev_dbg(d->chip->parent_device, "irq_unmask: %u.%u\n", gpio, d->irq);
+	dev_dbg(bank->gc.parent, "irq_unmask: %u.%u\n", gpio, d->irq);
 	iowrite32(BIT(gpio), bank->base + NPCM7XX_GP_N_EVENS);
 }
 
@@ -323,7 +322,7 @@ static unsigned int npcmgpio_irq_startup(struct irq_data *d)
 	unsigned int gpio = d->hwirq;
 
 	/* active-high, input, clear interrupt, enable interrupt */
-	dev_dbg(d->chip->parent_device, "startup: %u.%u\n", gpio, d->irq);
+	dev_dbg(gc->parent, "startup: %u.%u\n", gpio, d->irq);
 	npcmgpio_direction_input(gc, gpio);
 	npcmgpio_irq_ack(d);
 	npcmgpio_irq_unmask(d);

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

* Re: [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device
  2022-02-01 12:03   ` Marc Zyngier
  (?)
@ 2022-02-11  0:42     ` Linus Walleij
  -1 siblings, 0 replies; 94+ messages in thread
From: Linus Walleij @ 2022-02-11  0:42 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:21 PM Marc Zyngier <maz@kernel.org> wrote:

> The npcm driver has a bunch of references to the irq_chip parent_device
> field, but never sets it.
>
> Fix it by fishing that reference from somewhere else, but it is
> obvious that these debug statements were never used. Also remove
> an unused field in a local data structure.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device
@ 2022-02-11  0:42     ` Linus Walleij
  0 siblings, 0 replies; 94+ messages in thread
From: Linus Walleij @ 2022-02-11  0:42 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:21 PM Marc Zyngier <maz@kernel.org> wrote:

> The npcm driver has a bunch of references to the irq_chip parent_device
> field, but never sets it.
>
> Fix it by fishing that reference from somewhere else, but it is
> obvious that these debug statements were never used. Also remove
> an unused field in a local data structure.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device
@ 2022-02-11  0:42     ` Linus Walleij
  0 siblings, 0 replies; 94+ messages in thread
From: Linus Walleij @ 2022-02-11  0:42 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-gpio, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-omap, Bartosz Golaszewski, Matthias Brugger,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Thomas Gleixner, Shawn Guo, Sascha Hauer, Avi Fishman,
	Tomer Maimon, Tali Perry, Emil Renner Berthing

On Tue, Feb 1, 2022 at 1:21 PM Marc Zyngier <maz@kernel.org> wrote:

> The npcm driver has a bunch of references to the irq_chip parent_device
> field, but never sets it.
>
> Fix it by fishing that reference from somewhere else, but it is
> obvious that these debug statements were never used. Also remove
> an unused field in a local data structure.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 09/12] gpio: tpmx86: Move PM device over to irq domain
@ 2022-02-03 14:06 kernel test robot
  0 siblings, 0 replies; 94+ messages in thread
From: kernel test robot @ 2022-02-03 14:06 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 21979 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220201120310.878267-10-maz@kernel.org>
References: <20220201120310.878267-10-maz@kernel.org>
TO: Marc Zyngier <maz@kernel.org>

Hi Marc,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on v5.17-rc2 next-20220202]
[cannot apply to tip/irq/core linusw-gpio/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Marc-Zyngier/genirq-Move-irqchip-runtime-PM-over-to-irq-domain/20220201-202124
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: riscv-randconfig-c006-20220201 (https://download.01.org/0day-ci/archive/20220203/202202031546.sh6HZWFF-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6b1e844b69f15bb7dffaf9365cd2b355d2eb7579)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/1c989f3d9b5302895c7b31b2c2462d2096b39231
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Marc-Zyngier/genirq-Move-irqchip-runtime-PM-over-to-irq-domain/20220201-202124
        git checkout 1c989f3d9b5302895c7b31b2c2462d2096b39231
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
           return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE;
                                 ^~~~~~
   include/linux/dcache.h:400:9: note: Calling '__d_entry_type'
           return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE;
                  ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dcache.h:385:9: note: Access to field 'd_flags' results in a dereference of a null pointer (loaded from variable 'dentry')
           return dentry->d_flags & DCACHE_ENTRY_TYPE;
                  ^~~~~~
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   kernel/locking/locktorture.c:749:17: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
                   if (data_race(statp[i].n_lock_fail))
                                 ^
   kernel/locking/locktorture.c:818:2: note: Assuming 'verbose' is 0
           VERBOSE_TOROUT_STRING("lock_torture_stats task started");
           ^
   include/linux/torture.h:36:6: note: expanded from macro 'VERBOSE_TOROUT_STRING'
           if (verbose) {                                                          \
               ^~~~~~~
   kernel/locking/locktorture.c:818:2: note: Taking false branch
           VERBOSE_TOROUT_STRING("lock_torture_stats task started");
           ^
   include/linux/torture.h:36:2: note: expanded from macro 'VERBOSE_TOROUT_STRING'
           if (verbose) {                                                          \
           ^
   kernel/locking/locktorture.c:818:2: note: Loop condition is false.  Exiting loop
           VERBOSE_TOROUT_STRING("lock_torture_stats task started");
           ^
   include/linux/torture.h:34:34: note: expanded from macro 'VERBOSE_TOROUT_STRING'
   #define VERBOSE_TOROUT_STRING(s) \
                                    ^
   kernel/locking/locktorture.c:821:3: note: Calling 'lock_torture_stats_print'
                   lock_torture_stats_print();
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:781:6: note: Assuming field 'readlock' is null
           if (cxt.cur_ops->readlock)
               ^~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:781:2: note: Taking false branch
           if (cxt.cur_ops->readlock)
           ^
   kernel/locking/locktorture.c:784:8: note: Calling 'kmalloc'
           buf = kmalloc(size, GFP_KERNEL);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/slab.h:569:2: note: Taking false branch
           if (__builtin_constant_p(size)) {
           ^
   include/linux/slab.h:586:9: note: Value assigned to 'cxt.lwsa'
           return __kmalloc(size, flags);
                  ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/slab.h:586:2: note: Returning pointer, which participates in a condition later
           return __kmalloc(size, flags);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:784:8: note: Returning from 'kmalloc'
           buf = kmalloc(size, GFP_KERNEL);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:785:6: note: Assuming 'buf' is non-null
           if (!buf) {
               ^~~~
   kernel/locking/locktorture.c:785:2: note: Taking false branch
           if (!buf) {
           ^
   kernel/locking/locktorture.c:791:29: note: Passing value via 2nd parameter 'statp'
           __torture_print_stats(buf, cxt.lwsa, true);
                                      ^~~~~~~~
   kernel/locking/locktorture.c:791:2: note: Calling '__torture_print_stats'
           __torture_print_stats(buf, cxt.lwsa, true);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/locking/locktorture.c:744:22: note: Assuming 'statp' is null
           long max = 0, min = statp ? data_race(statp[0].n_lock_acquired) : 0;
                               ^~~~~
   kernel/locking/locktorture.c:744:22: note: '?' condition is false
   kernel/locking/locktorture.c:747:13: note: 'write' is true
           n_stress = write ? cxt.nrealwriters_stress : cxt.nrealreaders_stress;
                      ^~~~~
   kernel/locking/locktorture.c:747:13: note: '?' condition is true
   kernel/locking/locktorture.c:748:14: note: Assuming 'i' is < 'n_stress'
           for (i = 0; i < n_stress; i++) {
                       ^~~~~~~~~~~~
   kernel/locking/locktorture.c:748:2: note: Loop condition is true.  Entering loop body
           for (i = 0; i < n_stress; i++) {
           ^
   kernel/locking/locktorture.c:749:17: note: Dereference of null pointer
                   if (data_race(statp[i].n_lock_fail))
                                 ^
   include/linux/compiler.h:218:3: note: expanded from macro 'data_race'
                   expr;                                                   \
                   ^~~~
   kernel/locking/locktorture.c:758:2: warning: Value stored to 'page' is never read [clang-analyzer-deadcode.DeadStores]
           page += sprintf(page,
           ^       ~~~~~~~~~~~~~
   kernel/locking/locktorture.c:758:2: note: Value stored to 'page' is never read
           page += sprintf(page,
           ^       ~~~~~~~~~~~~~
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
>> drivers/gpio/gpio-tqmx86.c:318:27: warning: Access to field 'domain' results in a dereference of an undefined pointer value (loaded from variable 'girq') [clang-analyzer-core.NullDereference]
           irq_domain_set_pm_device(girq->domain, dev);
                                    ^~~~
   drivers/gpio/gpio-tqmx86.c:234:2: note: 'girq' declared without an initial value
           struct gpio_irq_chip *girq;
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpio/gpio-tqmx86.c:240:6: note: Assuming 'irq' is >= 0
           if (irq < 0 && irq != -ENXIO)
               ^~~~~~~
   drivers/gpio/gpio-tqmx86.c:240:14: note: Left side of '&&' is false
           if (irq < 0 && irq != -ENXIO)
                       ^
   drivers/gpio/gpio-tqmx86.c:244:6: note: Assuming 'res' is non-null
           if (!res) {
               ^~~~
   drivers/gpio/gpio-tqmx86.c:244:2: note: Taking false branch
           if (!res) {
           ^
   drivers/gpio/gpio-tqmx86.c:250:6: note: Assuming 'io_base' is non-null
           if (!io_base)
               ^~~~~~~~
   drivers/gpio/gpio-tqmx86.c:250:2: note: Taking false branch
           if (!io_base)
           ^
   drivers/gpio/gpio-tqmx86.c:254:6: note: Assuming 'gpio' is non-null
           if (!gpio)
               ^~~~~
   drivers/gpio/gpio-tqmx86.c:254:2: note: Taking false branch
           if (!gpio)
           ^
   drivers/gpio/gpio-tqmx86.c:257:2: note: Loop condition is false.  Exiting loop
           raw_spin_lock_init(&gpio->spinlock);
           ^
   include/linux/spinlock.h:102:39: note: expanded from macro 'raw_spin_lock_init'
   # define raw_spin_lock_init(lock)                                       \
                                                                           ^
   drivers/gpio/gpio-tqmx86.c:279:6: note: Assuming 'irq' is <= 0
           if (irq > 0) {
               ^~~~~~~
   drivers/gpio/gpio-tqmx86.c:279:2: note: Taking false branch
           if (irq > 0) {
           ^
   drivers/gpio/gpio-tqmx86.c:313:6: note: Assuming 'ret' is 0
           if (ret) {
               ^~~
   drivers/gpio/gpio-tqmx86.c:313:2: note: Taking false branch
           if (ret) {
           ^
   drivers/gpio/gpio-tqmx86.c:318:27: note: Access to field 'domain' results in a dereference of an undefined pointer value (loaded from variable 'girq')
           irq_domain_set_pm_device(girq->domain, dev);
                                    ^~~~
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   5 warnings generated.
   fs/ext4/fast_commit.c:1623:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = ext4_fc_record_modified_inode(sb, inode->i_ino);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/fast_commit.c:1623:2: note: Value stored to 'ret' is never read
           ret = ext4_fc_record_modified_inode(sb, inode->i_ino);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/fast_commit.c:1748:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = ext4_fc_record_modified_inode(sb, inode->i_ino);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/fast_commit.c:1748:2: note: Value stored to 'ret' is never read
           ret = ext4_fc_record_modified_inode(sb, inode->i_ino);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

vim +318 drivers/gpio/gpio-tqmx86.c

5fbe5b5883f8473 Linus Walleij     2019-09-04  228  
b868db94a6a7047 Andrew Lunn       2019-01-25  229  static int tqmx86_gpio_probe(struct platform_device *pdev)
b868db94a6a7047 Andrew Lunn       2019-01-25  230  {
b868db94a6a7047 Andrew Lunn       2019-01-25  231  	struct device *dev = &pdev->dev;
b868db94a6a7047 Andrew Lunn       2019-01-25  232  	struct tqmx86_gpio_data *gpio;
b868db94a6a7047 Andrew Lunn       2019-01-25  233  	struct gpio_chip *chip;
74639d66e1ec069 Linus Walleij     2019-08-09  234  	struct gpio_irq_chip *girq;
b868db94a6a7047 Andrew Lunn       2019-01-25  235  	void __iomem *io_base;
b868db94a6a7047 Andrew Lunn       2019-01-25  236  	struct resource *res;
b868db94a6a7047 Andrew Lunn       2019-01-25  237  	int ret, irq;
b868db94a6a7047 Andrew Lunn       2019-01-25  238  
9b87f43537acfa2 Matthias Schiffer 2021-07-16  239  	irq = platform_get_irq_optional(pdev, 0);
9b87f43537acfa2 Matthias Schiffer 2021-07-16  240  	if (irq < 0 && irq != -ENXIO)
b868db94a6a7047 Andrew Lunn       2019-01-25  241  		return irq;
b868db94a6a7047 Andrew Lunn       2019-01-25  242  
b868db94a6a7047 Andrew Lunn       2019-01-25  243  	res = platform_get_resource(pdev, IORESOURCE_IO, 0);
b868db94a6a7047 Andrew Lunn       2019-01-25  244  	if (!res) {
b868db94a6a7047 Andrew Lunn       2019-01-25  245  		dev_err(&pdev->dev, "Cannot get I/O\n");
b868db94a6a7047 Andrew Lunn       2019-01-25  246  		return -ENODEV;
b868db94a6a7047 Andrew Lunn       2019-01-25  247  	}
b868db94a6a7047 Andrew Lunn       2019-01-25  248  
b868db94a6a7047 Andrew Lunn       2019-01-25  249  	io_base = devm_ioport_map(&pdev->dev, res->start, resource_size(res));
b868db94a6a7047 Andrew Lunn       2019-01-25  250  	if (!io_base)
b868db94a6a7047 Andrew Lunn       2019-01-25  251  		return -ENOMEM;
b868db94a6a7047 Andrew Lunn       2019-01-25  252  
b868db94a6a7047 Andrew Lunn       2019-01-25  253  	gpio = devm_kzalloc(dev, sizeof(*gpio), GFP_KERNEL);
b868db94a6a7047 Andrew Lunn       2019-01-25  254  	if (!gpio)
b868db94a6a7047 Andrew Lunn       2019-01-25  255  		return -ENOMEM;
b868db94a6a7047 Andrew Lunn       2019-01-25  256  
b868db94a6a7047 Andrew Lunn       2019-01-25  257  	raw_spin_lock_init(&gpio->spinlock);
b868db94a6a7047 Andrew Lunn       2019-01-25  258  	gpio->io_base = io_base;
b868db94a6a7047 Andrew Lunn       2019-01-25  259  
b868db94a6a7047 Andrew Lunn       2019-01-25  260  	tqmx86_gpio_write(gpio, (u8)~TQMX86_DIR_INPUT_MASK, TQMX86_GPIODD);
b868db94a6a7047 Andrew Lunn       2019-01-25  261  
b868db94a6a7047 Andrew Lunn       2019-01-25  262  	platform_set_drvdata(pdev, gpio);
b868db94a6a7047 Andrew Lunn       2019-01-25  263  
b868db94a6a7047 Andrew Lunn       2019-01-25  264  	chip = &gpio->chip;
b868db94a6a7047 Andrew Lunn       2019-01-25  265  	chip->label = "gpio-tqmx86";
b868db94a6a7047 Andrew Lunn       2019-01-25  266  	chip->owner = THIS_MODULE;
b868db94a6a7047 Andrew Lunn       2019-01-25  267  	chip->can_sleep = false;
b868db94a6a7047 Andrew Lunn       2019-01-25  268  	chip->base = -1;
b868db94a6a7047 Andrew Lunn       2019-01-25  269  	chip->direction_input = tqmx86_gpio_direction_input;
b868db94a6a7047 Andrew Lunn       2019-01-25  270  	chip->direction_output = tqmx86_gpio_direction_output;
b868db94a6a7047 Andrew Lunn       2019-01-25  271  	chip->get_direction = tqmx86_gpio_get_direction;
b868db94a6a7047 Andrew Lunn       2019-01-25  272  	chip->get = tqmx86_gpio_get;
b868db94a6a7047 Andrew Lunn       2019-01-25  273  	chip->set = tqmx86_gpio_set;
b868db94a6a7047 Andrew Lunn       2019-01-25  274  	chip->ngpio = TQMX86_NGPIO;
b868db94a6a7047 Andrew Lunn       2019-01-25  275  	chip->parent = pdev->dev.parent;
b868db94a6a7047 Andrew Lunn       2019-01-25  276  
b868db94a6a7047 Andrew Lunn       2019-01-25  277  	pm_runtime_enable(&pdev->dev);
b868db94a6a7047 Andrew Lunn       2019-01-25  278  
9b87f43537acfa2 Matthias Schiffer 2021-07-16  279  	if (irq > 0) {
b868db94a6a7047 Andrew Lunn       2019-01-25  280  		struct irq_chip *irq_chip = &gpio->irq_chip;
b868db94a6a7047 Andrew Lunn       2019-01-25  281  		u8 irq_status;
b868db94a6a7047 Andrew Lunn       2019-01-25  282  
b868db94a6a7047 Andrew Lunn       2019-01-25  283  		irq_chip->name = chip->label;
b868db94a6a7047 Andrew Lunn       2019-01-25  284  		irq_chip->irq_mask = tqmx86_gpio_irq_mask;
b868db94a6a7047 Andrew Lunn       2019-01-25  285  		irq_chip->irq_unmask = tqmx86_gpio_irq_unmask;
b868db94a6a7047 Andrew Lunn       2019-01-25  286  		irq_chip->irq_set_type = tqmx86_gpio_irq_set_type;
b868db94a6a7047 Andrew Lunn       2019-01-25  287  
b868db94a6a7047 Andrew Lunn       2019-01-25  288  		/* Mask all interrupts */
b868db94a6a7047 Andrew Lunn       2019-01-25  289  		tqmx86_gpio_write(gpio, 0, TQMX86_GPIIC);
b868db94a6a7047 Andrew Lunn       2019-01-25  290  
b868db94a6a7047 Andrew Lunn       2019-01-25  291  		/* Clear all pending interrupts */
b868db94a6a7047 Andrew Lunn       2019-01-25  292  		irq_status = tqmx86_gpio_read(gpio, TQMX86_GPIIS);
b868db94a6a7047 Andrew Lunn       2019-01-25  293  		tqmx86_gpio_write(gpio, irq_status, TQMX86_GPIIS);
b868db94a6a7047 Andrew Lunn       2019-01-25  294  
74639d66e1ec069 Linus Walleij     2019-08-09  295  		girq = &chip->irq;
74639d66e1ec069 Linus Walleij     2019-08-09  296  		girq->chip = irq_chip;
74639d66e1ec069 Linus Walleij     2019-08-09  297  		girq->parent_handler = tqmx86_gpio_irq_handler;
74639d66e1ec069 Linus Walleij     2019-08-09  298  		girq->num_parents = 1;
74639d66e1ec069 Linus Walleij     2019-08-09  299  		girq->parents = devm_kcalloc(&pdev->dev, 1,
74639d66e1ec069 Linus Walleij     2019-08-09  300  					     sizeof(*girq->parents),
74639d66e1ec069 Linus Walleij     2019-08-09  301  					     GFP_KERNEL);
74639d66e1ec069 Linus Walleij     2019-08-09  302  		if (!girq->parents) {
74639d66e1ec069 Linus Walleij     2019-08-09  303  			ret = -ENOMEM;
96be65d12d792b3 Wei Yongjun       2019-02-01  304  			goto out_pm_dis;
b868db94a6a7047 Andrew Lunn       2019-01-25  305  		}
74639d66e1ec069 Linus Walleij     2019-08-09  306  		girq->parents[0] = irq;
74639d66e1ec069 Linus Walleij     2019-08-09  307  		girq->default_type = IRQ_TYPE_NONE;
74639d66e1ec069 Linus Walleij     2019-08-09  308  		girq->handler = handle_simple_irq;
5fbe5b5883f8473 Linus Walleij     2019-09-04  309  		girq->init_valid_mask = tqmx86_init_irq_valid_mask;
74639d66e1ec069 Linus Walleij     2019-08-09  310  	}
b868db94a6a7047 Andrew Lunn       2019-01-25  311  
74639d66e1ec069 Linus Walleij     2019-08-09  312  	ret = devm_gpiochip_add_data(dev, chip, gpio);
74639d66e1ec069 Linus Walleij     2019-08-09  313  	if (ret) {
74639d66e1ec069 Linus Walleij     2019-08-09  314  		dev_err(dev, "Could not register GPIO chip\n");
74639d66e1ec069 Linus Walleij     2019-08-09  315  		goto out_pm_dis;
b868db94a6a7047 Andrew Lunn       2019-01-25  316  	}
b868db94a6a7047 Andrew Lunn       2019-01-25  317  
1c989f3d9b53028 Marc Zyngier      2022-02-01 @318  	irq_domain_set_pm_device(girq->domain, dev);
1c989f3d9b53028 Marc Zyngier      2022-02-01  319  
b868db94a6a7047 Andrew Lunn       2019-01-25  320  	dev_info(dev, "GPIO functionality initialized with %d pins\n",
b868db94a6a7047 Andrew Lunn       2019-01-25  321  		 chip->ngpio);
b868db94a6a7047 Andrew Lunn       2019-01-25  322  
b868db94a6a7047 Andrew Lunn       2019-01-25  323  	return 0;
b868db94a6a7047 Andrew Lunn       2019-01-25  324  
b868db94a6a7047 Andrew Lunn       2019-01-25  325  out_pm_dis:
b868db94a6a7047 Andrew Lunn       2019-01-25  326  	pm_runtime_disable(&pdev->dev);
b868db94a6a7047 Andrew Lunn       2019-01-25  327  
b868db94a6a7047 Andrew Lunn       2019-01-25  328  	return ret;
b868db94a6a7047 Andrew Lunn       2019-01-25  329  }
b868db94a6a7047 Andrew Lunn       2019-01-25  330  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

end of thread, other threads:[~2022-02-11  0:43 UTC | newest]

Thread overview: 94+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 12:02 [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain Marc Zyngier
2022-02-01 12:02 ` Marc Zyngier
2022-02-01 12:02 ` Marc Zyngier
2022-02-01 12:02 ` [PATCH 01/12] genirq: Allow the PM device to originate from " Marc Zyngier
2022-02-01 12:02   ` Marc Zyngier
2022-02-01 12:02   ` Marc Zyngier
2022-02-02 14:25   ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-03  7:04   ` Tony Lindgren
2022-02-03  7:04     ` Tony Lindgren
2022-02-03  7:04     ` Tony Lindgren
2022-02-09 16:18   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 02/12] irqchip/gic: Move PM device over to " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:25   ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-02 14:25     ` Geert Uytterhoeven
2022-02-09 16:18   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 03/12] irqchip/renesas-intc-gpio: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:27   ` Geert Uytterhoeven
2022-02-02 14:27     ` Geert Uytterhoeven
2022-02-02 14:27     ` Geert Uytterhoeven
2022-02-09 13:40     ` Marc Zyngier
2022-02-09 13:40       ` Marc Zyngier
2022-02-09 13:40       ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] irqchip/renesas-intc-irqpin: " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 04/12] irqchip/renesas-irqc: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:28   ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 05/12] irqchip/imx-intmux: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 06/12] gpio: mt7621: Kill parent_device usage Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 07/12] gpio: omap: Move PM device over to irq domain Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-03  7:05   ` Tony Lindgren
2022-02-03  7:05     ` Tony Lindgren
2022-02-03  7:05     ` Tony Lindgren
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 08/12] gpio: rcar: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-02 14:28   ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-02 14:28     ` Geert Uytterhoeven
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 09/12] gpio: tpmx86: " Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 10/12] pinctrl: npcm: Fix broken references to chip->parent_device Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
2022-02-11  0:42   ` [PATCH 10/12] " Linus Walleij
2022-02-11  0:42     ` Linus Walleij
2022-02-11  0:42     ` Linus Walleij
2022-02-01 12:03 ` [PATCH 11/12] pinctrl: starfive: Move PM device over to irq domain Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 15:16   ` Emil Renner Berthing
2022-02-01 15:16     ` Emil Renner Berthing
2022-02-01 15:16     ` Emil Renner Berthing
2022-02-01 15:30     ` Emil Renner Berthing
2022-02-01 15:30       ` Emil Renner Berthing
2022-02-01 15:30       ` Emil Renner Berthing
2022-02-01 16:06     ` Marc Zyngier
2022-02-01 16:06       ` Marc Zyngier
2022-02-01 16:06       ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
2022-02-01 12:03 ` [PATCH 12/12] genirq: Kill irq_chip::parent_device Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-01 12:03   ` Marc Zyngier
2022-02-09 16:17   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-02-10 11:09   ` irqchip-bot for Marc Zyngier
2022-02-08 11:13 ` [PATCH 00/12] genirq: Move irqchip runtime PM over to irq domain Bartosz Golaszewski
2022-02-08 11:13   ` Bartosz Golaszewski
2022-02-08 11:13   ` Bartosz Golaszewski
2022-02-03 14:06 [PATCH 09/12] gpio: tpmx86: Move PM device " kernel test robot

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.