diff options
| author | David Heidelberg <david@ixit.cz> | 2026-09-21 12:46:25 +0200 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-10-14 13:30:50 +0100 |
| commit | eacfbe6f9716d00536edc229a58895405e73c2e4 (patch) | |
| tree | 5609dc943478b3a642a673296b2936e4ecc058bf /tools/objtool/tests/generic/test-thinlto-local.sh | |
| parent | 5eda6b51461932f9fd835ef9e4574650c69c4fe8 (diff) | |
backlight: qcom-wled: Read back the programmed brightness at probe
Since the previous change wled_probe() seeds wled->brightness from
MOD_EN, but with default-brightness rather than the level the hardware
is actually driving, so a backlight left lit by the bootloader still
visibly steps on the first update, and actual_brightness reports the
last value written rather than what the panel shows.
Add wled_read_brightness(), which returns 0 when MOD_EN is clear and
otherwise reads the brightness register the matching
wledN_set_brightness() writes: the first enabled string on WLED3 and
WLED4, the selected modulator on WLED5. Use it to seed both
wled->brightness and the initial backlight property, and expose it as
backlight_ops.get_brightness so that actual_brightness reflects the
hardware too.
A module that is enabled with the brightness registers at zero, which
wled4_setup() and wled_auto_string_detection() can leave behind on a
cold boot, now reads back as off. The OVP interrupt is then armed by the
first brightness update rather than from probe, which is what happens
on every other board where the module starts out disabled.
Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Assisted-by: LLM
Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Link: https://patch.msgid.link/20260921-qcom-wled-backlight-v4-4-bab8c7ef73cb@ixit.cz
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/objtool/tests/generic/test-thinlto-local.sh')
0 files changed, 0 insertions, 0 deletions
