Skip to content

Commit 3144133

Browse files
jmentidlezcano
authored andcommitted
clocksource/drivers/timer-ti-dm: Don't fail probe if int not found
Some timers may not have an interrupt routed to the A53 GIC, but the timer PWM functionality can still be used by Linux Kernel. Therefore, do not fail probe if interrupt is not found and ti,timer-pwm exists. Signed-off-by: Judith Mendez <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 0309f71 commit 3144133

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/clocksource/timer-ti-dm.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,8 +1104,12 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
11041104
return -ENOMEM;
11051105

11061106
timer->irq = platform_get_irq(pdev, 0);
1107-
if (timer->irq < 0)
1108-
return timer->irq;
1107+
if (timer->irq < 0) {
1108+
if (of_property_read_bool(dev->of_node, "ti,timer-pwm"))
1109+
dev_info(dev, "Did not find timer interrupt, timer usable in PWM mode only\n");
1110+
else
1111+
return timer->irq;
1112+
}
11091113

11101114
timer->io_base = devm_platform_ioremap_resource(pdev, 0);
11111115
if (IS_ERR(timer->io_base))

0 commit comments

Comments
 (0)