]> 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)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 2 Sep 2021 20:03:43 +0000 (22:03 +0200)
commit7a1c2d37e8a38bfad5a9633cdc274ca1385c2028
tree61f469a2f36d4e975bed64d5084743ff3a6c991b
parent8a0678c06c9d69ae1f5fa3942c197d411f9eeac0
pwm: mtk-disp: Adjust the clocks to avoid them mismatch

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>
drivers/pwm/pwm-mtk-disp.c