From: Luca Weiss <luca@z3ntu.xyz>
To: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org, Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] ARM: dts: qcom: msm8974-oneplus-bacon: Add notification LED
Date: Thu, 26 Jan 2023 21:41:58 +0100 [thread overview]
Message-ID: <1840339.tdWV9SEqCh@g550jk> (raw)
In-Reply-To: <dbfa802a-968f-0504-a131-59e2a8f52c9f@linaro.org>
On Donnerstag, 26. Jänner 2023 10:41:24 CET Krzysztof Kozlowski wrote:
> On 25/01/2023 21:51, Luca Weiss wrote:
> > On Montag, 23. Jänner 2023 18:18:16 CET Krzysztof Kozlowski wrote:
> >> On 22/01/2023 17:48, Luca Weiss wrote:
> >>> Add the node describing the sn3193 that's used to provide notification
> >>> LED.
> >>>
> >>> Unfortunately the driver currently supports neither multicolor API nor
> >>> using the properties function & color, so we use label instead.
> >>>
> >>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> >>> ---
> >>>
> >>> .../arm/boot/dts/qcom-msm8974pro-oneplus-bacon.dts | 28
> >>> ++++++++++++++++++++++ 1 file changed, 28 insertions(+)
> >>>
> >>> diff --git a/arch/arm/boot/dts/qcom-msm8974pro-oneplus-bacon.dts
> >>> b/arch/arm/boot/dts/qcom-msm8974pro-oneplus-bacon.dts index
> >>> ffb486ceb6a6..a672c45d7070 100644
> >>> --- a/arch/arm/boot/dts/qcom-msm8974pro-oneplus-bacon.dts
> >>> +++ b/arch/arm/boot/dts/qcom-msm8974pro-oneplus-bacon.dts
> >>> @@ -114,6 +114,34 @@ led@0 {
> >>>
> >>> default-brightness = <80>;
> >>>
> >>> };
> >>>
> >>> };
> >>>
> >>> +
> >>> + led-controller@68 {
> >>> + compatible = "si-en,sn3193";
> >>> + reg = <0x68>;
> >>> +
> >>> + shutdown-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
> >>> +
> >>> + #address-cells = <1>;
> >>> + #size-cells = <0>;
> >>> +
> >>> + led@1 {
> >>> + reg = <1>;
> >>> + label = "red:status";
> >>
> >> These should be colors and functions.
> >
> > Hi Krzysztof,
> >
> > please check the commit message for this. I tried using it but it didn't
> > work, the driver in general might need an overhaul at some point...
> >
> >> Unfortunately the driver currently supports neither multicolor API nor
> >> using the properties function & color, so we use label instead.
> >
> > Or maybe I messed up but pretty sure this was the case when I wrote the
> > dts.
> I don't understand how driver is related here - it's not the driver's
> property, but LED core. If the driver "supports" label, then it supports
> color and status.
The leds-is31fl319x.c driver uses devm_led_classdev_register but the function
where 'function' and 'color' is parsed is led_parse_fwnode_props which is
called from led_compose_name which is called from led_classdev_register_ext
(or with the devm_ prefix), and not called from the register method without
_ext suffix.
So in other words, the led driver would need changes to use the new
registration API to be able to use 'function' and 'color' instead of 'label'.
Regards
Luca
>
> Best regards,
> Krzysztof
next prev parent reply other threads:[~2023-01-26 20:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-22 16:48 [PATCH 0/5] Add support for some features on OnePlus One Luca Weiss
2023-01-22 16:48 ` [PATCH 1/5] ARM: dts: qcom: pm8941: Add vibrator node Luca Weiss
2023-01-23 16:39 ` Konrad Dybcio
2023-01-22 16:48 ` [PATCH 2/5] ARM: dts: qcom: msm8974-oneplus-bacon: Add vibrator Luca Weiss
2023-01-23 16:39 ` Konrad Dybcio
2023-01-22 16:48 ` [PATCH 3/5] ARM: dts: qcom: msm8974-oneplus-bacon: Add volume keys and hall sensor Luca Weiss
2023-01-23 16:42 ` Konrad Dybcio
2023-01-22 16:48 ` [PATCH 4/5] ARM: dts: qcom: msm8974-oneplus-bacon: Add backlight Luca Weiss
2023-01-23 16:43 ` Konrad Dybcio
2023-01-22 16:48 ` [PATCH 5/5] ARM: dts: qcom: msm8974-oneplus-bacon: Add notification LED Luca Weiss
2023-01-23 16:44 ` Konrad Dybcio
2023-01-23 17:18 ` Krzysztof Kozlowski
2023-01-25 20:51 ` Luca Weiss
2023-01-26 9:41 ` Krzysztof Kozlowski
2023-01-26 20:41 ` Luca Weiss [this message]
2023-01-27 8:27 ` Krzysztof Kozlowski
2023-02-11 16:22 ` Pavel Machek
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=1840339.tdWV9SEqCh@g550jk \
--to=luca@z3ntu.xyz \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).