Skip to content

Commit 86f4ff7

Browse files
ldtsbroonie
authored andcommitted
regulator: qcom_spmi: enable linear range info
Signed-off-by: Jorge Ramirez-Ortiz <[email protected]> Signed-off-by: Jeffrey Hugo <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent fd742ea commit 86f4ff7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/regulator/qcom_spmi-regulator.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,7 @@ MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match);
17441744
static int qcom_spmi_regulator_probe(struct platform_device *pdev)
17451745
{
17461746
const struct spmi_regulator_data *reg;
1747+
const struct spmi_voltage_range *range;
17471748
const struct of_device_id *match;
17481749
struct regulator_config config = { };
17491750
struct regulator_dev *rdev;
@@ -1833,6 +1834,12 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev)
18331834
}
18341835
}
18351836

1837+
if (vreg->set_points->count == 1) {
1838+
/* since there is only one range */
1839+
range = vreg->set_points->range;
1840+
vreg->desc.uV_step = range->step_uV;
1841+
}
1842+
18361843
config.dev = dev;
18371844
config.driver_data = vreg;
18381845
config.regmap = regmap;

0 commit comments

Comments
 (0)