Skip to content

Commit 54a1f3e

Browse files
alcharkKAGA-KOKO
authored andcommitted
irqchip/irq-vt8500: Don't require 8 interrupts from a chained controller
VT8500 chained controller can route its interrupts to either or all of its 8 interrupt outputs. Current code actually routes all of them to the first output, so there is no need to create mappings for all eight. Drop redundant checks, and only map as many chained controller interrupts as are defined in the device tree. Signed-off-by: Alexey Charkov <alchark@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250506-vt8500-intc-updates-v2-3-a3a0606cf92d@gmail.com
1 parent 45453df commit 54a1f3e

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

drivers/irqchip/irq-vt8500.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,16 +220,9 @@ static int __init vt8500_irq_init(struct device_node *node,
220220

221221
active_cnt++;
222222

223-
/* check if this is a slaved controller */
223+
/* check if this is a chained controller */
224224
if (of_irq_count(node) != 0) {
225-
/* check that we have the correct number of interrupts */
226-
if (of_irq_count(node) != 8) {
227-
pr_err("%s: Incorrect IRQ map for slaved controller\n",
228-
__func__);
229-
return -EINVAL;
230-
}
231-
232-
for (i = 0; i < 8; i++) {
225+
for (i = 0; i < of_irq_count(node); i++) {
233226
irq = irq_of_parse_and_map(node, i);
234227
enable_irq(irq);
235228
}

0 commit comments

Comments
 (0)