Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Luca Weiss <luca@z3ntu.xyz>,
	~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Stephen Boyd <sboyd@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG
Date: Fri, 14 Apr 2023 01:33:43 +0200	[thread overview]
Message-ID: <197870c5-4ef4-ed21-9e03-5169f4100bc6@linaro.org> (raw)
In-Reply-To: <20230414-pmi632-v1-4-fe94dc414832@z3ntu.xyz>



On 14.04.2023 01:17, Luca Weiss wrote:
> The PMI632 PMIC contains 5 PWM channels, 3 of which can be used for
> LEDs.
> 
> For the LED pattern it doesn't have LUT like other PMICs but uses SDAM
> instead. This is not currently implemented in the driver but since LPG
> works fine without it, add support for the PMIC now.
> 
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
Matches everything i see in 4.19!

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/leds/rgb/leds-qcom-lpg.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
> index 67f48f222109..51763ecb8c1e 100644
> --- a/drivers/leds/rgb/leds-qcom-lpg.c
> +++ b/drivers/leds/rgb/leds-qcom-lpg.c
> @@ -1353,6 +1353,20 @@ static const struct lpg_data pm8994_lpg_data = {
>  	},
>  };
>  
> +/* PMI632 uses SDAM instead of LUT for pattern */
> +static const struct lpg_data pmi632_lpg_data = {
> +	.triled_base = 0xd000,
> +
> +	.num_channels = 5,
> +	.channels = (const struct lpg_channel_data[]) {
> +		{ .base = 0xb300, .triled_mask = BIT(7) },
> +		{ .base = 0xb400, .triled_mask = BIT(6) },
> +		{ .base = 0xb500, .triled_mask = BIT(5) },
> +		{ .base = 0xb600 },
> +		{ .base = 0xb700 },
> +	},
> +};
> +
>  static const struct lpg_data pmi8994_lpg_data = {
>  	.lut_base = 0xb000,
>  	.lut_size = 24,
> @@ -1436,6 +1450,7 @@ static const struct of_device_id lpg_of_table[] = {
>  	{ .compatible = "qcom,pm8916-pwm", .data = &pm8916_pwm_data },
>  	{ .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data },
>  	{ .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data },
> +	{ .compatible = "qcom,pmi632-lpg", .data = &pmi632_lpg_data },
>  	{ .compatible = "qcom,pmi8994-lpg", .data = &pmi8994_lpg_data },
>  	{ .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data },
>  	{ .compatible = "qcom,pmc8180c-lpg", .data = &pm8150l_lpg_data },
> 

  reply	other threads:[~2023-04-13 23:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 23:17 [PATCH 0/8] Add PMI632 PMIC and RGB LED on sdm632-fairphone-fp3 Luca Weiss
2023-04-13 23:17 ` [PATCH 1/8] dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632 Luca Weiss
2023-04-14  7:55   ` Krzysztof Kozlowski
2023-04-13 23:17 ` [PATCH 2/8] pinctrl: qcom: spmi-gpio: Add PMI632 support Luca Weiss
2023-04-13 23:27   ` Konrad Dybcio
2023-04-21  8:26   ` Linus Walleij
2023-04-13 23:17 ` [PATCH 3/8] dt-bindings: leds: qcom-lpg: Add compatible for PMI632 LPG block Luca Weiss
2023-04-14  7:55   ` Krzysztof Kozlowski
2023-04-13 23:17 ` [PATCH 4/8] leds: qcom-lpg: Add support for PMI632 LPG Luca Weiss
2023-04-13 23:33   ` Konrad Dybcio [this message]
2023-04-14 12:22   ` Pavel Machek
2023-04-13 23:17 ` [PATCH 5/8] dt-bindings: iio: adc: qcom,spmi-vadc: Allow 1/16 for pre-scaling Luca Weiss
2023-04-14  7:56   ` Krzysztof Kozlowski
2023-04-15 16:20     ` Jonathan Cameron
2023-04-13 23:17 ` [PATCH 6/8] dt-bindings: mfd: qcom-spmi-pmic: Add PMI632 compatible Luca Weiss
2023-04-14  7:56   ` Krzysztof Kozlowski
2023-04-14 12:26   ` Pavel Machek
2023-04-13 23:17 ` [PATCH 7/8] arm64: dts: qcom: Add PMI632 PMIC Luca Weiss
2023-04-13 23:17 ` [PATCH 8/8] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED Luca Weiss
2023-04-13 23:36   ` Konrad Dybcio
2023-04-14 15:49     ` Luca Weiss
2023-04-14 12:24   ` Pavel Machek
2023-04-14 15:48     ` Luca Weiss

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=197870c5-4ef4-ed21-9e03-5169f4100bc6@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=luca@z3ntu.xyz \
    --cc=pavel@ucw.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.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