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

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

regulator: tps6524x: Fix get_voltage_sel for fixed voltage



get_voltage_sel() should return selector rather than voltage.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 6b57c015
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -482,7 +482,7 @@ static int get_voltage_sel(struct regulator_dev *rdev)
	info	= &supply_info[rdev_get_id(rdev)];
	info	= &supply_info[rdev_get_id(rdev)];


	if (info->flags & FIXED_VOLTAGE)
	if (info->flags & FIXED_VOLTAGE)
		return info->fixed_voltage;
		return 0;


	ret = read_field(hw, &info->voltage);
	ret = read_field(hw, &info->voltage);
	if (ret < 0)
	if (ret < 0)