Skip to content

Commit 47a0925

Browse files
SpieringsAEbroonie
authored andcommitted
regulator: bd718x7: Fix voltages scaled by resistor divider
The .min_sel and .max_sel fields remained uninitialized in the new linear_range, causing an error further down the line. Copy the old values of these fields to the new one as they represent the range of register values, which does not change. Fixes: d2ad981 ("regulator: bd718x7: Support external connection to scale voltages") Signed-off-by: Maud Spierings <[email protected]> Reviewed-by: Matti Vaittinen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent dcb6fa3 commit 47a0925

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/regulator/bd718x7-regulator.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,6 +1613,8 @@ static int setup_feedback_loop(struct device *dev, struct device_node *np,
16131613
step /= r1;
16141614

16151615
new[j].min = min;
1616+
new[j].min_sel = desc->linear_ranges[j].min_sel;
1617+
new[j].max_sel = desc->linear_ranges[j].max_sel;
16161618
new[j].step = step;
16171619

16181620
dev_dbg(dev, "%s: old range min %d, step %d\n",

0 commit comments

Comments
 (0)