[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230919061900.369300-3-danishanwar@ti.com>
Date: Tue, 19 Sep 2023 11:48:59 +0530
From: MD Danish Anwar <danishanwar@...com>
To: Grzegorz Jaszczyk <grzegorz.jaszczyk@...aro.org>,
Suman Anna <s-anna@...com>,
David Lechner <david@...hnology.com>,
Roger Quadros <rogerq@...nel.org>,
"Andrew F. Davis" <afd@...com>, Marc Zyngier <maz@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
CC: <linux-kernel@...r.kernel.org>, <srk@...com>, <danishanwar@...com>,
<r-gunasekaran@...com>, <vigneshr@...com>
Subject: [PATCH 2/3] irqchip/irq-pruss-intc: Fix listed IRQ type in /proc/interrupts
From: Grygorii Strashko <grygorii.strashko@...com>
The PRUSS INTC driver doesn't have .irq_set_type() callback implemented and
supports only IRQ_TYPE_LEVEL_HIGH. This resulted in the IRQ properties not
being updated properly and the PRUSS INTC IRQs were listed incorrectly in
/proc/interrupts as Edge.
Example:
218: 0 4b220000.interrupt-controller 26 Edge pru10
Fix this by adding a simple .irq_set_type() implementation which checks the
requested IRQ triggering type.
Fixes: 04e2d1e06978 ("irqchip/irq-pruss-intc: Add a PRUSS irqchip driver for PRUSS interrupts")
Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
Signed-off-by: Suman Anna <s-anna@...com>
Signed-off-by: MD Danish Anwar <danishanwar@...com>
---
drivers/irqchip/irq-pruss-intc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index 7415817d4c6c..3cf684ede564 100644
--- a/drivers/irqchip/irq-pruss-intc.c
+++ b/drivers/irqchip/irq-pruss-intc.c
@@ -373,6 +373,14 @@ static int pruss_intc_irq_set_irqchip_state(struct irq_data *data,
return 0;
}
+static int pruss_intc_irq_irq_set_type(struct irq_data *data, unsigned int type)
+{
+ if (type != IRQ_TYPE_LEVEL_HIGH)
+ return -EINVAL;
+
+ return 0;
+}
+
static struct irq_chip pruss_irqchip = {
.name = "pruss-intc",
.irq_ack = pruss_intc_irq_ack,
@@ -382,6 +390,7 @@ static struct irq_chip pruss_irqchip = {
.irq_release_resources = pruss_intc_irq_relres,
.irq_get_irqchip_state = pruss_intc_irq_get_irqchip_state,
.irq_set_irqchip_state = pruss_intc_irq_set_irqchip_state,
+ .irq_set_type = pruss_intc_irq_irq_set_type,
};
static int pruss_intc_validate_mapping(struct pruss_intc *intc, int event,
--
2.34.1
Powered by blists - more mailing lists