From e277e656804c85a0729d4fd8cdd3c8ab3e6b3b86 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 11 Oct 2013 09:30:24 +0800 Subject: regulator: Remove max_uV from struct regulator_linear_range linear ranges means each range has linear voltage settings. So we can calculate max_uV for each linear range in regulator core rather than set the max_uV field in drivers. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/as3711-regulator.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'drivers/regulator/as3711-regulator.c') diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c index 8406cd745da2..d0a97e5ea431 100644 --- a/drivers/regulator/as3711-regulator.c +++ b/drivers/regulator/as3711-regulator.c @@ -117,26 +117,23 @@ static struct regulator_ops as3711_dldo_ops = { }; static const struct regulator_linear_range as3711_sd_ranges[] = { - { .min_uV = 612500, .max_uV = 1400000, - .min_sel = 0x1, .max_sel = 0x40, .uV_step = 12500 }, - { .min_uV = 1425000, .max_uV = 2600000, - .min_sel = 0x41, .max_sel = 0x70, .uV_step = 25000 }, - { .min_uV = 2650000, .max_uV = 3350000, - .min_sel = 0x71, .max_sel = 0x7f, .uV_step = 50000 }, + { .min_uV = 612500, .min_sel = 0x1, .max_sel = 0x40, .uV_step = 12500 }, + { .min_uV = 1425000, .min_sel = 0x41, .max_sel = 0x70, + .uV_step = 25000 }, + { .min_uV = 2650000, .min_sel = 0x71, .max_sel = 0x7f, + .uV_step = 50000 }, }; static const struct regulator_linear_range as3711_aldo_ranges[] = { - { .min_uV = 1200000, .max_uV = 1950000, - .min_sel = 0, .max_sel = 0xf, .uV_step = 50000 }, - { .min_uV = 1800000, .max_uV = 3300000, - .min_sel = 0x10, .max_sel = 0x1f, .uV_step = 100000 }, + { .min_uV = 1200000, .min_sel = 0, .max_sel = 0xf, .uV_step = 50000 }, + { .min_uV = 1800000, .min_sel = 0x10, .max_sel = 0x1f, + .uV_step = 100000 }, }; static const struct regulator_linear_range as3711_dldo_ranges[] = { - { .min_uV = 900000, .max_uV = 1700000, - .min_sel = 0, .max_sel = 0x10, .uV_step = 50000 }, - { .min_uV = 1750000, .max_uV = 3300000, - .min_sel = 0x20, .max_sel = 0x3f, .uV_step = 50000 }, + { .min_uV = 900000, .min_sel = 0, .max_sel = 0x10, .uV_step = 50000 }, + { .min_uV = 1750000, .min_sel = 0x20, .max_sel = 0x3f, + .uV_step = 50000 }, }; #define AS3711_REG(_id, _en_reg, _en_bit, _vmask, _vshift, _min_uV, _max_uV, _sfx) \ -- cgit v1.2.1