regulator: core: Allow regulators to provide a voltage to selector mapping
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 9 May 2012 20:16:06 +0000 (21:16 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 12 May 2012 10:11:23 +0000 (11:11 +0100)
commite843fc4616485bbd8b5a115f5bd4f73808656373
treef0e56438d078de5cd1adc8f839580fd14b60846c
parent5949a7e9ab2db04edaeee7c368eb4c99131f4629
regulator: core: Allow regulators to provide a voltage to selector mapping

In order to allow more drivers to factor things out into data allow
drivers to provide a mapping function to convert voltages into selectors.
This allows any driver to use set_voltage_sel(). The existing mapping
based on iterating over list_voltage() is provided as an operation which
can be assigned to the new map_voltage() function though for ease of
transition it is treated as the default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
drivers/regulator/core.c
include/linux/regulator/driver.h