summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps65217-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-10-11 05:32:18 +0400
committerMark Brown <broonie@linaro.org>2013-10-11 15:49:16 +0400
commit8828bae464b129abed95b748263f1ab53bdc5755 (patch)
tree505148f6e9ed7a89a238cc8f1b3042e459f7c703 /drivers/regulator/tps65217-regulator.c
parente277e656804c85a0729d4fd8cdd3c8ab3e6b3b86 (diff)
downloadlinux-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/tps65217-regulator.c')
-rw-r--r--drivers/regulator/tps65217-regulator.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index 484866f43681..bbc7277fa097 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -52,17 +52,17 @@ static const unsigned int LDO1_VSEL_table[] = {
};
static const struct regulator_linear_range tps65217_uv1_ranges[] = {
- { .min_uV = 900000, .min_sel = 0, .max_sel = 24, .uV_step = 25000 },
- { .min_uV = 1550000, .min_sel = 25, .max_sel = 30, .uV_step = 50000 },
- { .min_uV = 1850000, .min_sel = 31, .max_sel = 52, .uV_step = 50000 },
- { .min_uV = 3000000, .min_sel = 53, .max_sel = 55, .uV_step = 100000 },
- { .min_uV = 3300000, .min_sel = 56, .max_sel = 62, .uV_step = 0 },
+ REGULATOR_LINEAR_RANGE(900000, 0, 24, 25000),
+ REGULATOR_LINEAR_RANGE(1550000, 25, 30, 50000),
+ REGULATOR_LINEAR_RANGE(1850000, 31, 52, 50000),
+ REGULATOR_LINEAR_RANGE(3000000, 53, 55, 100000),
+ REGULATOR_LINEAR_RANGE(3300000, 56, 62, 0),
};
static const struct regulator_linear_range tps65217_uv2_ranges[] = {
- { .min_uV = 1500000, .min_sel = 0, .max_sel = 8, .uV_step = 50000 },
- { .min_uV = 2000000, .min_sel = 9, .max_sel = 13, .uV_step = 100000 },
- { .min_uV = 2450000, .min_sel = 14, .max_sel = 31, .uV_step = 50000 },
+ REGULATOR_LINEAR_RANGE(1500000, 0, 8, 50000),
+ REGULATOR_LINEAR_RANGE(2000000, 9, 13, 100000),
+ REGULATOR_LINEAR_RANGE(2450000, 14, 31, 50000),
};
static int tps65217_pmic_enable(struct regulator_dev *dev)