]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: Add helpers for multiple linear ranges
authorMark Brown <broonie@linaro.org>
Tue, 2 Jul 2013 21:52:41 +0000 (22:52 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 15 Jul 2013 10:20:32 +0000 (11:20 +0100)
commit29a9ec599b86116c11eeb7af10f83c2ea32417dc
tree7427db70b59494e1d8e3f295123ab1fd2d53f663
parent07e109360660cc58aefd754a4369fe475b61e495
regulator: core: Add helpers for multiple linear ranges

Many regulators have several linear ranges of selector with different
step sizes, for example offering better resolution at lower voltages.
Provide regulator_{map,list}_voltage_linear_range() allowing these
regulators to use generic code. To do so a table of regulator_linear_range
structs needs to be pointed to from the descriptor.

This was inspired by similar code included in a driver submission from
Chao Xie and Yi Zhang at Marvell.

Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/core.c
include/linux/regulator/driver.h