diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-10-11 05:32:18 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-11 15:49:16 +0400 |
commit | 8828bae464b129abed95b748263f1ab53bdc5755 (patch) | |
tree | 505148f6e9ed7a89a238cc8f1b3042e459f7c703 /drivers/regulator/88pm800.c | |
parent | e277e656804c85a0729d4fd8cdd3c8ab3e6b3b86 (diff) | |
download | linux-8828bae464b129abed95b748263f1ab53bdc5755.tar.xz |
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>
Diffstat (limited to 'drivers/regulator/88pm800.c')
-rw-r--r-- | drivers/regulator/88pm800.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/regulator/88pm800.c b/drivers/regulator/88pm800.c index 22ba4c4280ee..d333f7eac106 100644 --- a/drivers/regulator/88pm800.c +++ b/drivers/regulator/88pm800.c @@ -141,16 +141,14 @@ struct pm800_regulators { /* Ranges are sorted in ascending order. */ static const struct regulator_linear_range buck1_volt_range[] = { - { .min_uV = 600000, .min_sel = 0, .max_sel = 0x4f, .uV_step = 12500 }, - { .min_uV = 1600000, .min_sel = 0x50, .max_sel = 0x54, - .uV_step = 50000 }, + REGULATOR_LINEAR_RANGE(600000, 0, 0x4f, 12500), + REGULATOR_LINEAR_RANGE(1600000, 0x50, 0x54, 50000), }; /* BUCK 2~5 have same ranges. */ static const struct regulator_linear_range buck2_5_volt_range[] = { - { .min_uV = 600000, .min_sel = 0, .max_sel = 0x4f, .uV_step = 12500 }, - { .min_uV = 1600000, .min_sel = 0x50, .max_sel = 0x72, - .uV_step = 50000 }, + REGULATOR_LINEAR_RANGE(600000, 0, 0x4f, 12500), + REGULATOR_LINEAR_RANGE(1600000, 0x50, 0x72, 50000), }; static const unsigned int ldo1_volt_table[] = { |