Skip to content

Commit 109ff65

Browse files
Dharma BalasubiramaniWilliam Breathitt Gray
authored andcommitted
counter: microchip-tcb-capture: Allow shared IRQ for multi-channel TCBs
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. Cc: stable@vger.kernel.org Fixes: e5d5813 ("counter: microchip-tcb-capture: Add IRQ handling") Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com> Reviewed-by: Kamel Bouhara <kamel.bouhara@bootlin.com> Reviewed-by: Bence Csókás <bence98@sch.bme.hu> Link: https://lore.kernel.org/r/20251006-microchip-tcb-v1-1-09c19181bb4a@microchip.com Signed-off-by: William Breathitt Gray <wbg@kernel.org>
1 parent 3a86608 commit 109ff65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/counter/microchip-tcb-capture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static void mchp_tc_irq_remove(void *ptr)
451451
static int mchp_tc_irq_enable(struct counter_device *const counter, int irq)
452452
{
453453
struct mchp_tc_data *const priv = counter_priv(counter);
454-
int ret = devm_request_irq(counter->parent, irq, mchp_tc_isr, 0,
454+
int ret = devm_request_irq(counter->parent, irq, mchp_tc_isr, IRQF_SHARED,
455455
dev_name(counter->parent), counter);
456456

457457
if (ret < 0)

0 commit comments

Comments
 (0)