UPSTREAM: regulator: pwm: Adjust PWM config at probe time
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 14 Jun 2016 09:13:17 +0000 (11:13 +0200)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 6 Mar 2017 10:28:40 +0000 (18:28 +0800)
commit5452a5568c2b87d73f7c33c0a9529153d62f90ee
tree1e92ea0d2452e2313a0f8c70cfe398f20b59dc6a
parent96e741fe6b42addbc0e46d110e7dcc0266f2cc29
UPSTREAM: regulator: pwm: Adjust PWM config at probe time

The PWM attached to a PWM regulator device might have been previously
configured by the bootloader.
Make sure the bootloader and linux config are in sync, and adjust the PWM
config if that's not the case.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-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>
(cherry picked from commit fd4f99c4c3ce8ccd9b8ea751afc614a7624ecef2)

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