diff options
author | Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> | 2019-06-14 00:25:30 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-17 17:49:48 +0300 |
commit | 86f4ff7a0c0cd8e391ffa4dd0edb82ae0eedcc9e (patch) | |
tree | 56b684b51d9a3606bb32c5dbe40c68dfffe2af2a /drivers/regulator | |
parent | fd742eaab827b47c5f2de6c1811a17075608da60 (diff) | |
download | linux-86f4ff7a0c0cd8e391ffa4dd0edb82ae0eedcc9e.tar.xz |
regulator: qcom_spmi: enable linear range info
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/qcom_spmi-regulator.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 53a61fb65642..42c429d50743 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1744,6 +1744,7 @@ MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match); static int qcom_spmi_regulator_probe(struct platform_device *pdev) { const struct spmi_regulator_data *reg; + const struct spmi_voltage_range *range; const struct of_device_id *match; struct regulator_config config = { }; struct regulator_dev *rdev; @@ -1833,6 +1834,12 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev) } } + if (vreg->set_points->count == 1) { + /* since there is only one range */ + range = vreg->set_points->range; + vreg->desc.uV_step = range->step_uV; + } + config.dev = dev; config.driver_data = vreg; config.regmap = regmap; |