summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm831x-ldo.c
diff options
context:
space:
mode:
authorAxel Lin2013-10-11 03:32:18 +0200
committerMark Brown2013-10-11 13:49:16 +0200
commit8828bae464b129abed95b748263f1ab53bdc5755 (patch)
tree505148f6e9ed7a89a238cc8f1b3042e459f7c703 /drivers/regulator/wm831x-ldo.c
parentregulator: Remove max_uV from struct regulator_linear_range (diff)
downloadkernel-qcow2-linux-8828bae464b129abed95b748263f1ab53bdc5755.tar.gz
kernel-qcow2-linux-8828bae464b129abed95b748263f1ab53bdc5755.tar.xz
kernel-qcow2-linux-8828bae464b129abed95b748263f1ab53bdc5755.zip
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/wm831x-ldo.c')
-rw-r--r--drivers/regulator/wm831x-ldo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index a95814027b24..9111b651c353 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -63,8 +63,8 @@ static irqreturn_t wm831x_ldo_uv_irq(int irq, void *data)
*/
static const struct regulator_linear_range wm831x_gp_ldo_ranges[] = {
- { .min_uV = 900000, .min_sel = 0, .max_sel = 14, .uV_step = 50000 },
- { .min_uV = 1700000, .min_sel = 15, .max_sel = 31, .uV_step = 100000 },
+ REGULATOR_LINEAR_RANGE(900000, 0, 14, 50000),
+ REGULATOR_LINEAR_RANGE(1700000, 15, 31, 100000),
};
static int wm831x_gp_ldo_set_suspend_voltage(struct regulator_dev *rdev,
@@ -330,8 +330,8 @@ static struct platform_driver wm831x_gp_ldo_driver = {
*/
static const struct regulator_linear_range wm831x_aldo_ranges[] = {
- { .min_uV = 1000000, .min_sel = 0, .max_sel = 12, .uV_step = 50000 },
- { .min_uV = 1700000, .min_sel = 13, .max_sel = 31, .uV_step = 100000 },
+ REGULATOR_LINEAR_RANGE(1000000, 0, 12, 50000),
+ REGULATOR_LINEAR_RANGE(1700000, 13, 31, 100000),
};
static int wm831x_aldo_set_suspend_voltage(struct regulator_dev *rdev,