diff options
author | Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com> | 2025-08-23 01:56:39 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-08-24 22:41:04 +0100 |
commit | ef3e9c91ed87f13dba877a20569f4a0accf0612c (patch) | |
tree | faa181785e586c023a1ab4f00f7d9262628747fa /drivers/fpga/zynq-fpga.c | |
parent | 1b237f190eb3d36f52dffe07a40b5eb210280e00 (diff) |
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>
Diffstat (limited to 'drivers/fpga/zynq-fpga.c')
0 files changed, 0 insertions, 0 deletions