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

Commit aebe4958 authored by Mark Brown's avatar Mark Brown
Browse files

regulator: Don't report zero volts for the fixed voltage regulator



If we don't know what voltage the regulator is set to return an error
rather than reporting zero volts.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent c1fc1480
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -80,7 +80,10 @@ static int fixed_voltage_get_voltage(struct regulator_dev *dev)
{
	struct fixed_voltage_data *data = rdev_get_drvdata(dev);

	if (data->microvolts)
		return data->microvolts;
	else
		return -EINVAL;
}

static int fixed_voltage_list_voltage(struct regulator_dev *dev,