From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Marijn Suijten <marijn.suijten@somainline.org>
Cc: phone-devel@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
~postmarketos/upstreaming@lists.sr.ht,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@somainline.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Martin Botka <martin.botka@somainline.org>,
linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org,
Rob Herring <robh@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Matthias Kaehlcke <mka@chromium.org>,
Stephen Boyd <swboyd@chromium.org>,
Satya Priya <quic_c_skakit@quicinc.com>
Subject: Re: [PATCH 2/4] leds: qcom-lpg: Add PM660L configuration and compatible
Date: Tue, 10 May 2022 22:54:07 -0500 [thread overview]
Message-ID: <YnszX1wdQhUSkgyH@builder.lan> (raw)
In-Reply-To: <20220507221123.2201668-2-marijn.suijten@somainline.org>
On Sat 07 May 17:11 CDT 2022, Marijn Suijten wrote:
> Inherit PM660L PMIC LPG/triled block configuration from downstream
> drivers and DT sources, consisting of a triled block with automatic
> trickle charge control and source selection, three colored led channels
> belonging to the synchronized triled block and one loose PWM channel.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
> drivers/leds/rgb/leds-qcom-lpg.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
> index cfa3362b2457..30c12ac8eed4 100644
> --- a/drivers/leds/rgb/leds-qcom-lpg.c
> +++ b/drivers/leds/rgb/leds-qcom-lpg.c
> @@ -1271,6 +1271,23 @@ static int lpg_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static const struct lpg_data pm660l_lpg_data = {
> + .lut_base = 0xb000,
> + .lut_size = 0x100,
The documentation tells me that you have 49 entries of LUT on the
PM660L.
> +
> + .triled_base = 0xd000,
> + .triled_has_atc_ctl = true,
> + .triled_has_src_sel = true,
> +
> + .num_channels = 4,
> + .channels = (struct lpg_channel_data[]) {
This can be const
Regards,
Bjorn
> + { .base = 0xb100, .triled_mask = BIT(5) },
> + { .base = 0xb200, .triled_mask = BIT(6) },
> + { .base = 0xb300, .triled_mask = BIT(7) },
> + { .base = 0xb400 },
> + },
> +};
> +
> static const struct lpg_data pm8916_pwm_data = {
> .num_channels = 1,
> .channels = (const struct lpg_channel_data[]) {
> @@ -1391,6 +1408,7 @@ static const struct lpg_data pm8350c_pwm_data = {
> };
>
> static const struct of_device_id lpg_of_table[] = {
> + { .compatible = "qcom,pm660l-lpg", .data = &pm660l_lpg_data },
> { .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data },
> { .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data },
> { .compatible = "qcom,pm8350c-pwm", .data = &pm8350c_pwm_data },
> --
> 2.36.0
>
next prev parent reply other threads:[~2022-05-11 3:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-07 22:11 [PATCH 1/4] dt-bindings: leds: qcom-lpg: Add compatible for PM660L LPG block Marijn Suijten
2022-05-07 22:11 ` [PATCH 2/4] leds: qcom-lpg: Add PM660L configuration and compatible Marijn Suijten
2022-05-11 3:54 ` Bjorn Andersson [this message]
2022-05-11 8:39 ` Marijn Suijten
2022-05-07 22:11 ` [PATCH 3/4] arm64: dts: qcom: pm660l: Add LPG node Marijn Suijten
2022-05-07 22:11 ` [PATCH 4/4] arm64: dts: qcom: sdm630-nile: Add RGB status LED on the PM660L LPG Marijn Suijten
-- strict thread matches above, loose matches on Subject: below --
2022-05-04 20:57 [PATCH 1/4] dt-bindings: leds: qcom-lpg: Add compatible for PM660L LPG block Marijn Suijten
2022-05-04 20:57 ` [PATCH 2/4] leds: qcom-lpg: Add PM660L configuration and compatible Marijn Suijten
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=YnszX1wdQhUSkgyH@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=angelogioacchino.delregno@somainline.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=martin.botka@somainline.org \
--cc=mka@chromium.org \
--cc=pavel@ucw.cz \
--cc=phone-devel@vger.kernel.org \
--cc=quic_c_skakit@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=swboyd@chromium.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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