Commit 99e94768 authored by Nícolas F. R. A. Prado's avatar Nícolas F. R. A. Prado Committed by Bjorn Andersson
Browse files

arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused



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: 7ec3e673 ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt")
Signed-off-by: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240614-sc7180-pwmleds-probe-v1-1-e2c3f1b42a43@collabora.com


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent dc323623
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,6 +12,6 @@ / {
	compatible = "google,lazor-rev1-sku2", "google,lazor-rev2-sku2", "qcom,sc7180";
};

&keyboard_backlight {
&pwmleds {
	status = "okay";
};
+1 −1
Original line number Diff line number Diff line
@@ -17,6 +17,6 @@ &ap_sar_sensor_i2c {
	status = "okay";
};

&keyboard_backlight {
&pwmleds {
	status = "okay";
};
+1 −1
Original line number Diff line number Diff line
@@ -18,6 +18,6 @@ / {
	compatible = "google,lazor-sku2", "qcom,sc7180";
};

&keyboard_backlight {
&pwmleds {
	status = "okay";
};
+1 −1
Original line number Diff line number Diff line
@@ -22,6 +22,6 @@ &ap_sar_sensor_i2c {
	status = "okay";
};

&keyboard_backlight {
&pwmleds {
	status = "okay";
};
+1 −1
Original line number Diff line number Diff line
@@ -21,6 +21,6 @@ / {
		"qcom,sc7180";
};

&keyboard_backlight {
&pwmleds {
	status = "okay";
};
Loading