From: Kevin Hilman <khilman@kernel.org>
To: Judith Mendez <jm@ti.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
Vignesh Raghavendra <vigneshr@ti.com>, Bryan Brattlof <bb@ti.com>,
Judith Mendez <jm@ti.com>
Subject: Re: [PATCH RESEND] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found
Date: Fri, 11 Oct 2024 17:24:47 -0700 [thread overview]
Message-ID: <7hwmieuq0g.fsf@baylibre.com> (raw)
In-Reply-To: <20241010144440.24654-1-jm@ti.com>
Judith Mendez <jm@ti.com> writes:
> 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.
>
> Fixes: df28472a1b28 ("ARM: OMAP: dmtimer: platform driver")
> Signed-off-by: Judith Mendez <jm@ti.com>
> ---
> Changes since v1:
> - Rebased, add to CC list, add fixes tag
> ---
> 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"))
nit: this propoery is read from the DT again just a bit lower. Rather
than parse the DT for this property twice, can you move this after the
DT properties are already parsed, and then just check for
(timer->capability & OMAP_TIMER_HAS_PWM) ?
Kevin
prev parent reply other threads:[~2024-10-12 0:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 14:44 [PATCH RESEND] clocksource/drivers/timer-ti-dm: Don't fail probe if int not found Judith Mendez
2024-10-10 21:18 ` Bryan Brattlof
2024-10-11 17:39 ` Judith Mendez
2024-10-12 0:24 ` Kevin Hilman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7hwmieuq0g.fsf@baylibre.com \
--to=khilman@kernel.org \
--cc=bb@ti.com \
--cc=daniel.lezcano@linaro.org \
--cc=jm@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox