pwm: mtk-disp: Disable shadow registers before setting backlight values
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 3 Apr 2023 13:30:53 +0000 (15:30 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 6 Apr 2023 14:23:22 +0000 (16:23 +0200)
commit36dd7f530ae7d9ce9e853ffb8aa337de65c6600b
tree5d53f90cf585de8ea5c14f47c554d6c7a4d84db1
parentfa359c1938adbd04cf7e68786ea58366dddc3ad7
pwm: mtk-disp: Disable shadow registers before setting backlight values

If shadow registers usage is not desired, disable that before performing
any write to CON0/1 registers in the .apply() callback, otherwise we may
lose clkdiv or period/width updates.

Fixes: cd4b45ac449a ("pwm: Add MediaTek MT2701 display PWM driver support")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Tested-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-mtk-disp.c