Files
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 <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2025-08-24 22:41:04 +01:00
..
2025-02-28 16:33:32 +00:00
…
…