regulator: Add REGULATOR_LINEAR_RANGE macro

Add REGULATOR_LINEAR_RANGE macro and convert regulator drivers to use it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Axel Lin
2013-10-11 09:32:18 +08:00
committed by Mark Brown
parent e277e65680
commit 8828bae464
10 changed files with 46 additions and 51 deletions

View File

@@ -57,6 +57,15 @@ struct regulator_linear_range {
unsigned int uV_step;
};
/* Initialize struct regulator_linear_range */
#define REGULATOR_LINEAR_RANGE(_min_uV, _min_sel, _max_sel, _step_uV) \
{ \
.min_uV = _min_uV, \
.min_sel = _min_sel, \
.max_sel = _max_sel, \
.uV_step = _step_uV, \
}
/**
* struct regulator_ops - regulator operations.
*