kernel-fxtec-pro1x/drivers/regulator
Vincent Whitchurch ad20a37cb7 regulator: pwm: Fix machine constraints application
[ Upstream commit 59ae97a7a9e1499c2070e29841d1c4be4ae2994a ]

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 <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20200902130952.24880-1-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-23 12:10:57 +02:00
..
88pg86x.c
88pm800-regulator.c regulator: 88pm800: fix warning same module names 2019-12-17 20:35:39 +01:00
88pm8607.c
aat2870-regulator.c
ab3100.c
ab8500-ext.c
ab8500.c regulator: ab8500: Remove AB8505 USB regulator 2020-01-09 10:19:05 +01:00
act8865-regulator.c
act8945a-regulator.c
ad5398.c
anatop-regulator.c
arizona-ldo1.c
arizona-micsupp.c
as3711-regulator.c
as3722-regulator.c
axp20x-regulator.c
bcm590xx-regulator.c
bd9571mwv-regulator.c
bd71837-regulator.c
core.c regulator: push allocation in set_consumer_device_supply() out of lock 2020-09-17 13:45:29 +02:00
cpcap-regulator.c
da903x.c
da9052-regulator.c
da9055-regulator.c
da9062-regulator.c
da9063-regulator.c
da9210-regulator.c
da9210-regulator.h
da9211-regulator.c
da9211-regulator.h
db8500-prcmu.c
dbx500-prcmu.c
dbx500-prcmu.h
devres.c
dummy.c
dummy.h
fan53555.c
fixed-helper.c
fixed.c
gpio-regulator.c
helpers.c
hi655x-regulator.c
hi6421-regulator.c
hi6421v530-regulator.c
internal.h
isl6271a-regulator.c
isl9305.c
Kconfig
lm363x-regulator.c
lp872x.c
lp873x-regulator.c
lp3971.c
lp3972.c
lp8755.c
lp8788-buck.c
lp8788-ldo.c
lp87565-regulator.c regulator: lp87565: Fix missing register for LP87565_BUCK_0 2020-01-27 14:50:32 +01:00
ltc3589.c
ltc3676.c
Makefile regulator: 88pm800: fix warning same module names 2019-12-17 20:35:39 +01:00
max1586.c
max8649.c
max8660.c
max8907-regulator.c regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe() 2019-12-31 16:34:56 +01:00
max8925-regulator.c
max8952.c
max8973-regulator.c
max8997-regulator.c
max8998.c
max14577-regulator.c
max77620-regulator.c
max77686-regulator.c
max77693-regulator.c
max77802-regulator.c
mc13xxx-regulator-core.c
mc13xxx.h
mc13783-regulator.c
mc13892-regulator.c
mt6311-regulator.c
mt6311-regulator.h
mt6323-regulator.c
mt6380-regulator.c
mt6397-regulator.c
of_regulator.c
palmas-regulator.c
pbias-regulator.c
pcap-regulator.c
pcf50633-regulator.c
pfuze100-regulator.c regualtor: pfuze100: correct sw1a/sw2 on pfuze3000 2020-06-30 23:17:10 -04:00
pv88060-regulator.c regulator: pv88060: Fix array out-of-bounds access 2020-01-27 14:50:25 +01:00
pv88060-regulator.h
pv88080-regulator.c regulator: pv88080: Fix array out-of-bounds access 2020-01-27 14:50:25 +01:00
pv88080-regulator.h
pv88090-regulator.c regulator: pv88090: Fix array out-of-bounds access 2020-01-27 14:50:25 +01:00
pv88090-regulator.h
pwm-regulator.c regulator: pwm: Fix machine constraints application 2020-09-23 12:10:57 +02:00
qcom-rpmh-regulator.c
qcom_rpm-regulator.c
qcom_smd-regulator.c
qcom_spmi-regulator.c
rc5t583-regulator.c
rk808-regulator.c regulator: rk808: Lower log level on optional GPIOs being not available 2020-02-24 08:34:40 +01:00
rn5t618-regulator.c regulator: rn5t618: fix module aliases 2020-01-12 12:17:18 +01:00
rt5033-regulator.c
s2mpa01.c
s2mps11.c
s5m8767.c
sc2731-regulator.c
sky81452-regulator.c
stm32-vrefbuf.c
stw481x-vmmc.c
sy8106a-regulator.c
ti-abb-regulator.c
tps6105x-regulator.c
tps6507x-regulator.c
tps6524x-regulator.c
tps6586x-regulator.c
tps51632-regulator.c
tps62360-regulator.c
tps65023-regulator.c
tps65086-regulator.c regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB 2020-01-27 14:50:33 +01:00
tps65090-regulator.c
tps65132-regulator.c
tps65217-regulator.c
tps65218-regulator.c
tps65910-regulator.c
tps65912-regulator.c
tps80031-regulator.c
twl-regulator.c
twl6030-regulator.c
uniphier-regulator.c
userspace-consumer.c
vctrl-regulator.c
vexpress-regulator.c
virtual.c
wm831x-dcdc.c regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA 2020-01-27 14:50:28 +01:00
wm831x-isink.c
wm831x-ldo.c
wm8350-regulator.c
wm8400-regulator.c
wm8994-regulator.c