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 919bfae..340cb11 100644 (file)
@@ -12,6 +12,6 @@
        compatible = "google,lazor-rev1-sku2", "google,lazor-rev2-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index eb20157..d45e60e 100644 (file)
@@ -17,6 +17,6 @@
        status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index 45d3471..e906ce8 100644 (file)
@@ -18,6 +18,6 @@
        compatible = "google,lazor-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index 79028d0..4b9ee15 100644 (file)
@@ -22,6 +22,6 @@
        status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index 3459b81..a960553 100644 (file)
@@ -21,6 +21,6 @@
                "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index ff8f47d..82bd9ed 100644 (file)
@@ -25,6 +25,6 @@
        status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index faf5279..6278c17 100644 (file)
@@ -18,6 +18,6 @@
        compatible = "google,lazor-rev9-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index d737fd0..0ec1697 100644 (file)
@@ -22,6 +22,6 @@
        status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
        status = "okay";
 };
index 4d33c3f..74ab321 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>;