mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found
@ 2024-10-11 17:52 Judith Mendez
  2024-10-28 15:14 ` Daniel Lezcano
  2024-11-13 20:20 ` [tip: timers/core] " tip-bot2 for Judith Mendez
  0 siblings, 2 replies; 3+ messages in thread
From: Judith Mendez @ 2024-10-11 17:52 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, Vignesh Raghavendra, Bryan Brattlof, 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>
---
Changes since v1:
- Switch to dev_info()
- Drop fixes tag

Link to v1: https://lore.kernel.org/all/20241010144440.24654-1-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..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))

base-commit: d3d1556696c1a993eec54ac585fe5bf677e07474
-- 
2.47.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found
  2024-10-11 17:52 [PATCH v2] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found Judith Mendez
@ 2024-10-28 15:14 ` Daniel Lezcano
  2024-11-13 20:20 ` [tip: timers/core] " tip-bot2 for Judith Mendez
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2024-10-28 15:14 UTC (permalink / raw)
  To: Judith Mendez, Thomas Gleixner
  Cc: linux-kernel, Vignesh Raghavendra, Bryan Brattlof

On 11/10/2024 19:52, Judith Mendez wrote:
> 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>
> ---

Applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: timers/core] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found
  2024-10-11 17:52 [PATCH v2] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found Judith Mendez
  2024-10-28 15:14 ` Daniel Lezcano
@ 2024-11-13 20:20 ` tip-bot2 for Judith Mendez
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Judith Mendez @ 2024-11-13 20:20 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Judith Mendez, Daniel Lezcano, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     314413317b6d78cc76cd48f0296fde9fcfdec400
Gitweb:        https://git.kernel.org/tip/314413317b6d78cc76cd48f0296fde9fcfdec400
Author:        Judith Mendez <jm@ti.com>
AuthorDate:    Fri, 11 Oct 2024 12:52:03 -05:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Wed, 13 Nov 2024 13:49:33 +01:00

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>
---
 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 b7a34b1..3666d94 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))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-13 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-11 17:52 [PATCH v2] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found Judith Mendez
2024-10-28 15:14 ` Daniel Lezcano
2024-11-13 20:20 ` [tip: timers/core] " tip-bot2 for 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®