public inbox for linux-leds@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more
@ 2026-01-08  3:43 Barnabás Czémán
  2026-01-08  3:43 ` [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994 Barnabás Czémán
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Barnabás Czémán @ 2026-01-08  3:43 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev, Konrad Dybcio,
	Barnabás Czémán

This patch series fixes supported ovp values related to pmi8950 wled
and corrects wled related properties in xiaomi-daisy, xiaomi-land and
in xiaomi-vince.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
Changes in v2:
- Rework ovp change to support pmi8994 also.
- Reword commits.
- dt-bindings: Set min max for qcom,ovp-millivolt.
- Link to v1: https://lore.kernel.org/r/20260107-pmi8950-wled-v1-0-5e52f5caa39c@mainlining.org

---
Barnabás Czémán (7):
      dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994
      backlight: qcom-wled: Support ovp values for PMI8994
      dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950
      backlight: qcom-wled: Fix ovp values for PMI8950
      arm64: dts: qcom: msm8953-xiaomi-vince: correct wled ovp value
      arm64: dts: qcom: msm8937-xiaomi-land: correct wled ovp value
      arm64: dts: qcom: msm8953-xiaomi-daisy: fix backlight

 .../bindings/leds/backlight/qcom-wled.yaml         | 24 +++++++++++--
 arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts   |  2 +-
 arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts  |  2 +-
 arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts  |  2 +-
 drivers/video/backlight/qcom-wled.c                | 42 ++++++++++++++++++++--
 5 files changed, 65 insertions(+), 7 deletions(-)
---
base-commit: f96074c6d01d8a5e9e2fccd0bba5f2ed654c1f2d
change-id: 20260107-pmi8950-wled-b014578f67a6

Best regards,
-- 
Barnabás Czémán <barnabas.czeman@mainlining.org>


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

* [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994
  2026-01-08  3:43 [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more Barnabás Czémán
@ 2026-01-08  3:43 ` Barnabás Czémán
  2026-01-08  8:54   ` Konrad Dybcio
  2026-01-08 10:09   ` Krzysztof Kozlowski
  2026-01-08  3:43 ` [PATCH v2 2/7] backlight: qcom-wled: Support " Barnabás Czémán
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 25+ messages in thread
From: Barnabás Czémán @ 2026-01-08  3:43 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev, Konrad Dybcio,
	Barnabás Czémán

Document ovp values supported by wled found in PMI8994.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 .../bindings/leds/backlight/qcom-wled.yaml         | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
index a8490781011d..19166186a1ff 100644
--- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
+++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
@@ -98,8 +98,8 @@ properties:
     description: |
       Over-voltage protection limit. This property is for WLED4 only.
     $ref: /schemas/types.yaml#/definitions/uint32
-    enum: [ 18100, 19600, 29600, 31100 ]
-    default: 29600
+    minimum: 17800
+    maximum: 31100
 
   qcom,num-strings:
     description: |
@@ -239,6 +239,24 @@ allOf:
           minimum: 0
           maximum: 4095
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: qcom,pmi8994-wled
+
+    then:
+      properties:
+        qcom,ovp-millivolt:
+          enum: [ 17800, 19400, 29500, 31000 ]
+          default: 29500
+
+    else:
+      properties:
+        qcom,ovp-millivolt:
+          enum: [ 18100, 19600, 29600, 31100 ]
+          default: 29600
+
 required:
   - compatible
   - reg

-- 
2.52.0


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

* [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-08  3:43 [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more Barnabás Czémán
  2026-01-08  3:43 ` [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994 Barnabás Czémán
@ 2026-01-08  3:43 ` Barnabás Czémán
  2026-01-08  8:55   ` Konrad Dybcio
  2026-01-08 11:28   ` Daniel Thompson
  2026-01-08  3:43 ` [PATCH v2 3/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950 Barnabás Czémán
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 25+ messages in thread
From: Barnabás Czémán @ 2026-01-08  3:43 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev, Konrad Dybcio,
	Barnabás Czémán

WLED4 found in PMI8994 supports different ovp values.

Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 compatible")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 drivers/video/backlight/qcom-wled.c | 41 +++++++++++++++++++++++++++++++++++--
 1 file changed, 39 insertions(+), 2 deletions(-)

diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
index a63bb42c8f8b..5decbd39b789 100644
--- a/drivers/video/backlight/qcom-wled.c
+++ b/drivers/video/backlight/qcom-wled.c
@@ -1244,6 +1244,15 @@ static const struct wled_var_cfg wled4_ovp_cfg = {
 	.size = ARRAY_SIZE(wled4_ovp_values),
 };
 
+static const u32 pmi8994_wled_ovp_values[] = {
+	31000, 29500, 19400, 17800,
+};
+
+static const struct wled_var_cfg pmi8994_wled_ovp_cfg = {
+	.values = pmi8994_wled_ovp_values,
+	.size = ARRAY_SIZE(pmi8994_wled_ovp_values),
+};
+
 static inline u32 wled5_ovp_values_fn(u32 idx)
 {
 	/*
@@ -1357,6 +1366,29 @@ static int wled_configure(struct wled *wled)
 		},
 	};
 
+	const struct wled_u32_opts pmi8994_wled_opts[] = {
+		{
+			.name = "qcom,current-boost-limit",
+			.val_ptr = &cfg->boost_i_limit,
+			.cfg = &wled4_boost_i_limit_cfg,
+		},
+		{
+			.name = "qcom,current-limit-microamp",
+			.val_ptr = &cfg->string_i_limit,
+			.cfg = &wled4_string_i_limit_cfg,
+		},
+		{
+			.name = "qcom,ovp-millivolt",
+			.val_ptr = &cfg->ovp,
+			.cfg = &pmi8994_wled_ovp_cfg,
+		},
+		{
+			.name = "qcom,switching-freq",
+			.val_ptr = &cfg->switch_freq,
+			.cfg = &wled3_switch_freq_cfg,
+		},
+	};
+
 	const struct wled_u32_opts wled5_opts[] = {
 		{
 			.name = "qcom,current-boost-limit",
@@ -1423,8 +1455,13 @@ static int wled_configure(struct wled *wled)
 		break;
 
 	case 4:
-		u32_opts = wled4_opts;
-		size = ARRAY_SIZE(wled4_opts);
+		if (of_device_is_compatible(dev->of_node, "qcom,pmi8994-wled")) {
+			u32_opts = pmi8994_wled_opts;
+			size = ARRAY_SIZE(pmi8994_wled_opts);
+		} else {
+			u32_opts = wled4_opts;
+			size = ARRAY_SIZE(wled4_opts);
+		}
 		*cfg = wled4_config_defaults;
 		wled->wled_set_brightness = wled4_set_brightness;
 		wled->wled_sync_toggle = wled3_sync_toggle;

-- 
2.52.0


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

* [PATCH v2 3/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950
  2026-01-08  3:43 [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more Barnabás Czémán
  2026-01-08  3:43 ` [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994 Barnabás Czémán
  2026-01-08  3:43 ` [PATCH v2 2/7] backlight: qcom-wled: Support " Barnabás Czémán
@ 2026-01-08  3:43 ` Barnabás Czémán
  2026-01-08  9:22   ` Konrad Dybcio
  2026-01-08 10:17   ` Krzysztof Kozlowski
  2026-01-08  3:43 ` [PATCH v2 4/7] backlight: qcom-wled: Fix " Barnabás Czémán
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 25+ messages in thread
From: Barnabás Czémán @ 2026-01-08  3:43 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev, Konrad Dybcio,
	Barnabás Czémán

Document ovp values supported by wled found in PMI8950.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
index 19166186a1ff..a54448cfdb38 100644
--- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
+++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
@@ -243,7 +243,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: qcom,pmi8994-wled
+            enum:
+              - qcom,pmi8950-wled
+              - qcom,pmi8994-wled
 
     then:
       properties:

-- 
2.52.0


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

* [PATCH v2 4/7] backlight: qcom-wled: Fix ovp values for PMI8950
  2026-01-08  3:43 [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more Barnabás Czémán
                   ` (2 preceding siblings ...)
  2026-01-08  3:43 ` [PATCH v2 3/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950 Barnabás Czémán
@ 2026-01-08  3:43 ` Barnabás Czémán
  2026-01-08  9:22   ` Konrad Dybcio
  2026-01-08  3:43 ` [PATCH v2 5/7] arm64: dts: qcom: msm8953-xiaomi-vince: correct wled ovp value Barnabás Czémán
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 25+ messages in thread
From: Barnabás Czémán @ 2026-01-08  3:43 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev, Konrad Dybcio,
	Barnabás Czémán

PMI8950 WLED support same ovp values like PMI8994 WLED.

Fixes: 10258bf4534b ("backlight: qcom-wled: Add PMI8950 compatible")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 drivers/video/backlight/qcom-wled.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
index 5decbd39b789..8054e4787725 100644
--- a/drivers/video/backlight/qcom-wled.c
+++ b/drivers/video/backlight/qcom-wled.c
@@ -1455,7 +1455,8 @@ static int wled_configure(struct wled *wled)
 		break;
 
 	case 4:
-		if (of_device_is_compatible(dev->of_node, "qcom,pmi8994-wled")) {
+		if (of_device_is_compatible(dev->of_node, "qcom,pmi8950-wled") ||
+		    of_device_is_compatible(dev->of_node, "qcom,pmi8994-wled")) {
 			u32_opts = pmi8994_wled_opts;
 			size = ARRAY_SIZE(pmi8994_wled_opts);
 		} else {

-- 
2.52.0


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

* [PATCH v2 5/7] arm64: dts: qcom: msm8953-xiaomi-vince: correct wled ovp value
  2026-01-08  3:43 [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more Barnabás Czémán
                   ` (3 preceding siblings ...)
  2026-01-08  3:43 ` [PATCH v2 4/7] backlight: qcom-wled: Fix " Barnabás Czémán
@ 2026-01-08  3:43 ` Barnabás Czémán
  2026-01-08  3:43 ` [PATCH v2 6/7] arm64: dts: qcom: msm8937-xiaomi-land: " Barnabás Czémán
  2026-01-08  3:43 ` [PATCH v2 7/7] arm64: dts: qcom: msm8953-xiaomi-daisy: fix backlight Barnabás Czémán
  6 siblings, 0 replies; 25+ messages in thread
From: Barnabás Czémán @ 2026-01-08  3:43 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev, Konrad Dybcio,
	Barnabás Czémán

PMI8950 doesn't actually support setting an OVP threshold value of
29.6 V. The closest allowed value is 29.5 V. Set that instead.

Fixes: aa17e707e04a ("arm64: dts: qcom: msm8953: Add device tree for Xiaomi Redmi 5 Plus")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts
index d46325e79917..c2a290bf493c 100644
--- a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts
+++ b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts
@@ -169,7 +169,7 @@ &pm8953_resin {
 
 &pmi8950_wled {
 	qcom,current-limit-microamp = <20000>;
-	qcom,ovp-millivolt = <29600>;
+	qcom,ovp-millivolt = <29500>;
 	qcom,num-strings = <2>;
 	qcom,external-pfet;
 	qcom,cabc;

-- 
2.52.0


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

* [PATCH v2 6/7] arm64: dts: qcom: msm8937-xiaomi-land: correct wled ovp value
  2026-01-08  3:43 [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more Barnabás Czémán
                   ` (4 preceding siblings ...)
  2026-01-08  3:43 ` [PATCH v2 5/7] arm64: dts: qcom: msm8953-xiaomi-vince: correct wled ovp value Barnabás Czémán
@ 2026-01-08  3:43 ` Barnabás Czémán
  2026-01-08  3:43 ` [PATCH v2 7/7] arm64: dts: qcom: msm8953-xiaomi-daisy: fix backlight Barnabás Czémán
  6 siblings, 0 replies; 25+ messages in thread
From: Barnabás Czémán @ 2026-01-08  3:43 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev, Konrad Dybcio,
	Barnabás Czémán

PMI8950 doesn't actually support setting an OVP threshold value of
29.6 V. The closest allowed value is 29.5 V. Set that instead.

Fixes: 2144f6d57d8e ("arm64: dts: qcom: Add Xiaomi Redmi 3S")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts b/arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts
index 91837ff940f1..4f301e7c6517 100644
--- a/arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts
+++ b/arch/arm64/boot/dts/qcom/msm8937-xiaomi-land.dts
@@ -178,7 +178,7 @@ &pmi8950_wled {
 	qcom,num-strings = <2>;
 	qcom,external-pfet;
 	qcom,current-limit-microamp = <20000>;
-	qcom,ovp-millivolt = <29600>;
+	qcom,ovp-millivolt = <29500>;
 
 	status = "okay";
 };

-- 
2.52.0


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

* [PATCH v2 7/7] arm64: dts: qcom: msm8953-xiaomi-daisy: fix backlight
  2026-01-08  3:43 [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more Barnabás Czémán
                   ` (5 preceding siblings ...)
  2026-01-08  3:43 ` [PATCH v2 6/7] arm64: dts: qcom: msm8937-xiaomi-land: " Barnabás Czémán
@ 2026-01-08  3:43 ` Barnabás Czémán
  6 siblings, 0 replies; 25+ messages in thread
From: Barnabás Czémán @ 2026-01-08  3:43 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev, Konrad Dybcio,
	Barnabás Czémán

The backlight on this device is connected via 3 strings. Currently,
the DT claims only two are present, which results in visible stripes
on the display (since every third backlight string remains unconfigured).

Fix the number of strings to avoid that.

Fixes: 38d779c26395 ("arm64: dts: qcom: msm8953: Add device tree for Xiaomi Mi A2 Lite")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts
index ddd7af616794..59f873a06e4d 100644
--- a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts
+++ b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts
@@ -157,7 +157,7 @@ &pm8953_resin {
 
 &pmi8950_wled {
 	qcom,current-limit-microamp = <20000>;
-	qcom,num-strings = <2>;
+	qcom,num-strings = <3>;
 
 	status = "okay";
 };

-- 
2.52.0


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

* Re: [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994
  2026-01-08  3:43 ` [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994 Barnabás Czémán
@ 2026-01-08  8:54   ` Konrad Dybcio
  2026-01-08  9:17     ` barnabas.czeman
  2026-01-08  9:21     ` Konrad Dybcio
  2026-01-08 10:09   ` Krzysztof Kozlowski
  1 sibling, 2 replies; 25+ messages in thread
From: Konrad Dybcio @ 2026-01-08  8:54 UTC (permalink / raw)
  To: Barnabás Czémán, Lee Jones, Daniel Thompson,
	Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Kiran Gunda, Helge Deller,
	Luca Weiss, Konrad Dybcio, Eugene Lepshy, Gianluca Boiano,
	Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev

On 1/8/26 4:43 AM, Barnabás Czémán wrote:
> Document ovp values supported by wled found in PMI8994.
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

I reviewed a version of this that said PMI8950, which is very much
not the same..

Let me try and get some more docs to confirm or deny what you're
saying..

Konrad

> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>  .../bindings/leds/backlight/qcom-wled.yaml         | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
> index a8490781011d..19166186a1ff 100644
> --- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
> +++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
> @@ -98,8 +98,8 @@ properties:
>      description: |
>        Over-voltage protection limit. This property is for WLED4 only.
>      $ref: /schemas/types.yaml#/definitions/uint32
> -    enum: [ 18100, 19600, 29600, 31100 ]
> -    default: 29600
> +    minimum: 17800
> +    maximum: 31100
>  
>    qcom,num-strings:
>      description: |
> @@ -239,6 +239,24 @@ allOf:
>            minimum: 0
>            maximum: 4095
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: qcom,pmi8994-wled
> +
> +    then:
> +      properties:
> +        qcom,ovp-millivolt:
> +          enum: [ 17800, 19400, 29500, 31000 ]
> +          default: 29500
> +
> +    else:
> +      properties:
> +        qcom,ovp-millivolt:
> +          enum: [ 18100, 19600, 29600, 31100 ]
> +          default: 29600
> +
>  required:
>    - compatible
>    - reg
> 

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

* Re: [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-08  3:43 ` [PATCH v2 2/7] backlight: qcom-wled: Support " Barnabás Czémán
@ 2026-01-08  8:55   ` Konrad Dybcio
  2026-01-08  9:22     ` Konrad Dybcio
  2026-01-08 11:28   ` Daniel Thompson
  1 sibling, 1 reply; 25+ messages in thread
From: Konrad Dybcio @ 2026-01-08  8:55 UTC (permalink / raw)
  To: Barnabás Czémán, Lee Jones, Daniel Thompson,
	Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Kiran Gunda, Helge Deller,
	Luca Weiss, Konrad Dybcio, Eugene Lepshy, Gianluca Boiano,
	Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev

On 1/8/26 4:43 AM, Barnabás Czémán wrote:
> WLED4 found in PMI8994 supports different ovp values.
> 
> Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 compatible")
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---

Likewise, I reviewed a version that said PMI8950 instead.

Konrad

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

* Re: [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994
  2026-01-08  8:54   ` Konrad Dybcio
@ 2026-01-08  9:17     ` barnabas.czeman
  2026-01-08  9:22       ` Konrad Dybcio
  2026-01-08  9:21     ` Konrad Dybcio
  1 sibling, 1 reply; 25+ messages in thread
From: barnabas.czeman @ 2026-01-08  9:17 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, Daniel Thompson, linux-arm-msm,
	linux-fbdev

On 2026-01-08 09:54, Konrad Dybcio wrote:
> On 1/8/26 4:43 AM, Barnabás Czémán wrote:
>> Document ovp values supported by wled found in PMI8994.
>> 
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> I reviewed a version of this that said PMI8950, which is very much
> not the same..
> 
> Let me try and get some more docs to confirm or deny what you're
> saying..
I have sent it for the previous revision msm-4.4 contains the 
documentation.
https://lore.kernel.org/all/95f7c89fdf9b856f567a498cc56ecfa5@mainlining.org/T/#u
> 
> Konrad
> 
>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> ---
>>  .../bindings/leds/backlight/qcom-wled.yaml         | 22 
>> ++++++++++++++++++++--
>>  1 file changed, 20 insertions(+), 2 deletions(-)
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml 
>> b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
>> index a8490781011d..19166186a1ff 100644
>> --- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
>> +++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
>> @@ -98,8 +98,8 @@ properties:
>>      description: |
>>        Over-voltage protection limit. This property is for WLED4 only.
>>      $ref: /schemas/types.yaml#/definitions/uint32
>> -    enum: [ 18100, 19600, 29600, 31100 ]
>> -    default: 29600
>> +    minimum: 17800
>> +    maximum: 31100
>> 
>>    qcom,num-strings:
>>      description: |
>> @@ -239,6 +239,24 @@ allOf:
>>            minimum: 0
>>            maximum: 4095
>> 
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            const: qcom,pmi8994-wled
>> +
>> +    then:
>> +      properties:
>> +        qcom,ovp-millivolt:
>> +          enum: [ 17800, 19400, 29500, 31000 ]
>> +          default: 29500
>> +
>> +    else:
>> +      properties:
>> +        qcom,ovp-millivolt:
>> +          enum: [ 18100, 19600, 29600, 31100 ]
>> +          default: 29600
>> +
>>  required:
>>    - compatible
>>    - reg
>> 

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

* Re: [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994
  2026-01-08  8:54   ` Konrad Dybcio
  2026-01-08  9:17     ` barnabas.czeman
@ 2026-01-08  9:21     ` Konrad Dybcio
  1 sibling, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2026-01-08  9:21 UTC (permalink / raw)
  To: Barnabás Czémán, Lee Jones, Daniel Thompson,
	Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Kiran Gunda, Helge Deller,
	Luca Weiss, Konrad Dybcio, Eugene Lepshy, Gianluca Boiano,
	Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev

On 1/8/26 9:54 AM, Konrad Dybcio wrote:
> On 1/8/26 4:43 AM, Barnabás Czémán wrote:
>> Document ovp values supported by wled found in PMI8994.
>>
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> I reviewed a version of this that said PMI8950, which is very much
> not the same..
> 
> Let me try and get some more docs to confirm or deny what you're
> saying..

PMI8994 indeed uses the same values as PMI8950, so let's keep my
review tag (but please be more careful about that when making
major changes between revisions in the future)

Konrad

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

* Re: [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994
  2026-01-08  9:17     ` barnabas.czeman
@ 2026-01-08  9:22       ` Konrad Dybcio
  2026-01-08  9:30         ` barnabas.czeman
  0 siblings, 1 reply; 25+ messages in thread
From: Konrad Dybcio @ 2026-01-08  9:22 UTC (permalink / raw)
  To: barnabas.czeman
  Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, Daniel Thompson, linux-arm-msm,
	linux-fbdev

On 1/8/26 10:17 AM, barnabas.czeman@mainlining.org wrote:
> On 2026-01-08 09:54, Konrad Dybcio wrote:
>> On 1/8/26 4:43 AM, Barnabás Czémán wrote:
>>> Document ovp values supported by wled found in PMI8994.
>>>
>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>
>> I reviewed a version of this that said PMI8950, which is very much
>> not the same..
>>
>> Let me try and get some more docs to confirm or deny what you're
>> saying..
> I have sent it for the previous revision msm-4.4 contains the documentation.
> https://lore.kernel.org/all/95f7c89fdf9b856f567a498cc56ecfa5@mainlining.org/T/#u

Right, but I didn't send any reply acknowledging that.

On v1, my review tag meant "I concur this is the case for PMI8950"

Because you carried it in v2, it appears as if I said "I concur this
is the case for PMI8994", which is not what I then said.

Konrad

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

* Re: [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-08  8:55   ` Konrad Dybcio
@ 2026-01-08  9:22     ` Konrad Dybcio
  0 siblings, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2026-01-08  9:22 UTC (permalink / raw)
  To: Barnabás Czémán, Lee Jones, Daniel Thompson,
	Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Kiran Gunda, Helge Deller,
	Luca Weiss, Konrad Dybcio, Eugene Lepshy, Gianluca Boiano,
	Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev

On 1/8/26 9:55 AM, Konrad Dybcio wrote:
> On 1/8/26 4:43 AM, Barnabás Czémán wrote:
>> WLED4 found in PMI8994 supports different ovp values.
>>
>> Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 compatible")
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> ---
> 
> Likewise, I reviewed a version that said PMI8950 instead.

We can keep it because PMI8994 seems to fall under the same category
indeed

Konrad

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

* Re: [PATCH v2 3/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950
  2026-01-08  3:43 ` [PATCH v2 3/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950 Barnabás Czémán
@ 2026-01-08  9:22   ` Konrad Dybcio
  2026-01-08 10:17   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2026-01-08  9:22 UTC (permalink / raw)
  To: Barnabás Czémán, Lee Jones, Daniel Thompson,
	Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Kiran Gunda, Helge Deller,
	Luca Weiss, Konrad Dybcio, Eugene Lepshy, Gianluca Boiano,
	Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev

On 1/8/26 4:43 AM, Barnabás Czémán wrote:
> Document ovp values supported by wled found in PMI8950.
> 
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad


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

* Re: [PATCH v2 4/7] backlight: qcom-wled: Fix ovp values for PMI8950
  2026-01-08  3:43 ` [PATCH v2 4/7] backlight: qcom-wled: Fix " Barnabás Czémán
@ 2026-01-08  9:22   ` Konrad Dybcio
  0 siblings, 0 replies; 25+ messages in thread
From: Konrad Dybcio @ 2026-01-08  9:22 UTC (permalink / raw)
  To: Barnabás Czémán, Lee Jones, Daniel Thompson,
	Jingoo Han, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Kiran Gunda, Helge Deller,
	Luca Weiss, Konrad Dybcio, Eugene Lepshy, Gianluca Boiano,
	Alejandro Tafalla
  Cc: dri-devel, linux-leds, devicetree, linux-kernel, Daniel Thompson,
	linux-arm-msm, linux-fbdev

On 1/8/26 4:43 AM, Barnabás Czémán wrote:
> PMI8950 WLED support same ovp values like PMI8994 WLED.
> 
> Fixes: 10258bf4534b ("backlight: qcom-wled: Add PMI8950 compatible")
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad


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

* Re: [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994
  2026-01-08  9:22       ` Konrad Dybcio
@ 2026-01-08  9:30         ` barnabas.czeman
  0 siblings, 0 replies; 25+ messages in thread
From: barnabas.czeman @ 2026-01-08  9:30 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, Daniel Thompson, linux-arm-msm,
	linux-fbdev

On 2026-01-08 10:22, Konrad Dybcio wrote:
> On 1/8/26 10:17 AM, barnabas.czeman@mainlining.org wrote:
>> On 2026-01-08 09:54, Konrad Dybcio wrote:
>>> On 1/8/26 4:43 AM, Barnabás Czémán wrote:
>>>> Document ovp values supported by wled found in PMI8994.
>>>> 
>>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>> 
>>> I reviewed a version of this that said PMI8950, which is very much
>>> not the same..
>>> 
>>> Let me try and get some more docs to confirm or deny what you're
>>> saying..
>> I have sent it for the previous revision msm-4.4 contains the 
>> documentation.
>> https://lore.kernel.org/all/95f7c89fdf9b856f567a498cc56ecfa5@mainlining.org/T/#u
> 
> Right, but I didn't send any reply acknowledging that.
> 
> On v1, my review tag meant "I concur this is the case for PMI8950"
Yes, sorry. Since they are pretty much same i have considered it is a
minor change i have only changed everything to pmi8994 because it
was introduced before pmi8950 at upstream. I will be more careful next 
time.
> 
> Because you carried it in v2, it appears as if I said "I concur this
> is the case for PMI8994", which is not what I then said.
> 
> Konrad

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

* Re: [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994
  2026-01-08  3:43 ` [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994 Barnabás Czémán
  2026-01-08  8:54   ` Konrad Dybcio
@ 2026-01-08 10:09   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 25+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-08 10:09 UTC (permalink / raw)
  To: Barnabás Czémán
  Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, Daniel Thompson, linux-arm-msm,
	linux-fbdev, Konrad Dybcio

On Thu, Jan 08, 2026 at 04:43:19AM +0100, Barnabás Czémán wrote:
> Document ovp values supported by wled found in PMI8994.
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>  .../bindings/leds/backlight/qcom-wled.yaml         | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH v2 3/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950
  2026-01-08  3:43 ` [PATCH v2 3/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950 Barnabás Czémán
  2026-01-08  9:22   ` Konrad Dybcio
@ 2026-01-08 10:17   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 25+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-08 10:17 UTC (permalink / raw)
  To: Barnabás Czémán
  Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, Daniel Thompson, linux-arm-msm,
	linux-fbdev, Konrad Dybcio

On Thu, Jan 08, 2026 at 04:43:21AM +0100, Barnabás Czémán wrote:
> Document ovp values supported by wled found in PMI8950.
> 
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>  Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-08  3:43 ` [PATCH v2 2/7] backlight: qcom-wled: Support " Barnabás Czémán
  2026-01-08  8:55   ` Konrad Dybcio
@ 2026-01-08 11:28   ` Daniel Thompson
  2026-01-09  6:36     ` barnabas.czeman
  1 sibling, 1 reply; 25+ messages in thread
From: Daniel Thompson @ 2026-01-08 11:28 UTC (permalink / raw)
  To: Barnabás Czémán
  Cc: Lee Jones, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, Daniel Thompson, linux-arm-msm,
	linux-fbdev, Konrad Dybcio

On Thu, Jan 08, 2026 at 04:43:20AM +0100, Barnabás Czémán wrote:
> WLED4 found in PMI8994 supports different ovp values.
>
> Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 compatible")
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>  drivers/video/backlight/qcom-wled.c | 41 +++++++++++++++++++++++++++++++++++--
>  1 file changed, 39 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
> index a63bb42c8f8b..5decbd39b789 100644
> --- a/drivers/video/backlight/qcom-wled.c
> +++ b/drivers/video/backlight/qcom-wled.c
> @@ -1244,6 +1244,15 @@ static const struct wled_var_cfg wled4_ovp_cfg = {
>  	.size = ARRAY_SIZE(wled4_ovp_values),
>  };
>
> +static const u32 pmi8994_wled_ovp_values[] = {
> +	31000, 29500, 19400, 17800,
> +};
> +
> +static const struct wled_var_cfg pmi8994_wled_ovp_cfg = {
> +	.values = pmi8994_wled_ovp_values,
> +	.size = ARRAY_SIZE(pmi8994_wled_ovp_values),
> +};
> +

Do these *have* to be named after one of the two PMICs that implement
this OVP range.

Would something like wled4_alternative_ovp_values[] (and the same
throughout the patch) be more descriptive?


Daniel.

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

* Re: [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-08 11:28   ` Daniel Thompson
@ 2026-01-09  6:36     ` barnabas.czeman
  2026-01-09 11:09       ` Konrad Dybcio
  0 siblings, 1 reply; 25+ messages in thread
From: barnabas.czeman @ 2026-01-09  6:36 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Lee Jones, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, Daniel Thompson, linux-arm-msm,
	linux-fbdev, Konrad Dybcio

On 2026-01-08 12:28, Daniel Thompson wrote:
> On Thu, Jan 08, 2026 at 04:43:20AM +0100, Barnabás Czémán wrote:
>> WLED4 found in PMI8994 supports different ovp values.
>> 
>> Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 
>> compatible")
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> ---
>>  drivers/video/backlight/qcom-wled.c | 41 
>> +++++++++++++++++++++++++++++++++++--
>>  1 file changed, 39 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/video/backlight/qcom-wled.c 
>> b/drivers/video/backlight/qcom-wled.c
>> index a63bb42c8f8b..5decbd39b789 100644
>> --- a/drivers/video/backlight/qcom-wled.c
>> +++ b/drivers/video/backlight/qcom-wled.c
>> @@ -1244,6 +1244,15 @@ static const struct wled_var_cfg wled4_ovp_cfg 
>> = {
>>  	.size = ARRAY_SIZE(wled4_ovp_values),
>>  };
>> 
>> +static const u32 pmi8994_wled_ovp_values[] = {
>> +	31000, 29500, 19400, 17800,
>> +};
>> +
>> +static const struct wled_var_cfg pmi8994_wled_ovp_cfg = {
>> +	.values = pmi8994_wled_ovp_values,
>> +	.size = ARRAY_SIZE(pmi8994_wled_ovp_values),
>> +};
>> +
> 
> Do these *have* to be named after one of the two PMICs that implement
> this OVP range.
> 
> Would something like wled4_alternative_ovp_values[] (and the same
> throughout the patch) be more descriptive?
I don't know. I don't like the PMIC naming either but at least it
descriptive about wich PMIC is needing these values.
I think PMIC naming would be fine if compatibles what representing the
same configurations would be deprecated and used as a fallback 
compatbile
style.
I mean we could kept the first added compatible for a configuration.
Maybe they should be named diferently i don't know if WLEDs have 
subversion.
> 
> 
> Daniel.

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

* Re: [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-09  6:36     ` barnabas.czeman
@ 2026-01-09 11:09       ` Konrad Dybcio
  2026-01-09 13:33         ` Daniel Thompson
  0 siblings, 1 reply; 25+ messages in thread
From: Konrad Dybcio @ 2026-01-09 11:09 UTC (permalink / raw)
  To: barnabas.czeman, Daniel Thompson
  Cc: Lee Jones, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, Daniel Thompson, linux-arm-msm,
	linux-fbdev

On 1/9/26 7:36 AM, barnabas.czeman@mainlining.org wrote:
> On 2026-01-08 12:28, Daniel Thompson wrote:
>> On Thu, Jan 08, 2026 at 04:43:20AM +0100, Barnabás Czémán wrote:
>>> WLED4 found in PMI8994 supports different ovp values.
>>>
>>> Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 compatible")
>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>>> ---
>>>  drivers/video/backlight/qcom-wled.c | 41 +++++++++++++++++++++++++++++++++++--
>>>  1 file changed, 39 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
>>> index a63bb42c8f8b..5decbd39b789 100644
>>> --- a/drivers/video/backlight/qcom-wled.c
>>> +++ b/drivers/video/backlight/qcom-wled.c
>>> @@ -1244,6 +1244,15 @@ static const struct wled_var_cfg wled4_ovp_cfg = {
>>>      .size = ARRAY_SIZE(wled4_ovp_values),
>>>  };
>>>
>>> +static const u32 pmi8994_wled_ovp_values[] = {
>>> +    31000, 29500, 19400, 17800,
>>> +};
>>> +
>>> +static const struct wled_var_cfg pmi8994_wled_ovp_cfg = {
>>> +    .values = pmi8994_wled_ovp_values,
>>> +    .size = ARRAY_SIZE(pmi8994_wled_ovp_values),
>>> +};
>>> +
>>
>> Do these *have* to be named after one of the two PMICs that implement
>> this OVP range.
>>
>> Would something like wled4_alternative_ovp_values[] (and the same
>> throughout the patch) be more descriptive?
> I don't know. I don't like the PMIC naming either but at least it
> descriptive about wich PMIC is needing these values.
> I think PMIC naming would be fine if compatibles what representing the
> same configurations would be deprecated and used as a fallback compatbile
> style.
> I mean we could kept the first added compatible for a configuration.
> Maybe they should be named diferently i don't know if WLEDs have subversion.

Every PMIC peripheral is versioned.

WLED has separate versioning for the digital and analog parts:

PMIC		ANA	DIG
---------------------------
PMI8937		2.0	1.0 (also needs the quirk)
PMI8950		2.0	1.0
PMI8994		2.0	1.0
PMI8996		2.1	1.0
PMI8998		3.1	3.0
PM660L		4.1	4.0

I don't know for sure if "PMIC4 with WLED ANA/DIG 3.x" a good
discriminant though..

Konrad

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

* Re: [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-09 11:09       ` Konrad Dybcio
@ 2026-01-09 13:33         ` Daniel Thompson
  2026-01-09 15:42           ` barnabas.czeman
  0 siblings, 1 reply; 25+ messages in thread
From: Daniel Thompson @ 2026-01-09 13:33 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: barnabas.czeman, Lee Jones, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, linux-fbdev

On Fri, Jan 09, 2026 at 12:09:11PM +0100, Konrad Dybcio wrote:
> On 1/9/26 7:36 AM, barnabas.czeman@mainlining.org wrote:
> > On 2026-01-08 12:28, Daniel Thompson wrote:
> >> On Thu, Jan 08, 2026 at 04:43:20AM +0100, Barnabás Czémán wrote:
> >>> WLED4 found in PMI8994 supports different ovp values.
> >>>
> >>> Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 compatible")
> >>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> >>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> >>> ---
> >>>  drivers/video/backlight/qcom-wled.c | 41 +++++++++++++++++++++++++++++++++++--
> >>>  1 file changed, 39 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
> >>> index a63bb42c8f8b..5decbd39b789 100644
> >>> --- a/drivers/video/backlight/qcom-wled.c
> >>> +++ b/drivers/video/backlight/qcom-wled.c
> >>> @@ -1244,6 +1244,15 @@ static const struct wled_var_cfg wled4_ovp_cfg = {
> >>>      .size = ARRAY_SIZE(wled4_ovp_values),
> >>>  };
> >>>
> >>> +static const u32 pmi8994_wled_ovp_values[] = {
> >>> +    31000, 29500, 19400, 17800,
> >>> +};
> >>> +
> >>> +static const struct wled_var_cfg pmi8994_wled_ovp_cfg = {
> >>> +    .values = pmi8994_wled_ovp_values,
> >>> +    .size = ARRAY_SIZE(pmi8994_wled_ovp_values),
> >>> +};
> >>> +
> >>
> >> Do these *have* to be named after one of the two PMICs that implement
> >> this OVP range.
> >>
> >> Would something like wled4_alternative_ovp_values[] (and the same
> >> throughout the patch) be more descriptive?
> > I don't know. I don't like the PMIC naming either but at least it
> > descriptive about wich PMIC is needing these values.

It's the descriptive but wrong element I dislike (pmi8994_wled_ovp_cfg
is used by pmi8550).

I know these things crop up for "historical reasons" when is appears in
the same patchset I have to question the naming.


> > I think PMIC naming would be fine if compatibles what representing the
> > same configurations would be deprecated and used as a fallback compatbile
> > style.
> > I mean we could kept the first added compatible for a configuration.
> > Maybe they should be named diferently i don't know if WLEDs have subversion.
>
> Every PMIC peripheral is versioned.
>
> WLED has separate versioning for the digital and analog parts:
>
> PMIC		ANA	DIG
> ---------------------------
> PMI8937		2.0	1.0 (also needs the quirk)
> PMI8950		2.0	1.0
> PMI8994		2.0	1.0
> PMI8996		2.1	1.0
> PMI8998		3.1	3.0
> PM660L		4.1	4.0
>
> I don't know for sure if "PMIC4 with WLED ANA/DIG 3.x" a good
> discriminant though..

Peronally I'd prefer that to making them all use pmi8994 structures.
It's a much better link back to the docs (at least for those with the
power to read them ;-) ).


Daniel.

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

* Re: [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-09 13:33         ` Daniel Thompson
@ 2026-01-09 15:42           ` barnabas.czeman
  2026-01-09 15:45             ` barnabas.czeman
  0 siblings, 1 reply; 25+ messages in thread
From: barnabas.czeman @ 2026-01-09 15:42 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Konrad Dybcio, Lee Jones, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, linux-fbdev

On 2026-01-09 14:33, Daniel Thompson wrote:
> On Fri, Jan 09, 2026 at 12:09:11PM +0100, Konrad Dybcio wrote:
>> On 1/9/26 7:36 AM, barnabas.czeman@mainlining.org wrote:
>> > On 2026-01-08 12:28, Daniel Thompson wrote:
>> >> On Thu, Jan 08, 2026 at 04:43:20AM +0100, Barnabás Czémán wrote:
>> >>> WLED4 found in PMI8994 supports different ovp values.
>> >>>
>> >>> Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 compatible")
>> >>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> >>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> >>> ---
>> >>>  drivers/video/backlight/qcom-wled.c | 41 +++++++++++++++++++++++++++++++++++--
>> >>>  1 file changed, 39 insertions(+), 2 deletions(-)
>> >>>
>> >>> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
>> >>> index a63bb42c8f8b..5decbd39b789 100644
>> >>> --- a/drivers/video/backlight/qcom-wled.c
>> >>> +++ b/drivers/video/backlight/qcom-wled.c
>> >>> @@ -1244,6 +1244,15 @@ static const struct wled_var_cfg wled4_ovp_cfg = {
>> >>>      .size = ARRAY_SIZE(wled4_ovp_values),
>> >>>  };
>> >>>
>> >>> +static const u32 pmi8994_wled_ovp_values[] = {
>> >>> +    31000, 29500, 19400, 17800,
>> >>> +};
>> >>> +
>> >>> +static const struct wled_var_cfg pmi8994_wled_ovp_cfg = {
>> >>> +    .values = pmi8994_wled_ovp_values,
>> >>> +    .size = ARRAY_SIZE(pmi8994_wled_ovp_values),
>> >>> +};
>> >>> +
>> >>
>> >> Do these *have* to be named after one of the two PMICs that implement
>> >> this OVP range.
>> >>
>> >> Would something like wled4_alternative_ovp_values[] (and the same
>> >> throughout the patch) be more descriptive?
>> > I don't know. I don't like the PMIC naming either but at least it
>> > descriptive about wich PMIC is needing these values.
> 
> It's the descriptive but wrong element I dislike (pmi8994_wled_ovp_cfg
> is used by pmi8550).
No, pmi8950 is using pmi8994_wled_opts struct what is using 
pmi8994_wled_ovp_cfg.
> 
> I know these things crop up for "historical reasons" when is appears in
> the same patchset I have to question the naming.
> 
> 
>> > I think PMIC naming would be fine if compatibles what representing the
>> > same configurations would be deprecated and used as a fallback compatbile
>> > style.
>> > I mean we could kept the first added compatible for a configuration.
>> > Maybe they should be named diferently i don't know if WLEDs have subversion.
>> 
>> Every PMIC peripheral is versioned.
>> 
>> WLED has separate versioning for the digital and analog parts:
>> 
>> PMIC		ANA	DIG
>> ---------------------------
>> PMI8937		2.0	1.0 (also needs the quirk)
>> PMI8950		2.0	1.0
>> PMI8994		2.0	1.0
>> PMI8996		2.1	1.0
>> PMI8998		3.1	3.0
>> PM660L		4.1	4.0
>> 
>> I don't know for sure if "PMIC4 with WLED ANA/DIG 3.x" a good
>> discriminant though..
> 
> Peronally I'd prefer that to making them all use pmi8994 structures.
> It's a much better link back to the docs (at least for those with the
> power to read them ;-) ).
> 
> 
> Daniel.

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

* Re: [PATCH v2 2/7] backlight: qcom-wled: Support ovp values for PMI8994
  2026-01-09 15:42           ` barnabas.czeman
@ 2026-01-09 15:45             ` barnabas.czeman
  0 siblings, 0 replies; 25+ messages in thread
From: barnabas.czeman @ 2026-01-09 15:45 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Konrad Dybcio, Lee Jones, Jingoo Han, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Kiran Gunda,
	Helge Deller, Luca Weiss, Konrad Dybcio, Eugene Lepshy,
	Gianluca Boiano, Alejandro Tafalla, dri-devel, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, linux-fbdev

On 2026-01-09 16:42, barnabas.czeman@mainlining.org wrote:
> On 2026-01-09 14:33, Daniel Thompson wrote:
>> On Fri, Jan 09, 2026 at 12:09:11PM +0100, Konrad Dybcio wrote:
>>> On 1/9/26 7:36 AM, barnabas.czeman@mainlining.org wrote:
>>> > On 2026-01-08 12:28, Daniel Thompson wrote:
>>> >> On Thu, Jan 08, 2026 at 04:43:20AM +0100, Barnabás Czémán wrote:
>>> >>> WLED4 found in PMI8994 supports different ovp values.
>>> >>>
>>> >>> Fixes: 6fc632d3e3e0 ("video: backlight: qcom-wled: Add PMI8994 compatible")
>>> >>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>>> >>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>>> >>> ---
>>> >>>  drivers/video/backlight/qcom-wled.c | 41 +++++++++++++++++++++++++++++++++++--
>>> >>>  1 file changed, 39 insertions(+), 2 deletions(-)
>>> >>>
>>> >>> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
>>> >>> index a63bb42c8f8b..5decbd39b789 100644
>>> >>> --- a/drivers/video/backlight/qcom-wled.c
>>> >>> +++ b/drivers/video/backlight/qcom-wled.c
>>> >>> @@ -1244,6 +1244,15 @@ static const struct wled_var_cfg wled4_ovp_cfg = {
>>> >>>      .size = ARRAY_SIZE(wled4_ovp_values),
>>> >>>  };
>>> >>>
>>> >>> +static const u32 pmi8994_wled_ovp_values[] = {
>>> >>> +    31000, 29500, 19400, 17800,
>>> >>> +};
>>> >>> +
>>> >>> +static const struct wled_var_cfg pmi8994_wled_ovp_cfg = {
>>> >>> +    .values = pmi8994_wled_ovp_values,
>>> >>> +    .size = ARRAY_SIZE(pmi8994_wled_ovp_values),
>>> >>> +};
>>> >>> +
>>> >>
>>> >> Do these *have* to be named after one of the two PMICs that implement
>>> >> this OVP range.
>>> >>
>>> >> Would something like wled4_alternative_ovp_values[] (and the same
>>> >> throughout the patch) be more descriptive?
>>> > I don't know. I don't like the PMIC naming either but at least it
>>> > descriptive about wich PMIC is needing these values.
>> 
>> It's the descriptive but wrong element I dislike (pmi8994_wled_ovp_cfg
>> is used by pmi8550).
> No, pmi8950 is using pmi8994_wled_opts struct what is using 
> pmi8994_wled_ovp_cfg.
Maybe would be better move opts to compatible data.
>> 
>> I know these things crop up for "historical reasons" when is appears 
>> in
>> the same patchset I have to question the naming.
>> 
>> 
>>> > I think PMIC naming would be fine if compatibles what representing the
>>> > same configurations would be deprecated and used as a fallback compatbile
>>> > style.
>>> > I mean we could kept the first added compatible for a configuration.
>>> > Maybe they should be named diferently i don't know if WLEDs have subversion.
>>> 
>>> Every PMIC peripheral is versioned.
>>> 
>>> WLED has separate versioning for the digital and analog parts:
>>> 
>>> PMIC		ANA	DIG
>>> ---------------------------
>>> PMI8937		2.0	1.0 (also needs the quirk)
>>> PMI8950		2.0	1.0
>>> PMI8994		2.0	1.0
>>> PMI8996		2.1	1.0
>>> PMI8998		3.1	3.0
>>> PM660L		4.1	4.0
>>> 
>>> I don't know for sure if "PMIC4 with WLED ANA/DIG 3.x" a good
>>> discriminant though..
>> 
>> Peronally I'd prefer that to making them all use pmi8994 structures.
>> It's a much better link back to the docs (at least for those with the
>> power to read them ;-) ).
>> 
>> 
>> Daniel.

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

end of thread, other threads:[~2026-01-09 15:48 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08  3:43 [PATCH v2 0/7] Fix PMI8950 WLED ovp values and more Barnabás Czémán
2026-01-08  3:43 ` [PATCH v2 1/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8994 Barnabás Czémán
2026-01-08  8:54   ` Konrad Dybcio
2026-01-08  9:17     ` barnabas.czeman
2026-01-08  9:22       ` Konrad Dybcio
2026-01-08  9:30         ` barnabas.czeman
2026-01-08  9:21     ` Konrad Dybcio
2026-01-08 10:09   ` Krzysztof Kozlowski
2026-01-08  3:43 ` [PATCH v2 2/7] backlight: qcom-wled: Support " Barnabás Czémán
2026-01-08  8:55   ` Konrad Dybcio
2026-01-08  9:22     ` Konrad Dybcio
2026-01-08 11:28   ` Daniel Thompson
2026-01-09  6:36     ` barnabas.czeman
2026-01-09 11:09       ` Konrad Dybcio
2026-01-09 13:33         ` Daniel Thompson
2026-01-09 15:42           ` barnabas.czeman
2026-01-09 15:45             ` barnabas.czeman
2026-01-08  3:43 ` [PATCH v2 3/7] dt-bindings: backlight: qcom-wled: Document ovp values for PMI8950 Barnabás Czémán
2026-01-08  9:22   ` Konrad Dybcio
2026-01-08 10:17   ` Krzysztof Kozlowski
2026-01-08  3:43 ` [PATCH v2 4/7] backlight: qcom-wled: Fix " Barnabás Czémán
2026-01-08  9:22   ` Konrad Dybcio
2026-01-08  3:43 ` [PATCH v2 5/7] arm64: dts: qcom: msm8953-xiaomi-vince: correct wled ovp value Barnabás Czémán
2026-01-08  3:43 ` [PATCH v2 6/7] arm64: dts: qcom: msm8937-xiaomi-land: " Barnabás Czémán
2026-01-08  3:43 ` [PATCH v2 7/7] arm64: dts: qcom: msm8953-xiaomi-daisy: fix backlight Barnabás Czémán

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