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)
commitd7a4e582587d97a586b1f7709e3bddcf35928e96
tree61f469a2f36d4e975bed64d5084743ff3a6c991b
parentdd8f6b299a2b86c4839de4a60a28ce2399453bc0
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