From d0581ae9f00986231647496a55c0ae7f0dcbbf1a Mon Sep 17 00:00:00 2001 From: Rabin Vincent Date: Tue, 6 Sep 2011 09:26:47 +0530 Subject: ab5500: move to separate header Use new include/linux/mfd/abx500/ab5500.h instead of upstream include/linux/mfd/ab5500/ab5500.h file Change-Id: I11dd2a23323229096b6e0ee2d4dc68cab8919bff --- include/linux/mfd/abx500/ab5500-bm.h | 4 ++-- include/linux/mfd/abx500/ab5500.h | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/mfd/abx500/ab5500-bm.h b/include/linux/mfd/abx500/ab5500-bm.h index 1bb22614b27..f62137a6e9d 100644 --- a/include/linux/mfd/abx500/ab5500-bm.h +++ b/include/linux/mfd/abx500/ab5500-bm.h @@ -106,11 +106,11 @@ int ab5500_btemp_get_batctrl_temp(struct ab5500_btemp *btemp); static void ab5500_charger_usb_state_changed(u8 bm_usb_state, u16 mA) { } -inline struct ab5500_btemp *ab5500_btemp_get(void) +static inline struct ab5500_btemp *ab5500_btemp_get(void) { return 0; } -inline int ab5500_btemp_get_batctrl_temp(struct ab5500_btemp *btemp) +static inline int ab5500_btemp_get_batctrl_temp(struct ab5500_btemp *btemp) { return 0; } diff --git a/include/linux/mfd/abx500/ab5500.h b/include/linux/mfd/abx500/ab5500.h index 54f820ed73b..13ef9bcf30e 100644 --- a/include/linux/mfd/abx500/ab5500.h +++ b/include/linux/mfd/abx500/ab5500.h @@ -24,6 +24,9 @@ enum ab5500_devid { AB5500_DEVID_VIDEO, AB5500_DEVID_DBIECI, AB5500_DEVID_ONSWA, + AB5500_DEVID_CHARGALG, + AB5500_DEVID_BTEMP, + AB5500_DEVID_TEMPMON, AB5500_NUM_DEVICES, }; @@ -92,8 +95,9 @@ enum ab5500_banks_addr { #define AB5500_IT_SOURCE21_REG 0x35 #define AB5500_IT_SOURCE22_REG 0x36 #define AB5500_IT_SOURCE23_REG 0x37 +#define AB5500_IT_SOURCE24_REG 0x38 -#define AB5500_NUM_IRQ_REGS 23 +#define AB5500_NUM_IRQ_REGS 25 /** * struct ab5500 @@ -118,6 +122,7 @@ struct ab5500 { char chip_name[32]; u8 chip_id; struct mutex irq_lock; + u32 num_event_reg; u32 abb_events; u8 mask[AB5500_NUM_IRQ_REGS]; u8 oldmask[AB5500_NUM_IRQ_REGS]; @@ -129,12 +134,29 @@ struct ab5500 { #endif }; +#ifndef CONFIG_AB5500_CORE +static inline int ab5500_clock_rtc_enable(int num, bool enable) +{ + return -ENOSYS; +} +#else +extern int ab5500_clock_rtc_enable(int num, bool enable); +#endif + +/* Forward Declaration */ +struct ab5500_regulator_platform_data; + struct ab5500_platform_data { struct {unsigned int base; unsigned int count; } irq; void *dev_data[AB5500_NUM_DEVICES]; + size_t dev_data_sz[AB5500_NUM_DEVICES]; struct abx500_init_settings *init_settings; unsigned int init_settings_sz; bool pm_power_off; + struct ab5500_regulator_platform_data *regulator; }; +struct ab5500_ponkey_platform_data { + u8 shutdown_secs; +}; #endif /* MFD_AB5500_H */ -- cgit v1.2.3