linux/drivers/regulator
Kamal Wadhwa ef3e9c91ed
regulator: pm8008: fix probe failure due to negative voltage selector
In the current design, the `pm8008_regulator_get_voltage_sel()` callback
can return a negative value if the raw voltage value is read as 0 uV from
the PMIC HW register. This can cause the probe to fail when the
`machine_constraints_voltage()` check is called during the regulator
registration flow.

Fix this by using the helper `regulator_map_voltage_linear_range()` to
convert the raw value to a voltage selector inside the mentioned get
voltage selector function. This ensures that the value returned is always
within the defined range.

Signed-off-by: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
Message-ID: <20250823-pm8008-negitive-selector-v1-1-52b026a4b5e8@quicinc.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-24 22:41:04 +01:00
..
88pg86x.c
88pm800-regulator.c
88pm886-regulator.c
88pm8607.c
Kconfig regulator: Kconfig: Fix spelling mistake "regualtor" -> "regulator" 2025-07-24 12:39:05 +01:00
Makefile regulator: rpi-panel-v2: Add regulator for 7" Raspberry Pi 720x1280 2025-06-09 13:06:29 +01:00
aat2870-regulator.c
ab8500-ext.c
ab8500.c
act8865-regulator.c regulator: act8865-regulator: switch psy_cfg from of_node to fwnode 2025-06-22 01:39:51 +02:00
act8945a-regulator.c
ad5398.c
adp5055-regulator.c
anatop-regulator.c
arizona-ldo1.c
arizona-micsupp.c
as3711-regulator.c
as3722-regulator.c
atc260x-regulator.c
aw37503-regulator.c
axp20x-regulator.c
bcm590xx-regulator.c regulator: bcm590xx: Add support for BCM59054 regulators 2025-05-22 10:57:46 +01:00
bd718x7-regulator.c regulator: bd718x7: Clarify comment by moving it 2025-06-11 12:46:05 +01:00
bd9571mwv-regulator.c
bd9576-regulator.c
bd71815-regulator.c
bd71828-regulator.c
bd96801-regulator.c
core.c regulator: core: correct convergence check in regulator_set_voltage() 2025-07-29 14:56:39 +01:00
cpcap-regulator.c
cros-ec-regulator.c
da903x-regulator.c
da9052-regulator.c
da9055-regulator.c
da9062-regulator.c
da9063-regulator.c
da9121-regulator.c
da9121-regulator.h
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
event.c
fan53555.c regulator: fan53555: add enable_time support and soft-start times 2025-06-16 13:26:23 +01:00
fan53880.c
fixed-helper.c
fixed.c
gpio-regulator.c regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods 2025-07-03 12:22:35 +01:00
helpers.c
hi655x-regulator.c
hi6421-regulator.c
hi6421v530-regulator.c
hi6421v600-regulator.c
internal.h
irq_helpers.c
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
max5970-regulator.c
max8649.c
max8660.c
max8893.c
max8907-regulator.c
max8925-regulator.c
max8952.c
max8973-regulator.c
max8997-regulator.c
max8998.c
max14577-regulator.c regulator: max14577: Add error check for max14577_read_reg() 2025-05-26 14:01:29 +01:00
max20086-regulator.c regulator: max20086: Fix refcount leak in max20086_parse_regulators_dt() 2025-06-08 23:29:48 +01:00
max20411-regulator.c
max77503-regulator.c
max77541-regulator.c
max77620-regulator.c
max77650-regulator.c
max77686-regulator.c
max77693-regulator.c
max77802-regulator.c
max77826-regulator.c
max77857-regulator.c
mc13xxx-regulator-core.c
mc13xxx.h
mc13783-regulator.c
mc13892-regulator.c
mcp16502.c
mp886x.c regulator: mp886x: Fix ID table driver_data 2025-06-30 16:06:40 +01:00
mp5416.c
mp8859.c
mpq7920.c
mpq7920.h
mt6311-regulator.c
mt6311-regulator.h
mt6315-regulator.c
mt6323-regulator.c
mt6331-regulator.c
mt6332-regulator.c
mt6357-regulator.c
mt6358-regulator.c
mt6359-regulator.c
mt6360-regulator.c
mt6370-regulator.c regulator: mt6370: Fix spelling mistake in mt6370_regualtor_register 2025-07-24 18:04:38 +01:00
mt6380-regulator.c
mt6397-regulator.c
mtk-dvfsrc-regulator.c regulator: mtk-dvfsrc: Add support for MediaTek MT8196 DVFSRC 2025-06-23 13:12:31 +01:00
of_regulator.c
palmas-regulator.c
pbias-regulator.c
pca9450-regulator.c regulator: pca9450: Use devm_register_sys_off_handler 2025-08-18 13:09:51 +01:00
pcap-regulator.c
pf8x00-regulator.c
pf9453-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-labibb-regulator.c
qcom-pm8008-regulator.c regulator: pm8008: fix probe failure due to negative voltage selector 2025-08-24 22:41:04 +01:00
qcom-refgen-regulator.c
qcom-rpmh-regulator.c regulator: qcom-rpmh: add support for pm7550 regulators 2025-07-13 22:37:09 +01:00
qcom_rpm-regulator.c
qcom_smd-regulator.c
qcom_spmi-regulator.c
qcom_usb_vbus-regulator.c
raa215300.c
rc5t583-regulator.c
regnl.h
renesas-usb-vbus-regulator.c
rk808-regulator.c
rn5t618-regulator.c
rohm-regulator.c
rpi-panel-attiny-regulator.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
rpi-panel-v2-regulator.c regulator: rpi-panel-v2: Add shutdown hook 2025-06-17 12:50:30 +01:00
rt4801-regulator.c
rt4803.c
rt4831-regulator.c
rt5033-regulator.c
rt5120-regulator.c
rt5190a-regulator.c
rt5739.c regulator: rt5739: Enable REGCACHE_MAPLE 2025-06-30 12:15:38 +01:00
rt5759-regulator.c
rt6160-regulator.c regulator: rt6160: Add rt6166 vout min_uV setting for compatible 2025-07-16 11:15:26 +01:00
rt6190-regulator.c
rt6245-regulator.c
rtmv20-regulator.c
rtq2134-regulator.c
rtq2208-regulator.c
rtq6752-regulator.c
s2mpa01.c
s2mps11.c
s5m8767.c
sc2731-regulator.c
scmi-regulator.c
sky81452-regulator.c
slg51000-regulator.c
slg51000-regulator.h
stm32-booster.c
stm32-pwr.c
stm32-vrefbuf.c regulator: stm32-vrefbuf: Remove redundant pm_runtime_mark_last_busy() calls 2025-07-04 13:09:53 +01:00
stpmic1_regulator.c
stw481x-vmmc.c
sun20i-regulator.c
sy7636a-regulator.c
sy8106a-regulator.c
sy8824x.c regulator: sy8824x: Fix ID table driver_data 2025-06-30 16:06:39 +01:00
sy8827n.c regulator: sy8827n: make enable gpio NONEXCLUSIVE 2025-07-07 23:32:39 +01:00
ti-abb-regulator.c
tps6105x-regulator.c
tps6286x-regulator.c regulator: tps6286x-regulator: Fix a copy & paste error 2025-07-14 14:44:05 +01:00
tps6287x-regulator.c regulator: tps6287x-regulator: Enable REGCACHE_MAPLE 2025-06-30 12:15:39 +01:00
tps6507x-regulator.c
tps6524x-regulator.c
tps6586x-regulator.c
tps6594-regulator.c regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators 2025-07-10 12:10:04 +01:00
tps51632-regulator.c
tps62360-regulator.c
tps65023-regulator.c
tps65086-regulator.c
tps65090-regulator.c
tps65132-regulator.c
tps65217-regulator.c
tps65218-regulator.c
tps65219-regulator.c regulator: tps65219: regulator: tps65219: Fix error codes in probe() 2025-08-19 16:51:03 +01:00
tps65910-regulator.c
tps65912-regulator.c
tps68470-regulator.c
twl-regulator.c
twl6030-regulator.c
uniphier-regulator.c
userspace-consumer.c
vctrl-regulator.c
vexpress-regulator.c
virtual.c
vqmmc-ipq4019-regulator.c
wm831x-dcdc.c
wm831x-isink.c
wm831x-ldo.c
wm8350-regulator.c
wm8400-regulator.c
wm8994-regulator.c