Linux LED subsystem development
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Fenglin Wu <fenglin.wu@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, Lee Jones <lee@kernel.org>,
	Pavel Machek <pavel@kernel.org>
Cc: David Collins <david.collins@oss.qualcomm.com>,
	Subbaraman Narayanamurthy
	<subbaraman.narayanamurthy@oss.qualcomm.com>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: rgb: leds-qcom-lpg: Add PWM frequency mode support
Date: Thu, 3 Sep 2026 09:24:01 +0200	[thread overview]
Message-ID: <755d57bf-6cde-41ee-854f-b45f7e9cc81d@oss.qualcomm.com> (raw)
In-Reply-To: <25e0797b-fdb3-44b2-8ea5-df0bc3355648@oss.qualcomm.com>

On 8/3/26 3:50 AM, Fenglin Wu wrote:
> 
> 
> On 7/31/2026 10:20 PM, Konrad Dybcio wrote:
>>>  		regmap_read(lpg->map, chan->base + LPG_SUBTYPE_REG, &chan->subtype);
>>> +		if (data->channels[i].fm_capable) {
>>> +			ret = regmap_read(lpg->map, chan->base + PWM_STATUS1_REG, &status);
>>> +			if (ret < 0)
>>> +				return ret;
>>> +
>>> +			chan->fm_capable = !!(status & PWM_FM_PRESENT);
>> Can we read this register blindly by chance and drop the match data?
> 
> It would result unnecessary read for the PWM channels which don't
> support frequency mode. The register read here is actually just for
> differentiating the HW revisions for pm8350c, where only the V2 support
> frequency mode. And the newer variants of pm8350c PWM4 channel could
> support frequency mode by default.

Usually feature registers are read out unconditionally, since they do
just what they say they do..

but I see that this register doesn't exist on e.g. PM8916, so I'm
willing to go with the approach already present in the patch

Konrad

      reply	other threads:[~2026-09-03  7:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29  9:48 [PATCH] leds: rgb: leds-qcom-lpg: Add PWM frequency mode support Fenglin Wu
2026-07-29  9:58 ` sashiko-bot
2026-07-31 14:20 ` Konrad Dybcio
2026-08-03  1:50   ` Fenglin Wu
2026-09-03  7:24     ` Konrad Dybcio [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=755d57bf-6cde-41ee-854f-b45f7e9cc81d@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=david.collins@oss.qualcomm.com \
    --cc=fenglin.wu@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=subbaraman.narayanamurthy@oss.qualcomm.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