aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-07-03 22:46:34 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-04 07:38:37 -0400
commitfca53d862dcbddaa9db017b70a64392da8c20bce (patch)
treedd5adacc87bfcbe3f94b29437158cc26bab8a3a1 /drivers/regulator
parent4b7c948f558bf1d51aa25a6f621056c0acf45228 (diff)
regulator: twl: Set enable enable_time in regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/twl-regulator.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index ca308cb8e676..8f0bd56c2118 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -43,9 +43,6 @@ struct twlreg_info {
43 u8 table_len; 43 u8 table_len;
44 const u16 *table; 44 const u16 *table;
45 45
46 /* regulator specific turn-on delay */
47 u16 delay;
48
49 /* State REMAP default configuration */ 46 /* State REMAP default configuration */
50 u8 remap; 47 u8 remap;
51 48
@@ -223,20 +220,6 @@ static int twl6030reg_enable(struct regulator_dev *rdev)
223 return ret; 220 return ret;
224} 221}
225 222
226static int twl4030reg_enable_time(struct regulator_dev *rdev)
227{
228 struct twlreg_info *info = rdev_get_drvdata(rdev);
229
230 return info->delay;
231}
232
233static int twl6030reg_enable_time(struct regulator_dev *rdev)
234{
235 struct twlreg_info *info = rdev_get_drvdata(rdev);
236
237 return info->delay;
238}
239
240static int twl4030reg_disable(struct regulator_dev *rdev) 223static int twl4030reg_disable(struct regulator_dev *rdev)
241{ 224{
242 struct twlreg_info *info = rdev_get_drvdata(rdev); 225 struct twlreg_info *info = rdev_get_drvdata(rdev);
@@ -508,7 +491,6 @@ static struct regulator_ops twl4030ldo_ops = {
508 .enable = twl4030reg_enable, 491 .enable = twl4030reg_enable,
509 .disable = twl4030reg_disable, 492 .disable = twl4030reg_disable,
510 .is_enabled = twl4030reg_is_enabled, 493 .is_enabled = twl4030reg_is_enabled,
511 .enable_time = twl4030reg_enable_time,
512 494
513 .set_mode = twl4030reg_set_mode, 495 .set_mode = twl4030reg_set_mode,
514 496
@@ -622,7 +604,6 @@ static struct regulator_ops twl6030ldo_ops = {
622 .enable = twl6030reg_enable, 604 .enable = twl6030reg_enable,
623 .disable = twl6030reg_disable, 605 .disable = twl6030reg_disable,
624 .is_enabled = twl6030reg_is_enabled, 606 .is_enabled = twl6030reg_is_enabled,
625 .enable_time = twl6030reg_enable_time,
626 607
627 .set_mode = twl6030reg_set_mode, 608 .set_mode = twl6030reg_set_mode,
628 609
@@ -656,7 +637,6 @@ static struct regulator_ops twl4030fixed_ops = {
656 .enable = twl4030reg_enable, 637 .enable = twl4030reg_enable,
657 .disable = twl4030reg_disable, 638 .disable = twl4030reg_disable,
658 .is_enabled = twl4030reg_is_enabled, 639 .is_enabled = twl4030reg_is_enabled,
659 .enable_time = twl4030reg_enable_time,
660 640
661 .set_mode = twl4030reg_set_mode, 641 .set_mode = twl4030reg_set_mode,
662 642
@@ -671,7 +651,6 @@ static struct regulator_ops twl6030fixed_ops = {
671 .enable = twl6030reg_enable, 651 .enable = twl6030reg_enable,
672 .disable = twl6030reg_disable, 652 .disable = twl6030reg_disable,
673 .is_enabled = twl6030reg_is_enabled, 653 .is_enabled = twl6030reg_is_enabled,
674 .enable_time = twl6030reg_enable_time,
675 654
676 .set_mode = twl6030reg_set_mode, 655 .set_mode = twl6030reg_set_mode,
677 656
@@ -682,7 +661,6 @@ static struct regulator_ops twl6030_fixed_resource = {
682 .enable = twl6030reg_enable, 661 .enable = twl6030reg_enable,
683 .disable = twl6030reg_disable, 662 .disable = twl6030reg_disable,
684 .is_enabled = twl6030reg_is_enabled, 663 .is_enabled = twl6030reg_is_enabled,
685 .enable_time = twl6030reg_enable_time,
686 .get_status = twl6030reg_get_status, 664 .get_status = twl6030reg_get_status,
687}; 665};
688 666
@@ -879,7 +857,6 @@ static struct regulator_ops twlsmps_ops = {
879 .enable = twl6030reg_enable, 857 .enable = twl6030reg_enable,
880 .disable = twl6030reg_disable, 858 .disable = twl6030reg_disable,
881 .is_enabled = twl6030reg_is_enabled, 859 .is_enabled = twl6030reg_is_enabled,
882 .enable_time = twl6030reg_enable_time,
883 860
884 .set_mode = twl6030reg_set_mode, 861 .set_mode = twl6030reg_set_mode,
885 862
@@ -902,7 +879,6 @@ static struct twlreg_info TWL4030_INFO_##label = { \
902 .id = num, \ 879 .id = num, \
903 .table_len = ARRAY_SIZE(label##_VSEL_table), \ 880 .table_len = ARRAY_SIZE(label##_VSEL_table), \
904 .table = label##_VSEL_table, \ 881 .table = label##_VSEL_table, \
905 .delay = turnon_delay, \
906 .remap = remap_conf, \ 882 .remap = remap_conf, \
907 .desc = { \ 883 .desc = { \
908 .name = #label, \ 884 .name = #label, \
@@ -911,6 +887,7 @@ static struct twlreg_info TWL4030_INFO_##label = { \
911 .ops = &twl4030ldo_ops, \ 887 .ops = &twl4030ldo_ops, \
912 .type = REGULATOR_VOLTAGE, \ 888 .type = REGULATOR_VOLTAGE, \
913 .owner = THIS_MODULE, \ 889 .owner = THIS_MODULE, \
890 .enable_time = turnon_delay, \
914 }, \ 891 }, \
915 } 892 }
916 893
@@ -918,7 +895,6 @@ static struct twlreg_info TWL4030_INFO_##label = { \
918static struct twlreg_info TWL4030_INFO_##label = { \ 895static struct twlreg_info TWL4030_INFO_##label = { \
919 .base = offset, \ 896 .base = offset, \
920 .id = num, \ 897 .id = num, \
921 .delay = turnon_delay, \
922 .remap = remap_conf, \ 898 .remap = remap_conf, \
923 .desc = { \ 899 .desc = { \
924 .name = #label, \ 900 .name = #label, \
@@ -926,6 +902,7 @@ static struct twlreg_info TWL4030_INFO_##label = { \
926 .ops = &twl4030smps_ops, \ 902 .ops = &twl4030smps_ops, \
927 .type = REGULATOR_VOLTAGE, \ 903 .type = REGULATOR_VOLTAGE, \
928 .owner = THIS_MODULE, \ 904 .owner = THIS_MODULE, \
905 .enable_time = turnon_delay, \
929 }, \ 906 }, \
930 } 907 }
931 908
@@ -980,7 +957,6 @@ static struct twlreg_info TWLFIXED_INFO_##label = { \
980 .base = offset, \ 957 .base = offset, \
981 .id = num, \ 958 .id = num, \
982 .min_mV = mVolts, \ 959 .min_mV = mVolts, \
983 .delay = turnon_delay, \
984 .remap = remap_conf, \ 960 .remap = remap_conf, \
985 .desc = { \ 961 .desc = { \
986 .name = #label, \ 962 .name = #label, \
@@ -989,19 +965,20 @@ static struct twlreg_info TWLFIXED_INFO_##label = { \
989 .ops = &operations, \ 965 .ops = &operations, \
990 .type = REGULATOR_VOLTAGE, \ 966 .type = REGULATOR_VOLTAGE, \
991 .owner = THIS_MODULE, \ 967 .owner = THIS_MODULE, \
968 .enable_time = turnon_delay, \
992 }, \ 969 }, \
993 } 970 }
994 971
995#define TWL6030_FIXED_RESOURCE(label, offset, turnon_delay) \ 972#define TWL6030_FIXED_RESOURCE(label, offset, turnon_delay) \
996static struct twlreg_info TWLRES_INFO_##label = { \ 973static struct twlreg_info TWLRES_INFO_##label = { \
997 .base = offset, \ 974 .base = offset, \
998 .delay = turnon_delay, \
999 .desc = { \ 975 .desc = { \
1000 .name = #label, \ 976 .name = #label, \
1001 .id = TWL6030_REG_##label, \ 977 .id = TWL6030_REG_##label, \
1002 .ops = &twl6030_fixed_resource, \ 978 .ops = &twl6030_fixed_resource, \
1003 .type = REGULATOR_VOLTAGE, \ 979 .type = REGULATOR_VOLTAGE, \
1004 .owner = THIS_MODULE, \ 980 .owner = THIS_MODULE, \
981 .enable_time = turnon_delay, \
1005 }, \ 982 }, \
1006 } 983 }
1007 984