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

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.comSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent dc323623
......@@ -12,6 +12,6 @@ / {
compatible = "google,lazor-rev1-sku2", "google,lazor-rev2-sku2", "qcom,sc7180";
};
&keyboard_backlight {
&pwmleds {
status = "okay";
};
......@@ -17,6 +17,6 @@ &ap_sar_sensor_i2c {
status = "okay";
};
&keyboard_backlight {
&pwmleds {
status = "okay";
};
......@@ -18,6 +18,6 @@ / {
compatible = "google,lazor-sku2", "qcom,sc7180";
};
&keyboard_backlight {
&pwmleds {
status = "okay";
};
......@@ -22,6 +22,6 @@ &ap_sar_sensor_i2c {
status = "okay";
};
&keyboard_backlight {
&pwmleds {
status = "okay";
};
......@@ -21,6 +21,6 @@ / {
"qcom,sc7180";
};
&keyboard_backlight {
&pwmleds {
status = "okay";
};
......@@ -25,6 +25,6 @@ &ap_sar_sensor_i2c {
status = "okay";
};
&keyboard_backlight {
&pwmleds {
status = "okay";
};
......@@ -18,6 +18,6 @@ / {
compatible = "google,lazor-rev9-sku2", "qcom,sc7180";
};
&keyboard_backlight {
&pwmleds {
status = "okay";
};
......@@ -22,6 +22,6 @@ &ap_sar_sensor_i2c {
status = "okay";
};
&keyboard_backlight {
&pwmleds {
status = "okay";
};
......@@ -356,10 +356,11 @@ max98360a: audio-codec-0 {
#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>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment