linux/drivers/regulator
Krzysztof Kozlowski c9e5a00596 regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled
commit b16bef60a9112b1e6daf3afd16484eb06e7ce792 upstream.

The driver and its bindings, before commit 04f9f068a6 ("regulator:
s5m8767: Modify parsing method of the voltage table of buck2/3/4") were
requiring to provide at least one safe/default voltage for DVS registers
if DVS GPIO is not being enabled.

IOW, if s5m8767,pmic-buck2-uses-gpio-dvs is missing, the
s5m8767,pmic-buck2-dvs-voltage should still be present and contain one
voltage.

This requirement was coming from driver behavior matching this condition
(none of DVS GPIO is enabled): it was always initializing the DVS
selector pins to 0 and keeping the DVS enable setting at reset value
(enabled).  Therefore if none of DVS GPIO is enabled in devicetree,
driver was configuring the first DVS voltage for buck[234].

Mentioned commit 04f9f068a6 ("regulator: s5m8767: Modify parsing
method of the voltage table of buck2/3/4") broke it because DVS voltage
won't be parsed from devicetree if DVS GPIO is not enabled.  After the
change, driver will configure bucks to use the register reset value as
voltage which might have unpleasant effects.

Fix this by relaxing the bindings constrain: if DVS GPIO is not enabled
in devicetree (therefore DVS voltage is also not parsed), explicitly
disable it.

Cc: <stable@vger.kernel.org>
Fixes: 04f9f068a6 ("regulator: s5m8767: Modify parsing method of the voltage table of buck2/3/4")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Rob Herring <robh@kernel.org>
Message-Id: <20211008113723.134648-2-krzysztof.kozlowski@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-17 09:48:22 +01:00
..
88pg86x.c
88pm800-regulator.c
88pm8607.c
Kconfig
Makefile
aat2870-regulator.c
ab3100.c
ab8500-ext.c
ab8500.c
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
bd718x7-regulator.c
bd9571mwv-regulator.c
bd70528-regulator.c
core.c regulator: core: resolve supply for boot-on/always-on regulators 2021-06-16 11:59:43 +02:00
cpcap-regulator.c
da903x.c
da9052-regulator.c regulator: da9052: Ensure enough delay time for .set_voltage_time_sel 2021-07-14 16:53:15 +02:00
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 regulator: hi655x: Fix pass wrong pointer to config.driver_data 2021-07-14 16:53:23 +02:00
hi6421-regulator.c regulator: hi6421: Fix getting wrong drvdata 2021-07-28 13:30:55 +02:00
hi6421v530-regulator.c
internal.h
isl6271a-regulator.c
isl9305.c
lm363x-regulator.c
lochnagar-regulator.c
lp872x.c
lp873x-regulator.c
lp3971.c
lp3972.c
lp8755.c
lp8788-buck.c
lp8788-ldo.c
lp87565-regulator.c
ltc3589.c
ltc3676.c
max1586.c
max8649.c
max8660.c
max8907-regulator.c
max8925-regulator.c
max8952.c
max8973-regulator.c
max8997-regulator.c
max8998.c
max14577-regulator.c
max77620-regulator.c regulator: max77620: Use device_set_of_node_from_dev() 2021-06-16 11:59:43 +02:00
max77650-regulator.c
max77686-regulator.c
max77693-regulator.c
max77802-regulator.c
mc13xxx-regulator-core.c
mc13xxx.h
mc13783-regulator.c
mc13892-regulator.c
mcp16502.c
mt6311-regulator.c
mt6311-regulator.h
mt6323-regulator.c
mt6358-regulator.c regulator: mt6358: Fix vdram2 .vsel_mask 2021-07-14 16:53:15 +02:00
mt6380-regulator.c
mt6397-regulator.c
of_regulator.c
palmas-regulator.c
pbias-regulator.c
pcap-regulator.c
pcf50633-regulator.c
pfuze100-regulator.c
pv88060-regulator.c
pv88060-regulator.h
pv88080-regulator.c
pv88080-regulator.h
pv88090-regulator.c
pv88090-regulator.h
pwm-regulator.c
qcom-rpmh-regulator.c
qcom_rpm-regulator.c
qcom_smd-regulator.c
qcom_spmi-regulator.c
rc5t583-regulator.c
rk808-regulator.c
rn5t618-regulator.c
rt5033-regulator.c
s2mpa01.c
s2mps11.c
s5m8767.c regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled 2021-11-17 09:48:22 +01:00
sc2731-regulator.c
sky81452-regulator.c
slg51000-regulator.c
slg51000-regulator.h
stm32-booster.c
stm32-pwr.c
stm32-vrefbuf.c
stpmic1_regulator.c
stw481x-vmmc.c
sy8106a-regulator.c
sy8824x.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
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 regulator: uniphier: Add missing MODULE_DEVICE_TABLE 2021-07-14 16:53:10 +02:00
userspace-consumer.c
vctrl-regulator.c regulator: vctrl: Avoid lockdep warning in enable/disable ops 2021-09-15 09:47:29 +02:00
vexpress-regulator.c
virtual.c
wm831x-dcdc.c
wm831x-isink.c
wm831x-ldo.c
wm8350-regulator.c
wm8400-regulator.c
wm8994-regulator.c