Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a67f7e6b authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel



commit 4ca1e1d9 "regulator: Convert 88pm8607 to set_voltage_sel" accidentally
changed the value writing to vol_reg.
What we want is to write val instead of selector to vol_reg.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a81edbde
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ static int pm8607_set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
	val = (uint8_t)(selector << info->vol_shift);
	mask = (rdev->desc->n_voltages - 1)  << info->vol_shift;

	ret = pm860x_set_bits(info->i2c, info->vol_reg, mask, selector);
	ret = pm860x_set_bits(info->i2c, info->vol_reg, mask, val);
	if (ret)
		return ret;
	switch (info->desc.id) {