Commit 9a12eb70 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Mark Brown

regulator: qcom-labibb: Switch voltage ops from linear_range to linear

The LAB and IBB regulator have just one range and it is useless
to use linear_range ops, as these are used to express multiple
linear ranges.

Switch list_voltage and map_voltage callbacks to *_linear instead.
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Link: https://lore.kernel.org/r/20210119174421.226541-2-angelogioacchino.delregno@somainline.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f35f6d8c
...@@ -59,8 +59,8 @@ static const struct regulator_ops qcom_labibb_ops = { ...@@ -59,8 +59,8 @@ static const struct regulator_ops qcom_labibb_ops = {
.is_enabled = regulator_is_enabled_regmap, .is_enabled = regulator_is_enabled_regmap,
.set_voltage_sel = regulator_set_voltage_sel_regmap, .set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap, .get_voltage_sel = regulator_get_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear_range, .list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear_range, .map_voltage = regulator_map_voltage_linear,
}; };
static const struct regulator_desc pmi8998_lab_desc = { static const struct regulator_desc pmi8998_lab_desc = {
...@@ -76,10 +76,8 @@ static const struct regulator_desc pmi8998_lab_desc = { ...@@ -76,10 +76,8 @@ static const struct regulator_desc pmi8998_lab_desc = {
.off_on_delay = LABIBB_OFF_ON_DELAY, .off_on_delay = LABIBB_OFF_ON_DELAY,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.type = REGULATOR_VOLTAGE, .type = REGULATOR_VOLTAGE,
.linear_ranges = (struct linear_range[]) { .min_uV = 4600000,
REGULATOR_LINEAR_RANGE(4600000, 0, 15, 100000), .uV_step = 100000,
},
.n_linear_ranges = 1,
.n_voltages = 16, .n_voltages = 16,
.ops = &qcom_labibb_ops, .ops = &qcom_labibb_ops,
}; };
...@@ -97,10 +95,8 @@ static const struct regulator_desc pmi8998_ibb_desc = { ...@@ -97,10 +95,8 @@ static const struct regulator_desc pmi8998_ibb_desc = {
.off_on_delay = LABIBB_OFF_ON_DELAY, .off_on_delay = LABIBB_OFF_ON_DELAY,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.type = REGULATOR_VOLTAGE, .type = REGULATOR_VOLTAGE,
.linear_ranges = (struct linear_range[]) { .min_uV = 1400000,
REGULATOR_LINEAR_RANGE(1400000, 0, 63, 100000), .uV_step = 100000,
},
.n_linear_ranges = 1,
.n_voltages = 64, .n_voltages = 64,
.ops = &qcom_labibb_ops, .ops = &qcom_labibb_ops,
}; };
......
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