]> 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)
commit658ef3d5cd9d8a79db6a7cc4b8d9143e4ac57927
tree61f469a2f36d4e975bed64d5084743ff3a6c991b
parent414393052dcc9a27079c6011c2eb52a2a9e97353
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