Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Judith Mendez and committed by
Daniel Lezcano
31441331 0309f714

+6 -2
+6 -2
drivers/clocksource/timer-ti-dm.c
··· 1104 1104 return -ENOMEM; 1105 1105 1106 1106 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 + } 1109 1113 1110 1114 timer->io_base = devm_platform_ioremap_resource(pdev, 0); 1111 1115 if (IS_ERR(timer->io_base))