blob: e9fe2ab4944aff9a570eaaa235d7fbeeee736059 [file] [log] [blame]
Peter Ujfalusia53b8e32011-06-04 08:16:41 +03001#ifndef __OMAP_PMIC_COMMON__
2#define __OMAP_PMIC_COMMON__
3
4struct twl4030_platform_data;
5
6void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
7 struct twl4030_platform_data *pmic_data);
8
9static inline void omap2_pmic_init(const char *pmic_type,
10 struct twl4030_platform_data *pmic_data)
11{
12 omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data);
13}
14
15static inline void omap3_pmic_init(const char *pmic_type,
16 struct twl4030_platform_data *pmic_data)
17{
18 omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data);
19}
20
21static inline void omap4_pmic_init(const char *pmic_type,
22 struct twl4030_platform_data *pmic_data)
23{
24 /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */
25 omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
26}
27
28#endif /* __OMAP_PMIC_COMMON__ */