diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-06-07 03:26:46 -0400 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-04 11:43:33 -0400 |
commit | b22f954bae35be115a10c6426dc070f7d652b32e (patch) | |
tree | 2144bd55d658b284eb8d56d315d4177adf2f9186 /arch/arm/mach-omap2/twl-common.h | |
parent | a53b8e3b995f8b7c8a8c4ef5aa367958e46139b3 (diff) |
OMAP4: Move common twl6030 configuration to twl-common
Reduce the amount of duplicated code by moving the common
configuration for TWL6030 (on OMAP4 platform) to the
twl-common file.
Use the omap4_pmic_get_config function from board files to
properly configure the PMIC with the common fields.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/twl-common.h')
-rw-r--r-- | arch/arm/mach-omap2/twl-common.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h index e9fe2ab4944a..d96c28987638 100644 --- a/arch/arm/mach-omap2/twl-common.h +++ b/arch/arm/mach-omap2/twl-common.h | |||
@@ -1,6 +1,23 @@ | |||
1 | #ifndef __OMAP_PMIC_COMMON__ | 1 | #ifndef __OMAP_PMIC_COMMON__ |
2 | #define __OMAP_PMIC_COMMON__ | 2 | #define __OMAP_PMIC_COMMON__ |
3 | 3 | ||
4 | #define TWL_COMMON_PDATA_USB (1 << 0) | ||
5 | |||
6 | /* Common LDO regulators for TWL4030/TWL6030 */ | ||
7 | #define TWL_COMMON_REGULATOR_VDAC (1 << 0) | ||
8 | #define TWL_COMMON_REGULATOR_VAUX1 (1 << 1) | ||
9 | #define TWL_COMMON_REGULATOR_VAUX2 (1 << 2) | ||
10 | #define TWL_COMMON_REGULATOR_VAUX3 (1 << 3) | ||
11 | |||
12 | /* TWL6030 LDO regulators */ | ||
13 | #define TWL_COMMON_REGULATOR_VMMC (1 << 4) | ||
14 | #define TWL_COMMON_REGULATOR_VPP (1 << 5) | ||
15 | #define TWL_COMMON_REGULATOR_VUSIM (1 << 6) | ||
16 | #define TWL_COMMON_REGULATOR_VANA (1 << 7) | ||
17 | #define TWL_COMMON_REGULATOR_VCXIO (1 << 8) | ||
18 | #define TWL_COMMON_REGULATOR_VUSB (1 << 9) | ||
19 | #define TWL_COMMON_REGULATOR_CLK32KG (1 << 10) | ||
20 | |||
4 | struct twl4030_platform_data; | 21 | struct twl4030_platform_data; |
5 | 22 | ||
6 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, | 23 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, |
@@ -25,4 +42,7 @@ static inline void omap4_pmic_init(const char *pmic_type, | |||
25 | omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); | 42 | omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); |
26 | } | 43 | } |
27 | 44 | ||
45 | void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
46 | u32 pdata_flags, u32 regulators_flags); | ||
47 | |||
28 | #endif /* __OMAP_PMIC_COMMON__ */ | 48 | #endif /* __OMAP_PMIC_COMMON__ */ |