On Thu, Apr 18, 2013 at 10:34:49AM +0800, Axel Lin wrote: > A lot of regulator hardware has ascendant voltage list. > This patch adds regulator_map_voltage_ascend() and export it. > > Drivers that have ascendant voltage list can use this as their map_voltage() > operation, this is more efficient than default regulator_map_voltage_iterate() > function.
I've applied this since it's a good API to have and it'll let people build drivers on it. It does seem like if we know the list is sorted we ought to be able to take advantage of that to do better than a linear scan. Not sure it's worth bothering though as these tend not to have that many values to map.
signature.asc
Description: Digital signature