]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: mtk-disp: Adjust the clocks to avoid them mismatch
authorJitao Shi <jitao.shi@mediatek.com>
Sun, 8 Aug 2021 13:24:29 +0000 (21:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:53 +0000 (11:35 +0200)
commitc96c0e4d3c9eb10d0a66dc3c3dc3c5662128be4e
tree75236f1c814005808125a0bc4da02fc2607a8b0e
parent37dfe77e1d6150cdfd8772f28d2faa03cceb81bd
pwm: mtk-disp: Adjust the clocks to avoid them mismatch

[ Upstream commit 7a1c2d37e8a38bfad5a9633cdc274ca1385c2028 ]

The clks "main" and "mm" are prepared in .probe() (and unprepared in
.remove()). This results in the clocks being on during suspend which
results in unnecessarily increased power consumption.

Remove the clock operations from .probe() and .remove(). Add the
clk_prepare_enable() in .enable() and the clk_disable_unprepare() in
.disable().

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
[thierry.reding@gmail.com: squashed in fixup patch]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Stable-dep-of: 36dd7f530ae7 ("pwm: mtk-disp: Disable shadow registers before setting backlight values")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pwm/pwm-mtk-disp.c