From: "Uwe Kleine-König" <ukleinek@kernel.org>
To: Manush Prajwal <manushprajwal555@gmail.com>
Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: tiehrpwm: fix copy-paste error in obsolete DT binding fallback
Date: Tue, 29 Sep 2026 08:00:26 +0200 [thread overview]
Message-ID: <artTMprq3aNbVrLN@monoceros> (raw)
In-Reply-To: <6abaa9fd.8a95a640.187520.71d6@mx.google.com>
[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]
Hello,
On Mon, Sep 28, 2026 at 11:25:09PM +0530, Manush Prajwal wrote:
> ehrpwm_pwm_probe() attempts to provide backward compatibility for older
> device trees where the functional clock "fck" was supplied by the parent
> PWMSS device rather than within the PWM child node itself.
>
> However, when devm_clk_get() for "fck" fails, the fallback checks:
>
> if (of_device_is_compatible(np, "ti,am33xx-ecap")) {
> dev_warn(&pdev->dev, "Binding is obsolete.\n");
> clk = devm_clk_get(pdev->dev.parent, "fck");
> }
>
> Because this logic was copied from pwm-tiecap.c, it mistakenly checks for
> "ti,am33xx-ecap" instead of "ti,am33xx-ehrpwm". An eHRPWM node matches
> ehrpwm_of_match ("ti,am3352-ehrpwm" or "ti,am33xx-ehrpwm") and will never
> be compatible with "ti,am33xx-ecap". Consequently, for any device tree
> using the obsolete "ti,am33xx-ehrpwm" binding, the fallback never triggers
> and probe fails with "Failed to get fck".
>
> Fix the check to test for "ti,am33xx-ehrpwm" as intended.
>
> Signed-off-by: Manush Prajwal <manushprajwal555@gmail.com>
Looks right, I guess it needs:
Fixes: ae5200d22716 ("pwm: pwm-ti*: Get the clock from the PWMSS parent when using old bindings")
.
I wonder: Did you find this because you still use the old bindings, or
by code inspection somehow? If the latter, maybe it's time to drop the
handling instead?
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-09-29 6:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 17:55 Manush Prajwal
2026-09-29 6:00 ` Uwe Kleine-König [this message]
2026-09-29 10:06 Manush Prajwal
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=artTMprq3aNbVrLN@monoceros \
--to=ukleinek@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=manushprajwal555@gmail.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
all inboxes | Powered by JetHome®