summaryrefslogtreecommitdiff
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorJudith Mendez <jm@ti.com>2024-10-11 12:52:03 -0500
committerDaniel Lezcano <daniel.lezcano@linaro.org>2024-11-13 13:49:33 +0100
commit314413317b6d78cc76cd48f0296fde9fcfdec400 (patch)
tree3f210513dfb407410b4789959d1f52bf79d3fcde /drivers/clocksource
parent0309f714a0908e947af1c902cf6a330cb593e75e (diff)
downloadlwn-314413317b6d78cc76cd48f0296fde9fcfdec400.tar.gz
lwn-314413317b6d78cc76cd48f0296fde9fcfdec400.zip
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 <jm@ti.com> Link: https://lore.kernel.org/r/20241011175203.1040568-1-jm@ti.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/timer-ti-dm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index b7a34b1a975e..3666d94cc8dd 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -1104,8 +1104,12 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
return -ENOMEM;
timer->irq = platform_get_irq(pdev, 0);
- if (timer->irq < 0)
- return timer->irq;
+ if (timer->irq < 0) {
+ if (of_property_read_bool(dev->of_node, "ti,timer-pwm"))
+ dev_info(dev, "Did not find timer interrupt, timer usable in PWM mode only\n");
+ else
+ return timer->irq;
+ }
timer->io_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(timer->io_base))