From: Dharma Balasubiramani <dharma.b@microchip.com>
To: "Kamel Bouhara" <kamel.bouhara@bootlin.com>,
"William Breathitt Gray" <wbg@kernel.org>,
"Bence Csókás" <bence98@sch.bme.hu>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Dharma Balasubiramani <dharma.b@microchip.com>
Subject: [PATCH] counter: microchip-tcb-capture: Allow shared IRQ for multi-channel TCBs
Date: Mon, 6 Oct 2025 16:21:50 +0530 [thread overview]
Message-ID: <20251006-microchip-tcb-v1-1-09c19181bb4a@microchip.com> (raw)
Mark the interrupt as IRQF_SHARED to permit multiple counter channels to
share the same TCB IRQ line.
Each Timer/Counter Block (TCB) instance shares a single IRQ line among its
three internal channels. When multiple counter channels (e.g., counter@0
and counter@1) within the same TCB are enabled, the second call to
devm_request_irq() fails because the IRQ line is already requested by the
first channel.
Fixes: e5d581396821 ("counter: microchip-tcb-capture: Add IRQ handling")
Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
---
drivers/counter/microchip-tcb-capture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c
index 1a299d1f350b..19d457ae4c3b 100644
--- a/drivers/counter/microchip-tcb-capture.c
+++ b/drivers/counter/microchip-tcb-capture.c
@@ -451,7 +451,7 @@ static void mchp_tc_irq_remove(void *ptr)
static int mchp_tc_irq_enable(struct counter_device *const counter, int irq)
{
struct mchp_tc_data *const priv = counter_priv(counter);
- int ret = devm_request_irq(counter->parent, irq, mchp_tc_isr, 0,
+ int ret = devm_request_irq(counter->parent, irq, mchp_tc_isr, IRQF_SHARED,
dev_name(counter->parent), counter);
if (ret < 0)
---
base-commit: fd94619c43360eb44d28bd3ef326a4f85c600a07
change-id: 20251006-microchip-tcb-edd8aeae36c4
Best regards,
--
Dharma Balasubiramani <dharma.b@microchip.com>
next reply other threads:[~2025-10-06 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 10:51 Dharma Balasubiramani [this message]
2025-10-08 7:06 ` [PATCH] counter: microchip-tcb-capture: Allow shared IRQ for multi-channel TCBs Kamel Bouhara
2025-10-08 20:46 ` Bence Csókás
2025-10-13 6:01 ` [PATCH] counter: microchip-tcb-capture: Allow shared IRQ for multi-channel TCBs William Breathitt Gray
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=20251006-microchip-tcb-v1-1-09c19181bb4a@microchip.com \
--to=dharma.b@microchip.com \
--cc=bence98@sch.bme.hu \
--cc=kamel.bouhara@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wbg@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).