mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused
@ 2024-06-14 20:59 Nícolas F. R. A. Prado
  2024-06-18 14:39 ` Konrad Dybcio
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-06-14 20:59 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rob Clark,
	Douglas Anderson, Stephen Boyd
  Cc: kernel, linux-arm-msm, devicetree, linux-kernel,
	Nícolas F. R. A. Prado

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>
---
 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-kb.dts   | 2 +-
 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts  | 2 +-
 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-kb.dts  | 2 +-
 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-lte.dts | 2 +-
 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts   | 2 +-
 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts  | 2 +-
 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts   | 2 +-
 arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts  | 2 +-
 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi              | 5 +++--
 9 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-kb.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-kb.dts
index 919bfaea6189..340cb119d0a0 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-kb.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-kb.dts
@@ -12,6 +12,6 @@ / {
 	compatible = "google,lazor-rev1-sku2", "google,lazor-rev2-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts
index eb20157f6af9..d45e60e3eb9e 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts
@@ -17,6 +17,6 @@ &ap_sar_sensor_i2c {
 	status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-kb.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-kb.dts
index 45d34718a1bc..e906ce877b8c 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-kb.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-kb.dts
@@ -18,6 +18,6 @@ / {
 	compatible = "google,lazor-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-lte.dts
index 79028d0dd1b0..4b9ee15b09f6 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-lte.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-lte.dts
@@ -22,6 +22,6 @@ &ap_sar_sensor_i2c {
 	status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts
index 3459b81c5628..a960553f3994 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts
@@ -21,6 +21,6 @@ / {
 		"qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts
index ff8f47da109d..82bd9ed7e21a 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts
@@ -25,6 +25,6 @@ &ap_sar_sensor_i2c {
 	status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts
index faf527972977..6278c1715d3f 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts
@@ -18,6 +18,6 @@ / {
 	compatible = "google,lazor-rev9-sku2", "qcom,sc7180";
 };
 
-&keyboard_backlight {
+&pwmleds {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts
index d737fd0637fb..0ec1697ae2c9 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts
@@ -22,6 +22,6 @@ &ap_sar_sensor_i2c {
 	status = "okay";
 };
 
-&keyboard_backlight {
+&pwmleds {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index 4d33c3fbedff..74ab321d3333 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -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>;

---
base-commit: 6906a84c482f098d31486df8dc98cead21cce2d0
change-id: 20240614-sc7180-pwmleds-probe-284675dabf04

Best regards,
-- 
Nícolas F. R. A. Prado <nfraprado@collabora.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused
  2024-06-14 20:59 [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused Nícolas F. R. A. Prado
@ 2024-06-18 14:39 ` Konrad Dybcio
  2024-06-18 15:06 ` AngeloGioacchino Del Regno
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2024-06-18 14:39 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, cros-qcom-dts-watchers,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Rob Clark, Douglas Anderson, Stephen Boyd
  Cc: kernel, linux-arm-msm, devicetree, linux-kernel



On 6/14/24 22:59, Nícolas F. R. A. Prado wrote:
> 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>

Konrad

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused
  2024-06-14 20:59 [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused Nícolas F. R. A. Prado
  2024-06-18 14:39 ` Konrad Dybcio
@ 2024-06-18 15:06 ` AngeloGioacchino Del Regno
  2024-06-18 23:59 ` Doug Anderson
  2024-06-21  6:11 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-06-18 15:06 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, cros-qcom-dts-watchers,
	Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Rob Clark, Douglas Anderson, Stephen Boyd
  Cc: kernel, linux-arm-msm, devicetree, linux-kernel

Il 14/06/24 22:59, Nícolas F. R. A. Prado ha scritto:
> 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: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused
  2024-06-14 20:59 [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused Nícolas F. R. A. Prado
  2024-06-18 14:39 ` Konrad Dybcio
  2024-06-18 15:06 ` AngeloGioacchino Del Regno
@ 2024-06-18 23:59 ` Doug Anderson
  2024-06-21  6:11 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2024-06-18 23:59 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rob Clark,
	Stephen Boyd, kernel, linux-arm-msm, devicetree, linux-kernel

Hi,

On Fri, Jun 14, 2024 at 2:00 PM Nícolas F. R. A. Prado
<nfraprado@collabora.com> wrote:
>
> 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>
> ---
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-kb.dts   | 2 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1-lte.dts  | 2 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-kb.dts  | 2 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r10-lte.dts | 2 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dts   | 2 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dts  | 2 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-kb.dts   | 2 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9-lte.dts  | 2 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi              | 5 +++--
>  9 files changed, 11 insertions(+), 10 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused
  2024-06-14 20:59 [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused Nícolas F. R. A. Prado
                   ` (2 preceding siblings ...)
  2024-06-18 23:59 ` Doug Anderson
@ 2024-06-21  6:11 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2024-06-21  6:11 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Rob Clark, Douglas Anderson,
	Stephen Boyd, Nícolas F. R. A. Prado
  Cc: kernel, linux-arm-msm, devicetree, linux-kernel


On Fri, 14 Jun 2024 16:59:36 -0400, Nícolas F. R. A. Prado wrote:
> 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:
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused
      commit: 99e94768c890c7522af020ff0e5e5317b2d046d9

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-21  6:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14 20:59 [PATCH] arm64: dts: qcom: sc7180-trogdor: Disable pwmleds node where unused Nícolas F. R. A. Prado
2024-06-18 14:39 ` Konrad Dybcio
2024-06-18 15:06 ` AngeloGioacchino Del Regno
2024-06-18 23:59 ` Doug Anderson
2024-06-21  6:11 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®