UPSTREAM: pwm: rockchip: Avoid glitches on already running PWMs
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 14 Jun 2016 09:13:13 +0000 (11:13 +0200)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 6 Mar 2017 10:28:40 +0000 (18:28 +0800)
commit370a8d95d44bd49bbe7ce2b8d23a761ad4c50ec8
treef1eea5f34655289e8cf6884d36e8f83e72f7369a
parentc365d869727270b8404e77eb914671ea7a33be5c
UPSTREAM: pwm: rockchip: Avoid glitches on already running PWMs

The current logic will disable the PWM clk even if the PWM was left
enabled by the bootloader (because it's controlling a critical device
like a regulator for example).
Keep the PWM clk enabled if the PWM is enabled to avoid any glitches.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(commit 48cf973cae33488f84d7ab79a0f613383cff4de4)

Conflicts:
drivers/pwm/pwm-rockchip.c

Change-Id: I75ffccd19c5244568fc0034d1585dac490296111
Signed-off-by: David Wu <david.wu@rock-chips.com>
drivers/pwm/pwm-rockchip.c