Commit fd794b52 authored by Jitao Shi's avatar Jitao Shi Committed by sanglipeng
Browse files

pwm: mtk-disp: Adjust the clocks to avoid them mismatch

stable inclusion
from stable-v5.10.180
commit 6d13804388d6eb4b74c633a18a3bbd2d609f91bf
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6d13804388d6eb4b74c633a18a3bbd2d609f91bf



--------------------------------

[ Upstream commit d7a4e582 ]

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: default avatarJitao Shi <jitao.shi@mediatek.com>
[thierry.reding@gmail.com: squashed in fixup patch]
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
Stable-dep-of: 36dd7f53 ("pwm: mtk-disp: Disable shadow registers before setting backlight values")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 7472de71
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment