Re: regulator voltage aggregation

From: Mark Brown
Date: Tue Aug 17 2010 - 14:22:57 EST


On Tue, Aug 17, 2010 at 07:28:06PM +0100, Alan Cox wrote:
> O> int regulator_set_optimum_voltage(struct regulator *regulator,
> > int min_uV, int max_uV);

> Pedantic hat on - how can it be optimum if its a range ? (and an
> adjective but that is really pedantic) ;))

> Surely it's not the optimal value, it's the range at which it works at
> all you are defining (between off, and escaping smoke).

> set_voltage_range() sounds rather more natural to me.

The regulator API always specifies voltages in ranges, picking the
lowest possible voltage from the range.

One reason for this is that it allows us to finesse the mismatches
between the fixed steps that regulators offer and the requirements of
consumers - we don't needlessly fail to set a voltage due to a few
milivolts difference that the consumer doesn't care about. The other
reason is that it maps very well onto a lot of applications which do
have fairly wide acceptable ranges. For things like DVFS lowering the
frequency will typically reduce the minimum voltage required by the
device but will not affect the maximum voltage it can tolerate so we
allow the driver to specify the full range it can operate at and then
deliver the maximum power saving we can within the constraints of the
system.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/