Re: [PATCH] leds: rgb: leds-qcom-lpg: Add PWM frequency mode support
From: Fenglin Wu
Date: Sun Aug 02 2026 - 21:51:33 EST
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