diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-06-07 09:26:46 +0200 |
---|---|---|
committer | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-07-04 17:43:33 +0200 |
commit | b22f954bae35be115a10c6426dc070f7d652b32e (patch) | |
tree | 2144bd55d658b284eb8d56d315d4177adf2f9186 /arch/arm/mach-omap2/twl-common.h | |
parent | OMAP: New twl-common for common TWL configuration (diff) | |
download | linux-b22f954bae35be115a10c6426dc070f7d652b32e.tar.xz linux-b22f954bae35be115a10c6426dc070f7d652b32e.zip |
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 @@ #ifndef __OMAP_PMIC_COMMON__ #define __OMAP_PMIC_COMMON__ +#define TWL_COMMON_PDATA_USB (1 << 0) + +/* Common LDO regulators for TWL4030/TWL6030 */ +#define TWL_COMMON_REGULATOR_VDAC (1 << 0) +#define TWL_COMMON_REGULATOR_VAUX1 (1 << 1) +#define TWL_COMMON_REGULATOR_VAUX2 (1 << 2) +#define TWL_COMMON_REGULATOR_VAUX3 (1 << 3) + +/* TWL6030 LDO regulators */ +#define TWL_COMMON_REGULATOR_VMMC (1 << 4) +#define TWL_COMMON_REGULATOR_VPP (1 << 5) +#define TWL_COMMON_REGULATOR_VUSIM (1 << 6) +#define TWL_COMMON_REGULATOR_VANA (1 << 7) +#define TWL_COMMON_REGULATOR_VCXIO (1 << 8) +#define TWL_COMMON_REGULATOR_VUSB (1 << 9) +#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10) + struct twl4030_platform_data; 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, omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); } +void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, + u32 pdata_flags, u32 regulators_flags); + #endif /* __OMAP_PMIC_COMMON__ */ |