From: Anjelique Melendez <quic_amelende@quicinc.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: <pavel@ucw.cz>, <lee@kernel.org>, <thierry.reding@gmail.com>,
<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
<conor+dt@kernel.org>, <agross@kernel.org>,
<luca.weiss@fairphone.com>, <konrad.dybcio@linaro.org>,
<u.kleine-koenig@pengutronix.de>, <quic_subbaram@quicinc.com>,
<linux-leds@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
<linux-pwm@vger.kernel.org>
Subject: Re: [PATCH v3 4/7] leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM
Date: Tue, 15 Aug 2023 17:09:58 -0700 [thread overview]
Message-ID: <23a46503-ca45-26cb-c1df-f765e6db95d4@quicinc.com> (raw)
In-Reply-To: <vt2ma5qiqv4uvzdhhouvxo6ykvfcwlqjjvctcsorfy6dfh2efp@g4viqt2rqvz4>
On 8/15/2023 8:38 AM, Bjorn Andersson wrote:
> On Mon, Aug 14, 2023 at 04:59:15PM -0700, Anjelique Melendez wrote:
[...]>> @@ -65,7 +83,12 @@ struct lpg_data;
>> * @lut_base: base address of the LUT block (optional)
>> * @lut_size: number of entries in the LUT block
>> * @lut_bitmap: allocation bitmap for LUT entries
>> - * @triled_base: base address of the TRILED block (optional)
>> + * @pbs_dev: PBS device
>> + * @lpg_chan_nvmem: LPG nvmem peripheral device
>> + * @pbs_en_bitmap: bitmap for tracking PBS triggers
>> + * @lut_sdam_base: offset where LUT pattern begins in nvmem
>> + * @ppg_en: Flag indicating whether PPG is enabled/used
>
> Looking at its usage, it doesn't feel so much "is PPG enabled" as "does
> this instance use PPG", it's not a thing that can be enabled/disabled in
> runtime.
>
> So "has_ppg" seems like a better name, or perhaps even "use_sdam" and
> avoid "PPG" completely and make it clearer to the average reader?
Sure, can update to be "use_sdam"
[...]
>> +static void lpg_sdam_configure_triggers(struct lpg_channel *chan)
>> +{
>> + if (!chan->lpg->ppg_en)
>> + return;
>> +
>> + if (chan->enabled && chan->pattern_set) {
>> + lpg_sdam_write(chan->lpg, SDAM_LUT_EN_OFFSET + chan->sdam_offset, 1);
>> + lpg_set_pbs_trigger(chan);
>> + chan->pattern_set = false;
>
> Forgive me if I'm confused, but doesn't this mean that if I configure a
> pattern and then set the brightness twice the pattern will be disabled
> again?
Yes, you are correct. With current code we continuously disable pattern.
I took a look at the code again and found that it makes more sense to
disable pattern in clear_pattern().
[...]
>> @@ -1363,7 +1618,9 @@ static int lpg_probe(struct platform_device *pdev)
>> for (i = 0; i < lpg->num_channels; i++)
>> lpg_apply_dtest(&lpg->channels[i]);
>>
>> - return lpg_add_pwm(lpg);
>> + ret = lpg_add_pwm(lpg);
>> +
>> + return ret;
>
> I'm failing to see the usefulness of this change.
Sorry, looks like this was never reverted from an old change when I was debugging.
Will revert back to original for next version.
Thanks,
Anjelique
next prev parent reply other threads:[~2023-08-16 0:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 23:59 [PATCH v3 0/7] Add support for LUT PPG Anjelique Melendez
2023-08-14 23:59 ` [PATCH v3 1/7] dt-bindings: soc: qcom: Add qcom,pbs bindings Anjelique Melendez
2023-08-15 20:36 ` Krzysztof Kozlowski
2023-08-17 16:26 ` Rob Herring
2023-08-18 8:59 ` Krzysztof Kozlowski
2023-08-14 23:59 ` [PATCH v3 2/7] dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG Anjelique Melendez
2023-08-15 20:40 ` Krzysztof Kozlowski
2023-08-14 23:59 ` [PATCH v3 3/7] soc: qcom: add QCOM PBS driver Anjelique Melendez
2023-08-14 23:59 ` [PATCH v3 4/7] leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM Anjelique Melendez
2023-08-15 15:38 ` Bjorn Andersson
2023-08-16 0:09 ` Anjelique Melendez [this message]
2023-08-14 23:59 ` [PATCH v3 5/7] leds: rgb: leds-qcom-lpg: Update PMI632 lpg_data to support PPG Anjelique Melendez
2023-08-14 23:59 ` [PATCH v3 6/7] leds: rgb: leds-qcom-lpg: Support two-nvmem PPG Scheme Anjelique Melendez
2023-08-15 16:17 ` Bjorn Andersson
2023-08-14 23:59 ` [PATCH v3 7/7] leds: rgb: Update PM8350C lpg_data to support " Anjelique Melendez
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=23a46503-ca45-26cb-c1df-f765e6db95d4@quicinc.com \
--to=quic_amelende@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=pavel@ucw.cz \
--cc=quic_subbaram@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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®