regulator: core: Allow drivers to set simple linear voltage maps as data
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 9 May 2012 20:38:33 +0000 (21:38 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 12 May 2012 10:11:32 +0000 (11:11 +0100)
commitbca7bbfff37808d56355bbcf0ceec34f0cc6c85d
tree2ad595ab595a404b8082b01696fc152de95a10b2
parente843fc4616485bbd8b5a115f5bd4f73808656373
regulator: core: Allow drivers to set simple linear voltage maps as data

A lot of regulator hardware maps selectors on to voltages with a simple
linear mapping function

    selector = base + (selector * step size)

Provide off the shelf list_voltage() and map_voltage() operations which
use new min_uV and uV_step members in the regulator_desc to implement
this function.

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