From: Lee Jones <lee@kernel.org>
To: Anjelique Melendez <quic_amelende@quicinc.com>
Cc: pavel@ucw.cz, thierry.reding@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
agross@kernel.org, andersson@kernel.org,
luca.weiss@fairphone.com, konrad.dybcio@linaro.org,
u.kleine-koenig@pengutronix.de, quic_subbaram@quicinc.com,
quic_gurus@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 v8 4/7] leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM
Date: Thu, 11 Jan 2024 10:06:31 +0000 [thread overview]
Message-ID: <20240111100631.GL7948@google.com> (raw)
In-Reply-To: <20231221185838.28440-5-quic_amelende@quicinc.com>
On Thu, 21 Dec 2023, Anjelique Melendez wrote:
> In some PMICs like pmi632, the pattern look up table (LUT) and LPG
> configuration is stored in a single SDAM module instead of LUT
> peripheral. This feature is called PPG. PPG uses Qualcomm Programmable
> Boot Sequencer (PBS) inorder to trigger pattern sequences for PMICs.
>
> Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
> Tested-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> drivers/leds/rgb/leds-qcom-lpg.c | 268 ++++++++++++++++++++++++++++---
> 1 file changed, 244 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
> index 68d82a682bf6..a76cb1d6b7b5 100644
> --- a/drivers/leds/rgb/leds-qcom-lpg.c
> +++ b/drivers/leds/rgb/leds-qcom-lpg.c
> @@ -8,11 +8,13 @@
> #include <linux/bitfield.h>
> #include <linux/led-class-multicolor.h>
> #include <linux/module.h>
> +#include <linux/nvmem-consumer.h>
> #include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pwm.h>
> #include <linux/regmap.h>
> #include <linux/slab.h>
> +#include <linux/soc/qcom/qcom-pbs.h>
[...]
> +static void lpg_sdam_apply_lut_control(struct lpg_channel *chan)
> +{
> + struct nvmem_device *lpg_chan_sdam = chan->lpg->lpg_chan_sdam;
> + unsigned int lo_idx = chan->pattern_lo_idx;
> + unsigned int hi_idx = chan->pattern_hi_idx;
> + u8 val = 0, conf = 0;
> +
> + if (!chan->ramp_enabled || chan->pattern_lo_idx == chan->pattern_hi_idx)
Nit: you can use lo_idx and hi_idx here instead, right?
Please fix this up subsequently.
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2024-01-11 10:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 18:58 [PATCH v8 0/7] Add support for LUT PPG Anjelique Melendez
2023-12-21 18:58 ` [PATCH v8 1/7] dt-bindings: soc: qcom: Add qcom,pbs bindings Anjelique Melendez
2023-12-21 18:58 ` [PATCH v8 2/7] dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG Anjelique Melendez
2023-12-21 18:58 ` [PATCH v8 3/7] soc: qcom: add QCOM PBS driver Anjelique Melendez
2024-01-25 13:04 ` Lee Jones
2024-01-30 21:21 ` Bjorn Andersson
2024-01-31 8:58 ` Lee Jones
2024-02-01 20:50 ` Anjelique Melendez
2024-02-01 23:28 ` Bjorn Andersson
2024-02-02 12:43 ` Lee Jones
2024-02-08 11:07 ` Lee Jones
2023-12-21 18:58 ` [PATCH v8 4/7] leds: rgb: leds-qcom-lpg: Add support for PPG through single SDAM Anjelique Melendez
2024-01-11 10:06 ` Lee Jones [this message]
2023-12-21 18:58 ` [PATCH v8 5/7] leds: rgb: leds-qcom-lpg: Update PMI632 lpg_data to support PPG Anjelique Melendez
2023-12-21 18:58 ` [PATCH v8 6/7] leds: rgb: leds-qcom-lpg: Include support for PPG with dedicated LUT SDAM Anjelique Melendez
2023-12-21 18:58 ` [PATCH v8 7/7] leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme Anjelique Melendez
2024-01-11 10:05 ` (subset) [PATCH v8 0/7] Add support for LUT PPG Lee Jones
2024-01-11 10:07 ` Lee Jones
2024-01-16 18:49 ` Anjelique Melendez
2024-01-18 14:49 ` Lee Jones
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=20240111100631.GL7948@google.com \
--to=lee@kernel.org \
--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=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_amelende@quicinc.com \
--cc=quic_gurus@quicinc.com \
--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;
as well as URLs for NNTP newsgroup(s).