Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: backlight: Drop maximum brightness override for brightness zero

The note in c2adda27d202f ("video: backlight: Add of_find_backlight helper
in backlight.c") says that gpio-backlight uses brightness as power state.
This has been fixed since in ec665b756e6f7 ("backlight: gpio-backlight:
Correct initial power state handling") and other backlight drivers do not
require this workaround. Drop the workaround.

This fixes the case where e.g. pwm-backlight can perfectly well be set to
brightness 0 on boot in DT, which without this patch leads to the display
brightness to be max instead of off.

Fixes: c2adda27d202f ("video: backlight: Add of_find_backlight helper in backlight.c")
Cc: <stable@vger.kernel.org> # 5.4+
Cc: <stable@vger.kernel.org> # 4.19.x: ec665b756e6f7: backlight: gpio-backlight: Correct initial power state handling
Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Marek Vasut and committed by
Lee Jones
33a5471f 6880fa6c

-6
-6
drivers/video/backlight/backlight.c
··· 688 688 of_node_put(np); 689 689 if (!bd) 690 690 return ERR_PTR(-EPROBE_DEFER); 691 - /* 692 - * Note: gpio_backlight uses brightness as 693 - * power state during probe 694 - */ 695 - if (!bd->props.brightness) 696 - bd->props.brightness = bd->props.max_brightness; 697 691 } 698 692 } 699 693