regulator: core: Add helpers for multiple linear ranges
authorMark Brown <broonie@linaro.org>
Tue, 2 Jul 2013 21:52:41 +0000 (22:52 +0100)
committerDan Willemsen <dwillemsen@nvidia.com>
Fri, 27 Sep 2013 02:46:12 +0000 (19:46 -0700)
commitb6b33762d779750edcc9eae5522dd3b4461b580a
treedb1f4ad6ad0cf2bcfa3e7396f4646fec30ed3119
parent2e24c4acc8e419452fd48b42091500ba4dc004bf
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>
(cherry picked from commit 94d33c02c7186b69849c292e1216a08ad1c0d99d)

Change-Id: Iae2a01e853aaf4c43e0be26713106b93c6be82b4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/276236
drivers/regulator/core.c
include/linux/regulator/driver.h