Commit 86f4ff7a authored by Jorge Ramirez-Ortiz's avatar Jorge Ramirez-Ortiz Committed by Mark Brown

regulator: qcom_spmi: enable linear range info

Signed-off-by: default avatarJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: default avatarJeffrey Hugo <jeffrey.l.hugo@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fd742eaa
...@@ -1744,6 +1744,7 @@ MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match); ...@@ -1744,6 +1744,7 @@ MODULE_DEVICE_TABLE(of, qcom_spmi_regulator_match);
static int qcom_spmi_regulator_probe(struct platform_device *pdev) static int qcom_spmi_regulator_probe(struct platform_device *pdev)
{ {
const struct spmi_regulator_data *reg; const struct spmi_regulator_data *reg;
const struct spmi_voltage_range *range;
const struct of_device_id *match; const struct of_device_id *match;
struct regulator_config config = { }; struct regulator_config config = { };
struct regulator_dev *rdev; struct regulator_dev *rdev;
...@@ -1833,6 +1834,12 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev) ...@@ -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.dev = dev;
config.driver_data = vreg; config.driver_data = vreg;
config.regmap = regmap; config.regmap = regmap;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment