Re: [PATCH RFC v2] regulator: core: Add regulator_map_voltage_ascend() API

Mark Brown
2013-04-18T11:15:21Z

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]