mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-12 07:13:10 -04:00
backlight: aw99706: Honor the core blank state in update_status()
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: 147b38a5ad ("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>
Link: https://patch.msgid.link/20260804030255.1934470-4-junjie.cao@intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user