From: Alexey Charkov <alchark@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Alexey Charkov <alchark@gmail.com>
Subject: [PATCH 3/5] irqchip: vt8500: Don't require 8 interrupts from a chained controller
Date: Thu, 24 Apr 2025 22:35:44 +0400 [thread overview]
Message-ID: <20250424-vt8500-intc-updates-v1-3-4ab7397155b3@gmail.com> (raw)
In-Reply-To: <20250424-vt8500-intc-updates-v1-0-4ab7397155b3@gmail.com>
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>
---
drivers/irqchip/irq-vt8500.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/irqchip/irq-vt8500.c b/drivers/irqchip/irq-vt8500.c
index 6d46e1a0fda953d76679ad2318674fdf0a977f0b..cf24a88f52d1b90f033d429288c88398439b92d1 100644
--- a/drivers/irqchip/irq-vt8500.c
+++ b/drivers/irqchip/irq-vt8500.c
@@ -220,16 +220,9 @@ static int __init vt8500_irq_init(struct device_node *node,
active_cnt++;
- /* check if this is a slaved controller */
+ /* check if this is a chained controller */
if (of_irq_count(node) != 0) {
- /* check that we have the correct number of interrupts */
- if (of_irq_count(node) != 8) {
- pr_err("%s: Incorrect IRQ map for slaved controller\n",
- __func__);
- return -EINVAL;
- }
-
- for (i = 0; i < 8; i++) {
+ for (i = 0; i < of_irq_count(node); i++) {
irq = irq_of_parse_and_map(node, i);
enable_irq(irq);
}
--
2.49.0
next prev parent reply other threads:[~2025-04-24 18:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 18:35 [PATCH 0/5] irqchip: vt8500: Cleanups and fixes for the irq-vt8500 driver Alexey Charkov
2025-04-24 18:35 ` [PATCH 1/5] irqchip: vt8500: Split up ack/mask functions Alexey Charkov
2025-05-06 7:38 ` Thomas Gleixner
2025-05-06 8:46 ` Alexey Charkov
2025-05-06 10:23 ` Thomas Gleixner
2025-04-24 18:35 ` [PATCH 2/5] irqchip: vt8500: Drop redundant copy of the device node pointer Alexey Charkov
2025-04-24 18:35 ` Alexey Charkov [this message]
2025-04-24 18:35 ` [PATCH 4/5] irqchip: vt8500: Use a dedicated chained handler function Alexey Charkov
2025-04-24 18:35 ` [PATCH 5/5] irqchip: vt8500: Use fewer global variables and add error handling Alexey Charkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250424-vt8500-intc-updates-v1-3-4ab7397155b3@gmail.com \
--to=alchark@gmail.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®