aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorVincent Whitchurch <[email protected]>2020-09-02 13:09:52 +0000
committerMark Brown <[email protected]>2020-09-02 18:13:29 +0000
commit59ae97a7a9e1499c2070e29841d1c4be4ae2994a (patch)
treed0bc3d5efcbc64bb4de8d96f021524da187e3eb4 /lib/dynamic_debug.c
parentregulator: core: Fix slab-out-of-bounds in regulator_unlock_recursive() (diff)
downloadkernel-59ae97a7a9e1499c2070e29841d1c4be4ae2994a.tar.gz
kernel-59ae97a7a9e1499c2070e29841d1c4be4ae2994a.zip
regulator: pwm: Fix machine constraints application
If the zero duty cycle doesn't correspond to any voltage in the voltage table, the PWM regulator returns an -EINVAL from get_voltage_sel() which results in the core erroring out with a "failed to get the current voltage" and ending up not applying the machine constraints. Instead, return -ENOTRECOVERABLE which makes the core set the voltage since it's at an unknown value. For example, with this device tree: fooregulator { compatible = "pwm-regulator"; pwms = <&foopwm 0 100000>; regulator-min-microvolt = <2250000>; regulator-max-microvolt = <2250000>; regulator-name = "fooregulator"; regulator-always-on; regulator-boot-on; voltage-table = <2250000 30>; }; Before this patch: fooregulator: failed to get the current voltage(-22) After this patch: fooregulator: Setting 2250000-2250000uV fooregulator: 2250 mV Signed-off-by: Vincent Whitchurch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions