regulator: pwm: Retrieve correct voltage
The continuous PWM voltage regulator is caching the voltage value in the ->volt_uV field. While most of the time this value should reflect the real voltage, sometime it can be sightly different if the PWM device rounded the set_duty_cycle request. Moreover, this value is not valid until someone has modified the regulator output. Remove the ->volt_uV field and always rely on the PWM state to calculate the regulator output. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: NBrian Norris <briannorris@chromium.org> Tested-by: NBrian Norris <briannorris@chromium.org> Tested-by: NHeiko Stuebner <heiko@sntech.de> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
Showing
想要评论请 注册 或 登录