backlight: qcom-wled: Fix FSC update issue for WLED5
authorKiran Gunda <kgunda@codeaurora.org>
Thu, 18 Mar 2021 12:39:39 +0000 (18:09 +0530)
committerLee Jones <lee.jones@linaro.org>
Mon, 22 Mar 2021 17:33:42 +0000 (17:33 +0000)
commit4d6e9cdff7fbb6bef3e5559596fab3eeffaf95ca
tree9badef0466b3ce91f765bfd13674e7c440cd5322
parent4b79ec9a553de3a438631dfe6cb18fdfcaee2098
backlight: qcom-wled: Fix FSC update issue for WLED5

Currently, for WLED5, the FSC (Full scale current) setting is not
updated properly due to driver toggling the wrong register after
an FSC update.

On WLED5 we should only toggle the MOD_SYNC bit after a brightness
update. For an FSC update we need to toggle the SYNC bits instead.

Fix it by adopting the common wled3_sync_toggle() for WLED5 and
introducing new code to the brightness update path to compensate.

Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/qcom-wled.c