Re: [PATCH] leds: rgb: leds-qcom-lpg: Add PWM frequency mode support

Fenglin Wu <[email protected]> Mon, 3 Aug 2026 09:50:29 +0800
Newsgroups org.kernel.vger.linux-leds,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

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.

Thanks
Fenglin