From a53b8e3b995f8b7c8a8c4ef5aa367958e46139b3 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Sat, 4 Jun 2011 08:16:41 +0300 Subject: OMAP: New twl-common for common TWL configuration Introduce a new file, which will be used to configure common pmic (TWL) devices, regulators, and TWL audio. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren --- arch/arm/mach-omap2/twl-common.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 arch/arm/mach-omap2/twl-common.h (limited to 'arch/arm/mach-omap2/twl-common.h') diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h new file mode 100644 index 000000000000..e9fe2ab4944a --- /dev/null +++ b/arch/arm/mach-omap2/twl-common.h @@ -0,0 +1,28 @@ +#ifndef __OMAP_PMIC_COMMON__ +#define __OMAP_PMIC_COMMON__ + +struct twl4030_platform_data; + +void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, + struct twl4030_platform_data *pmic_data); + +static inline void omap2_pmic_init(const char *pmic_type, + struct twl4030_platform_data *pmic_data) +{ + omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); +} + +static inline void omap3_pmic_init(const char *pmic_type, + struct twl4030_platform_data *pmic_data) +{ + omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); +} + +static inline void omap4_pmic_init(const char *pmic_type, + struct twl4030_platform_data *pmic_data) +{ + /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */ + omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); +} + +#endif /* __OMAP_PMIC_COMMON__ */ -- cgit v1.2.3