From: sashiko-bot@kernel.org
To: "ShiTou Hong" <redstone.dcity@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 6/6] arm64: dts: qcom: sm8250-hdk: Add the 2 LEDs of PM8150b
Date: Thu, 22 Oct 2026 11:42:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-181378@kernel.org> (raw)
In-Reply-To: <20261022113601.2320940-6-dc_redstone@outlook.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] arm64: dts: qcom: sm8250-hdk: deprecated LED label overrides color in sysfs
--
commit 8610d8172ae62463a8325cbe16b011b5f8fa6fc1
Author: redstonee <1516235445@qq.com>
arm64: dts: qcom: sm8250-hdk: Add the 2 LEDs of PM8150b
This commit enables the pm8150b lpg controller on sm8250-hdk and adds two
child nodes for the green heartbeat and red wlan indicator leds.
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-hdk.dts b/arch/arm64/boot/dts/qcom/sm8250-hdk.dts
> index eb899c92fcfb7..d15e75a4ace5c 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250-hdk.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8250-hdk.dts
> @@ -7,6 +7,7 @@
>
> #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> #include <dt-bindings/usb/pd.h>
> +#include <dt-bindings/leds/common.h>
> #include "sm8250.dtsi"
> #include "pm8150.dtsi"
> #include "pm8150b.dtsi"
> @@ -157,6 +158,25 @@ vreg_pmu_pcie_1p8: ldo9 {
> };
> };
>
> +&pm8150b_lpg {
> + status = "okay";
> +
> + led@1 {
> + reg = <1>;
> + label = "led-heartbeat";
> + linux,default-trigger = "heartbeat";
> + color = <LED_COLOR_ID_GREEN>;
> + };
> +
> + led@2 {
> + reg = <2>;
> + label = "led-wlan";
> + linux,default-trigger = "none";
> + default-state = "off";
> + color = <LED_COLOR_ID_RED>;
> + };
> +};
[Severity: Medium]
When pm8150b_lpg probes in drivers/leds/rgb/leds-qcom-lpg.c, registering
led@1 and led@2 calls:
devm_led_classdev_register_ext() ->
led_classdev_register_ext() ->
led_compose_name() ->
led_parse_fwnode_props()
In drivers/leds/led-core.c:led_parse_fwnode_props(), the presence of the
deprecated label property causes an early return before color or function
are parsed:
if (fwnode_property_present(fwnode, "label")) {
ret = fwnode_property_read_string(fwnode, "label", &props->label);
if (ret)
dev_err(dev, "Error parsing 'label' property (%d)\n", ret);
return;
}
Because label is set on both nodes in
arch/arm64/boot/dts/qcom/sm8250-hdk.dts, color = <LED_COLOR_ID_GREEN> and
color = <LED_COLOR_ID_RED> are ignored at runtime, and the devices are
registered in sysfs as /sys/class/leds/led-heartbeat and
/sys/class/leds/led-wlan instead of /sys/class/leds/green:heartbeat and
/sys/class/leds/red:wlan.
Since label is also deprecated in
Documentation/devicetree/bindings/leds/common.yaml and
dt-bindings/leds/common.h is already included, should led@1 and led@2 use
the function property instead of label:
led@1 {
reg = <1>;
function = LED_FUNCTION_HEARTBEAT;
linux,default-trigger = "heartbeat";
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
function = LED_FUNCTION_WLAN;
linux,default-trigger = "none";
default-state = "off";
color = <LED_COLOR_ID_RED>;
};
so that the color and function properties take effect?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261022113601.2320940-1-dc_redstone@outlook.com?part=6
next prev parent reply other threads:[~2026-10-22 11:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 11:35 [PATCH 1/6] arm64: dts: qcom: sm8250-hdk: Enable the sdhc_2 port ShiTou Hong
2026-10-22 11:35 ` [PATCH 2/6] arm64: dts: qcom: sm8250-hdk: Add LT9611UXC HDMI bridge ShiTou Hong
2026-10-22 11:53 ` sashiko-bot
2026-10-22 11:35 ` [PATCH 3/6] arm64: dts: qcom: sm8250-hdk: Add FSA4480 USB-C protocol chip ShiTou Hong
2026-10-22 11:35 ` [PATCH 4/6] arm64: dts: qcom: sm8250-hdk: Enable the PCIe ports ShiTou Hong
2026-10-22 11:46 ` sashiko-bot
2026-10-22 11:36 ` [PATCH 5/6] arm64: dts: qcom: sm8250-hdk: Add the QCA6390 NIC ShiTou Hong
2026-10-22 11:52 ` sashiko-bot
2026-10-22 11:36 ` [PATCH 6/6] arm64: dts: qcom: sm8250-hdk: Add the 2 LEDs of PM8150b ShiTou Hong
2026-10-22 11:42 ` sashiko-bot [this message]
2026-10-22 11:49 ` [PATCH 1/6] arm64: dts: qcom: sm8250-hdk: Enable the sdhc_2 port sashiko-bot
2026-10-22 11:56 ` Konrad Dybcio
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=sashiko-outbox-181378@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=redstone.dcity@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.