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)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 11 Jul 2016 06:41:37 +0000 (08:41 +0200)
commitfd4f99c4c3ce8ccd9b8ea751afc614a7624ecef2
tree15b2e246b90c8ebf65229ea3eb76277fd282b445
parent6fa231b778d9cf3b18d50b594c9da1d63a6864ac
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>
drivers/regulator/pwm-regulator.c