aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-11-30 18:43:58 -0500
committerSamuel Ortiz <samuel@sortiz.org>2009-01-04 06:17:39 -0500
commitdad759ff8ba79927766e3f0159bfc5fb6de0f982 (patch)
tree06849276db93d8893d763175b8d3acb4b2b5e2f8 /include/linux/i2c
parent67460a7c26271fd7a32e5d51b2c806a84ce78a62 (diff)
mfd: twl4030: create some regulator devices
Initial code to create twl4030 voltage regulator devices, using the new regulator framework. Note that this now starts to care what name is used to declare the TWL chip: - TWL4030 is the "old" chip; newer ones have a bigger variety of VAUX2 voltages. - TWL5030 is the core "new" chip; TPS65950 is its catalog version. - The TPS65930 and TPS65920 are cost-reduced catalog versions of TWL5030 parts ... fewer regulators, no battery charger, etc. Board-specific regulator configuration should be provided, listing which regulators are used and their constraints (e.g. 1.8V only). Code that could ("should"?) leverage the regulator stuff includes TWL4030 USB transceiver support and MMC glue, LCD support for the 3430SDP and Labrador boards, and S-Video output. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Diffstat (limited to 'include/linux/i2c')
-rw-r--r--include/linux/i2c/twl4030.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h
index d4846695bcd0..e06555d40d35 100644
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -278,6 +278,18 @@ struct twl4030_platform_data {
278 struct twl4030_keypad_data *keypad; 278 struct twl4030_keypad_data *keypad;
279 struct twl4030_usb_data *usb; 279 struct twl4030_usb_data *usb;
280 280
281 /* LDO regulators */
282 struct regulator_init_data *vdac;
283 struct regulator_init_data *vpll1;
284 struct regulator_init_data *vpll2;
285 struct regulator_init_data *vmmc1;
286 struct regulator_init_data *vmmc2;
287 struct regulator_init_data *vsim;
288 struct regulator_init_data *vaux1;
289 struct regulator_init_data *vaux2;
290 struct regulator_init_data *vaux3;
291 struct regulator_init_data *vaux4;
292
281 /* REVISIT more to come ... _nothing_ should be hard-wired */ 293 /* REVISIT more to come ... _nothing_ should be hard-wired */
282}; 294};
283 295
@@ -309,4 +321,39 @@ int twl4030_set_gpio_debounce(int gpio, int enable);
309 static inline int twl4030charger_usb_en(int enable) { return 0; } 321 static inline int twl4030charger_usb_en(int enable) { return 0; }
310#endif 322#endif
311 323
324/*----------------------------------------------------------------------*/
325
326/* Linux-specific regulator identifiers ... for now, we only support
327 * the LDOs, and leave the three buck converters alone. VDD1 and VDD2
328 * need to tie into hardware based voltage scaling (cpufreq etc), while
329 * VIO is generally fixed.
330 */
331
332/* EXTERNAL dc-to-dc buck converters */
333#define TWL4030_REG_VDD1 0
334#define TWL4030_REG_VDD2 1
335#define TWL4030_REG_VIO 2
336
337/* EXTERNAL LDOs */
338#define TWL4030_REG_VDAC 3
339#define TWL4030_REG_VPLL1 4
340#define TWL4030_REG_VPLL2 5 /* not on all chips */
341#define TWL4030_REG_VMMC1 6
342#define TWL4030_REG_VMMC2 7 /* not on all chips */
343#define TWL4030_REG_VSIM 8 /* not on all chips */
344#define TWL4030_REG_VAUX1 9 /* not on all chips */
345#define TWL4030_REG_VAUX2_4030 10 /* (twl4030-specific) */
346#define TWL4030_REG_VAUX2 11 /* (twl5030 and newer) */
347#define TWL4030_REG_VAUX3 12 /* not on all chips */
348#define TWL4030_REG_VAUX4 13 /* not on all chips */
349
350/* INTERNAL LDOs */
351#define TWL4030_REG_VINTANA1 14
352#define TWL4030_REG_VINTANA2 15
353#define TWL4030_REG_VINTDIG 16
354#define TWL4030_REG_VUSB1V5 17
355#define TWL4030_REG_VUSB1V8 18
356#define TWL4030_REG_VUSB3V1 19
357#define TWL4030_REG_VUSBCP 20
358
312#endif /* End of __TWL4030_H */ 359#endif /* End of __TWL4030_H */