From b3816d50439245d888798ee620da1e27cbf86c66 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 22 Dec 2012 13:31:19 +0800 Subject: regulator: twl: Convert twl[6030|4030]fixed_ops to regulator_list_voltage_linear Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/twl-regulator.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'drivers/regulator/twl-regulator.c') diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 74508cc62d67..b68df81b6f8f 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -616,18 +616,8 @@ static struct regulator_ops twl6030ldo_ops = { /*----------------------------------------------------------------------*/ -/* - * Fixed voltage LDOs don't have a VSEL field to update. - */ -static int twlfixed_list_voltage(struct regulator_dev *rdev, unsigned index) -{ - struct twlreg_info *info = rdev_get_drvdata(rdev); - - return info->min_mV * 1000; -} - static struct regulator_ops twl4030fixed_ops = { - .list_voltage = twlfixed_list_voltage, + .list_voltage = regulator_list_voltage_linear, .enable = twl4030reg_enable, .disable = twl4030reg_disable, @@ -639,7 +629,7 @@ static struct regulator_ops twl4030fixed_ops = { }; static struct regulator_ops twl6030fixed_ops = { - .list_voltage = twlfixed_list_voltage, + .list_voltage = regulator_list_voltage_linear, .enable = twl6030reg_enable, .disable = twl6030reg_disable, @@ -945,6 +935,7 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \ .ops = &operations, \ .type = REGULATOR_VOLTAGE, \ .owner = THIS_MODULE, \ + .min_uV = mVolts * 1000, \ .enable_time = turnon_delay, \ }, \ } -- cgit From 4813dd0efcfbf85bd79759fda50b9a6ad4e5ff9c Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 15 Feb 2013 22:23:01 +0800 Subject: regulator: twl: Remove VDD1_VSEL_table and VDD2_VSEL_table Since commit ba305e31 "regulator: twl: fix twl4030 support for smps regulators", VDD1_VSEL_table and VDD2_VSEL_table are not used any more. Remove them. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/twl-regulator.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/regulator/twl-regulator.c') diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index b68df81b6f8f..c9242988d010 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -441,12 +441,6 @@ static const u16 VSIM_VSEL_table[] = { static const u16 VDAC_VSEL_table[] = { 1200, 1300, 1800, 1800, }; -static const u16 VDD1_VSEL_table[] = { - 800, 1450, -}; -static const u16 VDD2_VSEL_table[] = { - 800, 1450, 1500, -}; static const u16 VIO_VSEL_table[] = { 1800, 1850, }; -- cgit From d1924519fe1dada0cfd9a228bf2ff1ea15840c84 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 16 Feb 2013 10:53:49 +0800 Subject: regulator: twl: Remove TWL6030_FIXED_RESOURCE TWL6030_FIXED_RESOURCE is not used now, remove it. TWL6030_FIXED_RESOURCE is not used since commit e76ab829cc "regulator: twl: Remove references to the twl4030 regulator" twl6030_fixed_resource is removed by commit 029dd3cef "regulator: twl: Remove another unused variable warning". Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/twl-regulator.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'drivers/regulator/twl-regulator.c') diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index c9242988d010..cb872bfd3442 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -934,19 +934,6 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \ }, \ } -#define TWL6030_FIXED_RESOURCE(label, offset, turnon_delay) \ -static struct twlreg_info TWLRES_INFO_##label = { \ - .base = offset, \ - .desc = { \ - .name = #label, \ - .id = TWL6030_REG_##label, \ - .ops = &twl6030_fixed_resource, \ - .type = REGULATOR_VOLTAGE, \ - .owner = THIS_MODULE, \ - .enable_time = turnon_delay, \ - }, \ - } - #define TWL6025_ADJUSTABLE_SMPS(label, offset) \ static const struct twlreg_info TWLSMPS_INFO_##label = { \ .base = offset, \ -- cgit