linux-stable/drivers/regulator
Krzysztof Kozlowski 56b930d017 regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled
commit b16bef60a9 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-26 11:40:23 +01:00
..
88pm800.c
88pm8607.c
aat2870-regulator.c
ab3100.c
ab8500-ext.c
ab8500.c regulator: ab8500: Remove AB8505 USB regulator 2020-01-09 10:17:58 +01:00
act8865-regulator.c regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2019-04-05 22:31:39 +02:00
act8945a-regulator.c
ad5398.c
anatop-regulator.c
arizona-ldo1.c
arizona-micsupp.c
as3711-regulator.c
as3722-regulator.c
axp20x-regulator.c regulator: axp20x: Fix reference cout leak 2021-03-03 18:22:45 +01:00
bcm590xx-regulator.c
bd9571mwv-regulator.c regulator: bd9571mwv: Fix AVS and DVFS voltage range 2021-04-16 11:57:49 +02:00
core.c regulator: core: resolve supply for boot-on/always-on regulators 2021-06-16 11:53:03 +02:00
cpcap-regulator.c regulator: Don't return or expect -errno from of_map_mode() 2018-08-03 07:50:40 +02:00
da903x.c
da9052-regulator.c regulator: da9052: Ensure enough delay time for .set_voltage_time_sel 2021-07-20 16:17:32 +02:00
da9055-regulator.c
da9062-regulator.c
da9063-regulator.c regulator: da9063: Return an error code on probe failure 2017-08-30 16:05:46 +01:00
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 regulator: fan53555: fix I2C device ids 2017-08-21 16:57:53 +01:00
fixed-helper.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fixed.c
gpio-regulator.c regulator: gpio: Fix some error handling paths in 'gpio_regulator_probe()' 2018-05-30 07:52:32 +02:00
helpers.c
hi655x-regulator.c
hi6421-regulator.c
hi6421v530-regulator.c
internal.h
isl6271a-regulator.c
isl9305.c
Kconfig - New Drivers 2017-09-07 13:51:13 -07:00
lm363x-regulator.c regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg 2019-10-05 12:47:44 +02:00
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:46:26 +01:00
ltc3589.c regulator: ltc3589: constify i2c_device_id 2017-08-21 18:10:42 +01:00
ltc3676.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
max1586.c regulator: Convert to using %pOF instead of full_name 2017-07-19 11:56:01 +01:00
max8649.c
max8660.c
max8907-regulator.c regulator: max8907: Fix the usage of uninitialized variable in max8907_regulator_probe() 2019-12-31 12:36:58 +01:00
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:53:04 +02:00
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 regulator: mt6380: Add support for MT6380 2017-08-15 12:50:48 +01:00
mt6397-regulator.c
of_regulator.c regulator: Don't return or expect -errno from of_map_mode() 2018-08-03 07:50:40 +02:00
palmas-regulator.c drivers/regulator: fix a missing check of return value 2019-12-05 15:37:36 +01:00
pbias-regulator.c
pcap-regulator.c
pcf50633-regulator.c
pfuze100-regulator.c regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized 2019-11-10 11:25:05 +01:00
pv88060-regulator.c regulator: pv88060: Fix array out-of-bounds access 2020-01-27 14:46:20 +01:00
pv88060-regulator.h
pv88080-regulator.c regulator: pv88080: Fix array out-of-bounds access 2020-01-27 14:46:20 +01:00
pv88080-regulator.h
pv88090-regulator.c regulator: pv88090: Fix array out-of-bounds access 2020-01-27 14:46:20 +01:00
pv88090-regulator.h regulator: pv88090: Exception handling for out of bounds 2017-08-30 16:12:17 +01:00
pwm-regulator.c regulator: pwm-regulator: Remove unneeded gpiod NULL check 2017-07-24 16:26:35 +01:00
qcom_rpm-regulator.c regulator: qcom_rpm-regulator: add NULL check on of_match_device() return value 2017-07-07 13:42:03 +01:00
qcom_smd-regulator.c regulator: qcom_smd: add NULL check on of_match_device() return value 2017-07-07 13:42:07 +01:00
qcom_spmi-regulator.c
rc5t583-regulator.c
rk808-regulator.c regulator: rk808: Lower log level on optional GPIOs being not available 2020-02-28 16:35:59 +01:00
rn5t618-regulator.c regulator: rn5t618: fix module aliases 2020-01-12 12:11:58 +01:00
rt5033-regulator.c
s2mpa01.c regulator: s2mpa01: Fix step values for some LDOs 2019-03-23 14:35:19 +01:00
s2mps11.c regulator: s2mps11: Fix buck7 and buck8 wrong voltages 2019-07-31 07:28:36 +02:00
s5m8767.c regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled 2021-11-26 11:40:23 +01:00
sky81452-regulator.c
stm32-vrefbuf.c regulator: stm32-vrefbuf: fix check on ready flag 2018-03-15 10:54:28 +01:00
stw481x-vmmc.c
ti-abb-regulator.c regulator: ti-abb: Fix array out of bound read access on the first transition 2020-11-24 13:05:49 +01:00
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:46:26 +01:00
tps65090-regulator.c
tps65132-regulator.c
tps65217-regulator.c
tps65218-regulator.c
tps65910-regulator.c regulator: tps65910: fix a missing check of return value 2019-12-05 15:37:47 +01:00
tps65912-regulator.c
tps80031-regulator.c
twl-regulator.c regulator: Don't return or expect -errno from of_map_mode() 2018-08-03 07:50:40 +02:00
twl6030-regulator.c mfd: twl: Move header file out of I2C realm 2017-09-04 14:41:02 +01:00
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:46:23 +01:00
wm831x-isink.c
wm831x-ldo.c
wm8350-regulator.c
wm8400-regulator.c
wm8994-regulator.c