aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/twl-regulator.c
diff options
context:
space:
mode:
authorGraeme Gregory <gg@slimlogic.co.uk>2013-06-19 08:24:02 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-20 04:26:29 -0400
commit89ce43fbbce525f99991ed060b1302bd3fdae9c6 (patch)
treebd5ff0aa56e1ce8561d22ce1111126f00715407c /drivers/regulator/twl-regulator.c
parent997174705458d2abdbc31ba1594bf2a4503cb41a (diff)
mfd: twl-core: Change TWL6025 references to TWL6032
The TWL6025 was never released beyond sample form and was replaced by the PhoenixLite range of chips - TWL6032. Change the references to reference the TWL6032 class and name the registers to twl6032 in line with an actual released chip name to avoid confusion. Currently there are no users of TWL6025 in the code. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com> Acked-by: Lee Jones <lee.jones@linaro.org> Reviwed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/regulator/twl-regulator.c')
-rw-r--r--drivers/regulator/twl-regulator.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index fb6e67d74ffb..93bc4f456da4 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -109,7 +109,7 @@ struct twlreg_info {
109#define SMPS_OFFSET_EN BIT(0) 109#define SMPS_OFFSET_EN BIT(0)
110#define SMPS_EXTENDED_EN BIT(1) 110#define SMPS_EXTENDED_EN BIT(1)
111 111
112/* twl6025 SMPS EPROM values */ 112/* twl6032 SMPS EPROM values */
113#define TWL6030_SMPS_OFFSET 0xB0 113#define TWL6030_SMPS_OFFSET 0xB0
114#define TWL6030_SMPS_MULT 0xB3 114#define TWL6030_SMPS_MULT 0xB3
115#define SMPS_MULTOFFSET_SMPS4 BIT(0) 115#define SMPS_MULTOFFSET_SMPS4 BIT(0)
@@ -173,7 +173,7 @@ static int twl6030reg_is_enabled(struct regulator_dev *rdev)
173 struct twlreg_info *info = rdev_get_drvdata(rdev); 173 struct twlreg_info *info = rdev_get_drvdata(rdev);
174 int grp = 0, val; 174 int grp = 0, val;
175 175
176 if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) { 176 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) {
177 grp = twlreg_grp(rdev); 177 grp = twlreg_grp(rdev);
178 if (grp < 0) 178 if (grp < 0)
179 return grp; 179 return grp;
@@ -211,7 +211,7 @@ static int twl6030reg_enable(struct regulator_dev *rdev)
211 int grp = 0; 211 int grp = 0;
212 int ret; 212 int ret;
213 213
214 if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) 214 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS)))
215 grp = twlreg_grp(rdev); 215 grp = twlreg_grp(rdev);
216 if (grp < 0) 216 if (grp < 0)
217 return grp; 217 return grp;
@@ -245,7 +245,7 @@ static int twl6030reg_disable(struct regulator_dev *rdev)
245 int grp = 0; 245 int grp = 0;
246 int ret; 246 int ret;
247 247
248 if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) 248 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS)))
249 grp = P1_GRP_6030 | P2_GRP_6030 | P3_GRP_6030; 249 grp = P1_GRP_6030 | P2_GRP_6030 | P3_GRP_6030;
250 250
251 /* For 6030, set the off state for all grps enabled */ 251 /* For 6030, set the off state for all grps enabled */
@@ -339,7 +339,7 @@ static int twl6030reg_set_mode(struct regulator_dev *rdev, unsigned mode)
339 int grp = 0; 339 int grp = 0;
340 int val; 340 int val;
341 341
342 if (!(twl_class_is_6030() && (info->features & TWL6025_SUBCLASS))) 342 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS)))
343 grp = twlreg_grp(rdev); 343 grp = twlreg_grp(rdev);
344 344
345 if (grp < 0) 345 if (grp < 0)
@@ -899,14 +899,14 @@ static const struct twlreg_info TWL6030_INFO_##label = { \
899 }, \ 899 }, \
900 } 900 }
901 901
902#define TWL6025_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) \ 902#define TWL6032_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) \
903static const struct twlreg_info TWL6025_INFO_##label = { \ 903static const struct twlreg_info TWL6032_INFO_##label = { \
904 .base = offset, \ 904 .base = offset, \
905 .min_mV = min_mVolts, \ 905 .min_mV = min_mVolts, \
906 .max_mV = max_mVolts, \ 906 .max_mV = max_mVolts, \
907 .desc = { \ 907 .desc = { \
908 .name = #label, \ 908 .name = #label, \
909 .id = TWL6025_REG_##label, \ 909 .id = TWL6032_REG_##label, \
910 .n_voltages = 32, \ 910 .n_voltages = 32, \
911 .ops = &twl6030ldo_ops, \ 911 .ops = &twl6030ldo_ops, \
912 .type = REGULATOR_VOLTAGE, \ 912 .type = REGULATOR_VOLTAGE, \
@@ -933,14 +933,14 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \
933 }, \ 933 }, \
934 } 934 }
935 935
936#define TWL6025_ADJUSTABLE_SMPS(label, offset) \ 936#define TWL6032_ADJUSTABLE_SMPS(label, offset) \
937static const struct twlreg_info TWLSMPS_INFO_##label = { \ 937static const struct twlreg_info TWLSMPS_INFO_##label = { \
938 .base = offset, \ 938 .base = offset, \
939 .min_mV = 600, \ 939 .min_mV = 600, \
940 .max_mV = 2100, \ 940 .max_mV = 2100, \
941 .desc = { \ 941 .desc = { \
942 .name = #label, \ 942 .name = #label, \
943 .id = TWL6025_REG_##label, \ 943 .id = TWL6032_REG_##label, \
944 .n_voltages = 63, \ 944 .n_voltages = 63, \
945 .ops = &twlsmps_ops, \ 945 .ops = &twlsmps_ops, \
946 .type = REGULATOR_VOLTAGE, \ 946 .type = REGULATOR_VOLTAGE, \
@@ -981,15 +981,15 @@ TWL6030_ADJUSTABLE_LDO(VMMC, 0x68, 1000, 3300);
981TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 1000, 3300); 981TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 1000, 3300);
982TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 1000, 3300); 982TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 1000, 3300);
983/* 6025 are renamed compared to 6030 versions */ 983/* 6025 are renamed compared to 6030 versions */
984TWL6025_ADJUSTABLE_LDO(LDO2, 0x54, 1000, 3300); 984TWL6032_ADJUSTABLE_LDO(LDO2, 0x54, 1000, 3300);
985TWL6025_ADJUSTABLE_LDO(LDO4, 0x58, 1000, 3300); 985TWL6032_ADJUSTABLE_LDO(LDO4, 0x58, 1000, 3300);
986TWL6025_ADJUSTABLE_LDO(LDO3, 0x5c, 1000, 3300); 986TWL6032_ADJUSTABLE_LDO(LDO3, 0x5c, 1000, 3300);
987TWL6025_ADJUSTABLE_LDO(LDO5, 0x68, 1000, 3300); 987TWL6032_ADJUSTABLE_LDO(LDO5, 0x68, 1000, 3300);
988TWL6025_ADJUSTABLE_LDO(LDO1, 0x6c, 1000, 3300); 988TWL6032_ADJUSTABLE_LDO(LDO1, 0x6c, 1000, 3300);
989TWL6025_ADJUSTABLE_LDO(LDO7, 0x74, 1000, 3300); 989TWL6032_ADJUSTABLE_LDO(LDO7, 0x74, 1000, 3300);
990TWL6025_ADJUSTABLE_LDO(LDO6, 0x60, 1000, 3300); 990TWL6032_ADJUSTABLE_LDO(LDO6, 0x60, 1000, 3300);
991TWL6025_ADJUSTABLE_LDO(LDOLN, 0x64, 1000, 3300); 991TWL6032_ADJUSTABLE_LDO(LDOLN, 0x64, 1000, 3300);
992TWL6025_ADJUSTABLE_LDO(LDOUSB, 0x70, 1000, 3300); 992TWL6032_ADJUSTABLE_LDO(LDOUSB, 0x70, 1000, 3300);
993TWL4030_FIXED_LDO(VINTANA1, 0x3f, 1500, 11, 100, 0x08); 993TWL4030_FIXED_LDO(VINTANA1, 0x3f, 1500, 11, 100, 0x08);
994TWL4030_FIXED_LDO(VINTDIG, 0x47, 1500, 13, 100, 0x08); 994TWL4030_FIXED_LDO(VINTDIG, 0x47, 1500, 13, 100, 0x08);
995TWL4030_FIXED_LDO(VUSB1V5, 0x71, 1500, 17, 100, 0x08); 995TWL4030_FIXED_LDO(VUSB1V5, 0x71, 1500, 17, 100, 0x08);
@@ -1001,9 +1001,9 @@ TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 0);
1001TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 0); 1001TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 0);
1002TWL6030_FIXED_LDO(V1V8, 0x16, 1800, 0); 1002TWL6030_FIXED_LDO(V1V8, 0x16, 1800, 0);
1003TWL6030_FIXED_LDO(V2V1, 0x1c, 2100, 0); 1003TWL6030_FIXED_LDO(V2V1, 0x1c, 2100, 0);
1004TWL6025_ADJUSTABLE_SMPS(SMPS3, 0x34); 1004TWL6032_ADJUSTABLE_SMPS(SMPS3, 0x34);
1005TWL6025_ADJUSTABLE_SMPS(SMPS4, 0x10); 1005TWL6032_ADJUSTABLE_SMPS(SMPS4, 0x10);
1006TWL6025_ADJUSTABLE_SMPS(VIO, 0x16); 1006TWL6032_ADJUSTABLE_SMPS(VIO, 0x16);
1007 1007
1008static u8 twl_get_smps_offset(void) 1008static u8 twl_get_smps_offset(void)
1009{ 1009{
@@ -1031,7 +1031,7 @@ static u8 twl_get_smps_mult(void)
1031 1031
1032#define TWL4030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL4030, label) 1032#define TWL4030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL4030, label)
1033#define TWL6030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6030, label) 1033#define TWL6030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6030, label)
1034#define TWL6025_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6025, label) 1034#define TWL6032_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6032, label)
1035#define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label) 1035#define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label)
1036#define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label) 1036#define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label)
1037 1037
@@ -1060,15 +1060,15 @@ static const struct of_device_id twl_of_match[] = {
1060 TWL6030_OF_MATCH("ti,twl6030-vmmc", VMMC), 1060 TWL6030_OF_MATCH("ti,twl6030-vmmc", VMMC),
1061 TWL6030_OF_MATCH("ti,twl6030-vpp", VPP), 1061 TWL6030_OF_MATCH("ti,twl6030-vpp", VPP),
1062 TWL6030_OF_MATCH("ti,twl6030-vusim", VUSIM), 1062 TWL6030_OF_MATCH("ti,twl6030-vusim", VUSIM),
1063 TWL6025_OF_MATCH("ti,twl6025-ldo2", LDO2), 1063 TWL6032_OF_MATCH("ti,twl6032-ldo2", LDO2),
1064 TWL6025_OF_MATCH("ti,twl6025-ldo4", LDO4), 1064 TWL6032_OF_MATCH("ti,twl6032-ldo4", LDO4),
1065 TWL6025_OF_MATCH("ti,twl6025-ldo3", LDO3), 1065 TWL6032_OF_MATCH("ti,twl6032-ldo3", LDO3),
1066 TWL6025_OF_MATCH("ti,twl6025-ldo5", LDO5), 1066 TWL6032_OF_MATCH("ti,twl6032-ldo5", LDO5),
1067 TWL6025_OF_MATCH("ti,twl6025-ldo1", LDO1), 1067 TWL6032_OF_MATCH("ti,twl6032-ldo1", LDO1),
1068 TWL6025_OF_MATCH("ti,twl6025-ldo7", LDO7), 1068 TWL6032_OF_MATCH("ti,twl6032-ldo7", LDO7),
1069 TWL6025_OF_MATCH("ti,twl6025-ldo6", LDO6), 1069 TWL6032_OF_MATCH("ti,twl6032-ldo6", LDO6),
1070 TWL6025_OF_MATCH("ti,twl6025-ldoln", LDOLN), 1070 TWL6032_OF_MATCH("ti,twl6032-ldoln", LDOLN),
1071 TWL6025_OF_MATCH("ti,twl6025-ldousb", LDOUSB), 1071 TWL6032_OF_MATCH("ti,twl6032-ldousb", LDOUSB),
1072 TWLFIXED_OF_MATCH("ti,twl4030-vintana1", VINTANA1), 1072 TWLFIXED_OF_MATCH("ti,twl4030-vintana1", VINTANA1),
1073 TWLFIXED_OF_MATCH("ti,twl4030-vintdig", VINTDIG), 1073 TWLFIXED_OF_MATCH("ti,twl4030-vintdig", VINTDIG),
1074 TWLFIXED_OF_MATCH("ti,twl4030-vusb1v5", VUSB1V5), 1074 TWLFIXED_OF_MATCH("ti,twl4030-vusb1v5", VUSB1V5),
@@ -1080,9 +1080,9 @@ static const struct of_device_id twl_of_match[] = {
1080 TWLFIXED_OF_MATCH("ti,twl6030-vusb", VUSB), 1080 TWLFIXED_OF_MATCH("ti,twl6030-vusb", VUSB),
1081 TWLFIXED_OF_MATCH("ti,twl6030-v1v8", V1V8), 1081 TWLFIXED_OF_MATCH("ti,twl6030-v1v8", V1V8),
1082 TWLFIXED_OF_MATCH("ti,twl6030-v2v1", V2V1), 1082 TWLFIXED_OF_MATCH("ti,twl6030-v2v1", V2V1),
1083 TWLSMPS_OF_MATCH("ti,twl6025-smps3", SMPS3), 1083 TWLSMPS_OF_MATCH("ti,twl6032-smps3", SMPS3),
1084 TWLSMPS_OF_MATCH("ti,twl6025-smps4", SMPS4), 1084 TWLSMPS_OF_MATCH("ti,twl6032-smps4", SMPS4),
1085 TWLSMPS_OF_MATCH("ti,twl6025-vio", VIO), 1085 TWLSMPS_OF_MATCH("ti,twl6032-vio", VIO),
1086 {}, 1086 {},
1087}; 1087};
1088MODULE_DEVICE_TABLE(of, twl_of_match); 1088MODULE_DEVICE_TABLE(of, twl_of_match);
@@ -1163,19 +1163,19 @@ static int twlreg_probe(struct platform_device *pdev)
1163 } 1163 }
1164 1164
1165 switch (id) { 1165 switch (id) {
1166 case TWL6025_REG_SMPS3: 1166 case TWL6032_REG_SMPS3:
1167 if (twl_get_smps_mult() & SMPS_MULTOFFSET_SMPS3) 1167 if (twl_get_smps_mult() & SMPS_MULTOFFSET_SMPS3)
1168 info->flags |= SMPS_EXTENDED_EN; 1168 info->flags |= SMPS_EXTENDED_EN;
1169 if (twl_get_smps_offset() & SMPS_MULTOFFSET_SMPS3) 1169 if (twl_get_smps_offset() & SMPS_MULTOFFSET_SMPS3)
1170 info->flags |= SMPS_OFFSET_EN; 1170 info->flags |= SMPS_OFFSET_EN;
1171 break; 1171 break;
1172 case TWL6025_REG_SMPS4: 1172 case TWL6032_REG_SMPS4:
1173 if (twl_get_smps_mult() & SMPS_MULTOFFSET_SMPS4) 1173 if (twl_get_smps_mult() & SMPS_MULTOFFSET_SMPS4)
1174 info->flags |= SMPS_EXTENDED_EN; 1174 info->flags |= SMPS_EXTENDED_EN;
1175 if (twl_get_smps_offset() & SMPS_MULTOFFSET_SMPS4) 1175 if (twl_get_smps_offset() & SMPS_MULTOFFSET_SMPS4)
1176 info->flags |= SMPS_OFFSET_EN; 1176 info->flags |= SMPS_OFFSET_EN;
1177 break; 1177 break;
1178 case TWL6025_REG_VIO: 1178 case TWL6032_REG_VIO:
1179 if (twl_get_smps_mult() & SMPS_MULTOFFSET_VIO) 1179 if (twl_get_smps_mult() & SMPS_MULTOFFSET_VIO)
1180 info->flags |= SMPS_EXTENDED_EN; 1180 info->flags |= SMPS_EXTENDED_EN;
1181 if (twl_get_smps_offset() & SMPS_MULTOFFSET_VIO) 1181 if (twl_get_smps_offset() & SMPS_MULTOFFSET_VIO)