pwm: mediatek: Fix clock control issue
authorZhi Mao <zhi.mao@mediatek.com>
Fri, 30 Jun 2017 06:05:18 +0000 (14:05 +0800)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 21 Aug 2017 08:39:09 +0000 (10:39 +0200)
commite7c197ec97c3ac3ed3698be7a21d51a338582e1d
treee415c1bd31064ae802eb4b92d4a3b3f3cf9a204b
parentcd30798a6c17c1fa182e9b0bb85bd973776ff193
pwm: mediatek: Fix clock control issue

In order to save some power, do not prepare the top and main clocks
during mtk_pwm_probe(). Instead, prepare the clocks only when necessary
and also make sure to enable the clocks to match the semantics of the
common clock framework.

While at it, don't explicitly disable all PWM channels in ->remove()
because all users should have done that already.

Signed-off-by: Zhi Mao <zhi.mao@mediatek.com>
Acked-by: John Crispin <john@phrozen.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-mediatek.c