* [PATCH] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found
@ 2024-09-24 22:34 Judith Mendez
0 siblings, 0 replies; only message in thread
From: Judith Mendez @ 2024-09-24 22:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Daniel Lezcano, Thomas Gleixner, Judith Mendez
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>
---
drivers/clocksource/timer-ti-dm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index b7a34b1a975e..1b61fefed213 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_err(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))
--
2.46.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-24 22:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-24 22:34 [PATCH] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found Judith Mendez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®