regulator: pwm: implement ->enable(), ->disable() and ->is_enabled methods
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 21 Sep 2015 09:33:28 +0000 (11:33 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 21 Sep 2015 21:11:18 +0000 (14:11 -0700)
commit1de7d80246a047edaa4ea7de225437571a3aec34
treee701ada1c45b2f15064674c0ae5bbf5aea68b279
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f
regulator: pwm: implement ->enable(), ->disable() and ->is_enabled methods

Implement the ->enable(), ->disable() and ->is_enabled methods and remove
the PWM call in ->set_voltage_sel().
This is particularly important for critical regulators tagged as always-on,
because not claiming the PWM (and its dependencies) might lead to
unpredictable behavior (like a system hang because the PWM clk is only
claimed when the PWM device is enabled).

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/pwm-regulator.c