]> www.infradead.org Git - linux.git/commitdiff
arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused
authorNĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Fri, 14 Jun 2024 20:59:36 +0000 (16:59 -0400)
committerBjorn Andersson <andersson@kernel.org>
Fri, 21 Jun 2024 05:38:24 +0000 (00:38 -0500)
Currently the keyboard backlight is described in the common
sc7180-trogdor dtsi as an led node below a pwmleds node, and the led
node is set to disabled. Only the boards that have a keyboard backlight
enable it.

However, since the parent pwmleds node is still enabled everywhere, even
on boards that don't have keyboard backlight it is probed and fails,
resulting in an error:

  leds_pwm pwmleds: probe with driver leds_pwm failed with error -22

as well as a failure in the DT kselftest:

  not ok 45 /pwmleds

Fix this by controlling the status of the parent pwmleds node instead of
the child led, based on the presence of keyboard backlight. This is what
is done on sc7280 already.

While at it add a missing blank line before the child node to follow the
coding style.

Fixes: 7ec3e67307f8 ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt")
Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240614-sc7180-pwmleds-probe-v1-1-e2c3f1b42a43@collabora.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-kb.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-kb.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-lte.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi

index 919bfaea6189c3f700813ce26b5d206e97fc4a95..340cb119d0a0d25b6fdb798cc85d26349c27aca4 100644 (file)
@@ -12,6 +12,6 @@
        compatible = "google,lazor-rev1-sku2", "google,lazor-rev2-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index eb20157f6af98746fe84b70e9ddf406f296a13d3..d45e60e3eb9ebd248c38d14929730c40f4f2cfa6 100644 (file)
@@ -17,6 +17,6 @@
        status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index 45d34718a1bce351910a543ef0eed0228c10b9fe..e906ce877b8cd36599640a30a63000b948611a06 100644 (file)
@@ -18,6 +18,6 @@
        compatible = "google,lazor-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index 79028d0dd1b0c15ec214b93c5370428c91cfc64a..4b9ee15b09f6b3d105bff6c44f6b43b04139642a 100644 (file)
@@ -22,6 +22,6 @@
        status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index 3459b81c56283f314e0ebf474eb0355c738c2a7a..a960553f3994627ab5ab5509198342a632ff5f0a 100644 (file)
@@ -21,6 +21,6 @@
                "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index ff8f47da109d817ca9f3b6b958f012de09f0364a..82bd9ed7e21a92be618b47d90351e8fb451fcb6b 100644 (file)
@@ -25,6 +25,6 @@
        status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index faf527972977a162300776e13829a7daa74c5306..6278c1715d3fde650512a7a472b2a7f912258a39 100644 (file)
@@ -18,6 +18,6 @@
        compatible = "google,lazor-rev9-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index d737fd0637fbc556d3fd83e1ff1ff3b563ff2546..0ec1697ae2c97372b14a916bd6991964ad3d7856 100644 (file)
@@ -22,6 +22,6 @@
        status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index 4d33c3fbedff79ada1aad94b42a7c513a9bba5c8..74ab321d3333cf8fdca45c7cde2fcd9d34b264b2 100644 (file)
                #sound-dai-cells = <0>;
        };
 
-       pwmleds {
+       pwmleds: pwmleds {
                compatible = "pwm-leds";
+               status = "disabled";
+
                keyboard_backlight: led-0 {
-                       status = "disabled";
                        label = "cros_ec::kbd_backlight";
                        function = LED_FUNCTION_KBD_BACKLIGHT;
                        pwms = <&cros_ec_pwm 0>;