Re: [PATCH 6/8] regulator: core: Propagate voltage changes to supply regulators

From: Mark Brown
Date: Fri Oct 16 2015 - 12:55:30 EST


On Tue, Oct 13, 2015 at 12:45:29PM +0200, Sascha Hauer wrote:

> + best_supply_uV = regulator_get_voltage_floor(regulator, min_uV);
> + if (best_supply_uV < 0) {
> + ret = best_supply_uV;
> + goto out2;
> + }

Now I look at the user here this is just the map voltage operation. We
could even refactor...

> ret = _regulator_do_set_voltage(rdev, min_uV, max_uV);
> if (ret < 0)
> goto out2;

...do_set_voltage() so that we only do the mapping once, though that
gets tricky as we still support devices that don't have mapping
configured :/ .

Otherwise this looks good.

Attachment: signature.asc
Description: PGP signature