Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v3 1/3] backlight: aw99706: Fix DT property names to match binding
       [not found] <20260804030255.1934470-1-junjie.cao@intel.com>
@ 2026-08-04  3:02 ` Junjie Cao
  2026-08-10 10:29   ` Daniel Thompson
  2026-08-04  3:02 ` [PATCH v3 3/3] backlight: aw99706: Honor the core blank state in update_status() Junjie Cao
  1 sibling, 1 reply; 4+ messages in thread
From: Junjie Cao @ 2026-08-04  3:02 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han
  Cc: dri-devel, linux-leds, linux-kernel, Pengyu Luo, stable,
	Junjie Cao

From: Junjie Cao <junjie.cao@linux.dev>

The driver reads four tuning properties without the unit suffixes that
the binding mandates: "awinic,sw-freq" instead of "awinic,sw-freq-hz",
"awinic,sw-ilmt" instead of "awinic,sw-ilmt-microamp", "awinic,iled-max"
instead of "awinic,iled-max-microamp", and "awinic,uvlo-thres" instead
of "awinic,uvlo-thres-microvolt".

As a result, device_property_read_u32() never finds these properties in
a binding-conformant device tree and silently falls back to the compiled-in
defaults for switching frequency, switching current limit, max LED current,
and UVLO threshold.

Fix by aligning the property name strings in aw99706_dt_props[] with the
binding. No value/range changes are needed since both sides already use
the same units and enumerations.

Fixes: 147b38a5ad06 ("backlight: aw99706: Add support for Awinic AW99706 backlight")
Cc: stable@vger.kernel.org
Signed-off-by: Junjie Cao <junjie.cao@linux.dev>
---
 drivers/video/backlight/aw99706.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/backlight/aw99706.c b/drivers/video/backlight/aw99706.c
index 18299faf06ad..e130f164303a 100644
--- a/drivers/video/backlight/aw99706.c
+++ b/drivers/video/backlight/aw99706.c
@@ -130,23 +130,23 @@ static const struct aw99706_dt_prop aw99706_dt_props[] = {
 		AW99706_CFG0_REG, AW99706_DIM_MODE_MASK, 1,
 	},
 	{
-		"awinic,sw-freq", aw99706_dt_property_lookup,
+		"awinic,sw-freq-hz", aw99706_dt_property_lookup,
 		aw99706_sw_freq_tbl, ARRAY_SIZE(aw99706_sw_freq_tbl),
 		AW99706_CFG1_REG, AW99706_SW_FREQ_MASK, 750000,
 	},
 	{
-		"awinic,sw-ilmt", aw99706_dt_property_lookup,
+		"awinic,sw-ilmt-microamp", aw99706_dt_property_lookup,
 		aw99706_sw_ilmt_tbl, ARRAY_SIZE(aw99706_sw_ilmt_tbl),
 		AW99706_CFG1_REG, AW99706_SW_ILMT_MASK, 3000000,
 	},
 	{
-		"awinic,iled-max", aw99706_dt_property_iled_max_convert,
+		"awinic,iled-max-microamp", aw99706_dt_property_iled_max_convert,
 		NULL, 0,
 		AW99706_CFG2_REG, AW99706_ILED_MAX_MASK, 20000,
 
 	},
 	{
-		"awinic,uvlo-thres", aw99706_dt_property_lookup,
+		"awinic,uvlo-thres-microvolt", aw99706_dt_property_lookup,
 		aw99706_ulvo_thres_tbl, ARRAY_SIZE(aw99706_ulvo_thres_tbl),
 		AW99706_CFG2_REG, AW99706_UVLOSEL_MASK, 2200000,
 	},
-- 
2.43.0


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

* [PATCH v3 3/3] backlight: aw99706: Honor the core blank state in update_status()
       [not found] <20260804030255.1934470-1-junjie.cao@intel.com>
  2026-08-04  3:02 ` [PATCH v3 1/3] backlight: aw99706: Fix DT property names to match binding Junjie Cao
@ 2026-08-04  3:02 ` Junjie Cao
  2026-08-10 10:32   ` Daniel Thompson
  1 sibling, 1 reply; 4+ messages in thread
From: Junjie Cao @ 2026-08-04  3:02 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han
  Cc: dri-devel, linux-leds, linux-kernel, Pengyu Luo, stable,
	Junjie Cao

From: Junjie Cao <junjie.cao@linux.dev>

update_status() passes props.brightness straight to the hardware and
ignores the power/blank state tracked by the core. Writing 4 to the
bl_power sysfs attribute or blanking the framebuffer therefore leaves
the backlight lit.

Use backlight_get_brightness(), which returns 0 while the device is
blanked.

Fixes: 147b38a5ad06 ("backlight: aw99706: Add support for Awinic AW99706 backlight")
Cc: stable@vger.kernel.org
Signed-off-by: Junjie Cao <junjie.cao@linux.dev>
---
 drivers/video/backlight/aw99706.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/backlight/aw99706.c b/drivers/video/backlight/aw99706.c
index 6ec49b6cb14c..c4a66b59ecf1 100644
--- a/drivers/video/backlight/aw99706.c
+++ b/drivers/video/backlight/aw99706.c
@@ -340,7 +340,7 @@ static int aw99706_bl_update_status(struct backlight_device *bl)
 {
 	struct aw99706_device *aw = bl_get_data(bl);
 
-	return aw99706_update_brightness(aw, bl->props.brightness);
+	return aw99706_update_brightness(aw, backlight_get_brightness(bl));
 }
 
 static const struct backlight_ops aw99706_bl_ops = {
-- 
2.43.0


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

* Re: [PATCH v3 1/3] backlight: aw99706: Fix DT property names to match binding
  2026-08-04  3:02 ` [PATCH v3 1/3] backlight: aw99706: Fix DT property names to match binding Junjie Cao
@ 2026-08-10 10:29   ` Daniel Thompson
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Thompson @ 2026-08-10 10:29 UTC (permalink / raw)
  To: Junjie Cao
  Cc: Lee Jones, Jingoo Han, dri-devel, linux-leds, linux-kernel,
	Pengyu Luo, stable, Junjie Cao

On Tue, Aug 04, 2026 at 11:02:53AM +0800, Junjie Cao wrote:
> From: Junjie Cao <junjie.cao@linux.dev>
>
> The driver reads four tuning properties without the unit suffixes that
> the binding mandates: "awinic,sw-freq" instead of "awinic,sw-freq-hz",
> "awinic,sw-ilmt" instead of "awinic,sw-ilmt-microamp", "awinic,iled-max"
> instead of "awinic,iled-max-microamp", and "awinic,uvlo-thres" instead
> of "awinic,uvlo-thres-microvolt".
>
> As a result, device_property_read_u32() never finds these properties in
> a binding-conformant device tree and silently falls back to the compiled-in
> defaults for switching frequency, switching current limit, max LED current,
> and UVLO threshold.
>
> Fix by aligning the property name strings in aw99706_dt_props[] with the
> binding. No value/range changes are needed since both sides already use
> the same units and enumerations.
>
> Fixes: 147b38a5ad06 ("backlight: aw99706: Add support for Awinic AW99706 backlight")
> Cc: stable@vger.kernel.org
> Signed-off-by: Junjie Cao <junjie.cao@linux.dev>

There don't seem to be any usage of these properties in-tree so I think
it is probably OK to change the driver behaviour without fallbacks for
DTs with version skew!

Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>


Daniel.

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

* Re: [PATCH v3 3/3] backlight: aw99706: Honor the core blank state in update_status()
  2026-08-04  3:02 ` [PATCH v3 3/3] backlight: aw99706: Honor the core blank state in update_status() Junjie Cao
@ 2026-08-10 10:32   ` Daniel Thompson
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Thompson @ 2026-08-10 10:32 UTC (permalink / raw)
  To: Junjie Cao
  Cc: Lee Jones, Jingoo Han, dri-devel, linux-leds, linux-kernel,
	Pengyu Luo, stable, Junjie Cao

On Tue, Aug 04, 2026 at 11:02:55AM +0800, Junjie Cao wrote:
> From: Junjie Cao <junjie.cao@linux.dev>
>
> update_status() passes props.brightness straight to the hardware and
> ignores the power/blank state tracked by the core. Writing 4 to the
> bl_power sysfs attribute or blanking the framebuffer therefore leaves
> the backlight lit.
>
> Use backlight_get_brightness(), which returns 0 while the device is
> blanked.
>
> Fixes: 147b38a5ad06 ("backlight: aw99706: Add support for Awinic AW99706 backlight")
> Cc: stable@vger.kernel.org
> Signed-off-by: Junjie Cao <junjie.cao@linux.dev>

Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>


Daniel.

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

end of thread, other threads:[~2026-08-10 10:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260804030255.1934470-1-junjie.cao@intel.com>
2026-08-04  3:02 ` [PATCH v3 1/3] backlight: aw99706: Fix DT property names to match binding Junjie Cao
2026-08-10 10:29   ` Daniel Thompson
2026-08-04  3:02 ` [PATCH v3 3/3] backlight: aw99706: Honor the core blank state in update_status() Junjie Cao
2026-08-10 10:32   ` Daniel Thompson

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