diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2011-12-02 08:16:33 -0500 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-08 18:37:39 -0500 |
| commit | ee66e653ca7425bc8ffca4e00f19a8057cd14e4d (patch) | |
| tree | e566da76e2588bc4871df677063f302213be0427 /include/linux/mfd/abx500 | |
| parent | 83051b7287e43241ccb6adaaa92615a87274898b (diff) | |
mfd: Unify abx500 headers in mfd/abx500
This moves all the header files related to the abx500 family into
a common include directory below mfd. From now on we place any
subchip header in that directory. Headers previously in e.g.
<linux/mfd/ab8500/gpio.h> get prefixed and are now e.g.
<linux/mfd/abx500/ab8500-gpio.h>. The top-level abstract interface
remains in <linux/mfd/abx500.h>.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/abx500')
| -rw-r--r-- | include/linux/mfd/abx500/ab5500.h | 140 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500-gpadc.h | 35 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500-gpio.h | 21 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500-sysctrl.h | 254 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500.h | 201 |
5 files changed, 651 insertions, 0 deletions
diff --git a/include/linux/mfd/abx500/ab5500.h b/include/linux/mfd/abx500/ab5500.h new file mode 100644 index 000000000000..a720051ae933 --- /dev/null +++ b/include/linux/mfd/abx500/ab5500.h | |||
| @@ -0,0 +1,140 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson 2011 | ||
| 3 | * | ||
| 4 | * License Terms: GNU General Public License v2 | ||
| 5 | */ | ||
| 6 | #ifndef MFD_AB5500_H | ||
| 7 | #define MFD_AB5500_H | ||
| 8 | |||
| 9 | #include <linux/device.h> | ||
| 10 | |||
| 11 | enum ab5500_devid { | ||
| 12 | AB5500_DEVID_ADC, | ||
| 13 | AB5500_DEVID_LEDS, | ||
| 14 | AB5500_DEVID_POWER, | ||
| 15 | AB5500_DEVID_REGULATORS, | ||
| 16 | AB5500_DEVID_SIM, | ||
| 17 | AB5500_DEVID_RTC, | ||
| 18 | AB5500_DEVID_CHARGER, | ||
| 19 | AB5500_DEVID_FUELGAUGE, | ||
| 20 | AB5500_DEVID_VIBRATOR, | ||
| 21 | AB5500_DEVID_CODEC, | ||
| 22 | AB5500_DEVID_USB, | ||
| 23 | AB5500_DEVID_OTP, | ||
| 24 | AB5500_DEVID_VIDEO, | ||
| 25 | AB5500_DEVID_DBIECI, | ||
| 26 | AB5500_DEVID_ONSWA, | ||
| 27 | AB5500_NUM_DEVICES, | ||
| 28 | }; | ||
| 29 | |||
| 30 | enum ab5500_banks { | ||
| 31 | AB5500_BANK_VIT_IO_I2C_CLK_TST_OTP = 0, | ||
| 32 | AB5500_BANK_VDDDIG_IO_I2C_CLK_TST = 1, | ||
| 33 | AB5500_BANK_VDENC = 2, | ||
| 34 | AB5500_BANK_SIM_USBSIM = 3, | ||
| 35 | AB5500_BANK_LED = 4, | ||
| 36 | AB5500_BANK_ADC = 5, | ||
| 37 | AB5500_BANK_RTC = 6, | ||
| 38 | AB5500_BANK_STARTUP = 7, | ||
| 39 | AB5500_BANK_DBI_ECI = 8, | ||
| 40 | AB5500_BANK_CHG = 9, | ||
| 41 | AB5500_BANK_FG_BATTCOM_ACC = 10, | ||
| 42 | AB5500_BANK_USB = 11, | ||
| 43 | AB5500_BANK_IT = 12, | ||
| 44 | AB5500_BANK_VIBRA = 13, | ||
| 45 | AB5500_BANK_AUDIO_HEADSETUSB = 14, | ||
| 46 | AB5500_NUM_BANKS = 15, | ||
| 47 | }; | ||
| 48 | |||
| 49 | enum ab5500_banks_addr { | ||
| 50 | AB5500_ADDR_VIT_IO_I2C_CLK_TST_OTP = 0x4A, | ||
| 51 | AB5500_ADDR_VDDDIG_IO_I2C_CLK_TST = 0x4B, | ||
| 52 | AB5500_ADDR_VDENC = 0x06, | ||
| 53 | AB5500_ADDR_SIM_USBSIM = 0x04, | ||
| 54 | AB5500_ADDR_LED = 0x10, | ||
| 55 | AB5500_ADDR_ADC = 0x0A, | ||
| 56 | AB5500_ADDR_RTC = 0x0F, | ||
| 57 | AB5500_ADDR_STARTUP = 0x03, | ||
| 58 | AB5500_ADDR_DBI_ECI = 0x07, | ||
| 59 | AB5500_ADDR_CHG = 0x0B, | ||
| 60 | AB5500_ADDR_FG_BATTCOM_ACC = 0x0C, | ||
| 61 | AB5500_ADDR_USB = 0x05, | ||
| 62 | AB5500_ADDR_IT = 0x0E, | ||
| 63 | AB5500_ADDR_VIBRA = 0x02, | ||
| 64 | AB5500_ADDR_AUDIO_HEADSETUSB = 0x0D, | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* | ||
| 68 | * Interrupt register offsets | ||
| 69 | * Bank : 0x0E | ||
| 70 | */ | ||
| 71 | #define AB5500_IT_SOURCE0_REG 0x20 | ||
| 72 | #define AB5500_IT_SOURCE1_REG 0x21 | ||
| 73 | #define AB5500_IT_SOURCE2_REG 0x22 | ||
| 74 | #define AB5500_IT_SOURCE3_REG 0x23 | ||
| 75 | #define AB5500_IT_SOURCE4_REG 0x24 | ||
| 76 | #define AB5500_IT_SOURCE5_REG 0x25 | ||
| 77 | #define AB5500_IT_SOURCE6_REG 0x26 | ||
| 78 | #define AB5500_IT_SOURCE7_REG 0x27 | ||
| 79 | #define AB5500_IT_SOURCE8_REG 0x28 | ||
| 80 | #define AB5500_IT_SOURCE9_REG 0x29 | ||
| 81 | #define AB5500_IT_SOURCE10_REG 0x2A | ||
| 82 | #define AB5500_IT_SOURCE11_REG 0x2B | ||
| 83 | #define AB5500_IT_SOURCE12_REG 0x2C | ||
| 84 | #define AB5500_IT_SOURCE13_REG 0x2D | ||
| 85 | #define AB5500_IT_SOURCE14_REG 0x2E | ||
| 86 | #define AB5500_IT_SOURCE15_REG 0x2F | ||
| 87 | #define AB5500_IT_SOURCE16_REG 0x30 | ||
| 88 | #define AB5500_IT_SOURCE17_REG 0x31 | ||
| 89 | #define AB5500_IT_SOURCE18_REG 0x32 | ||
| 90 | #define AB5500_IT_SOURCE19_REG 0x33 | ||
| 91 | #define AB5500_IT_SOURCE20_REG 0x34 | ||
| 92 | #define AB5500_IT_SOURCE21_REG 0x35 | ||
| 93 | #define AB5500_IT_SOURCE22_REG 0x36 | ||
| 94 | #define AB5500_IT_SOURCE23_REG 0x37 | ||
| 95 | |||
| 96 | #define AB5500_NUM_IRQ_REGS 23 | ||
| 97 | |||
| 98 | /** | ||
| 99 | * struct ab5500 | ||
| 100 | * @access_mutex: lock out concurrent accesses to the AB registers | ||
| 101 | * @dev: a pointer to the device struct for this chip driver | ||
| 102 | * @ab5500_irq: the analog baseband irq | ||
| 103 | * @irq_base: the platform configuration irq base for subdevices | ||
| 104 | * @chip_name: name of this chip variant | ||
| 105 | * @chip_id: 8 bit chip ID for this chip variant | ||
| 106 | * @irq_lock: a lock to protect the mask | ||
| 107 | * @abb_events: a local bit mask of the prcmu wakeup events | ||
| 108 | * @event_mask: a local copy of the mask event registers | ||
| 109 | * @last_event_mask: a copy of the last event_mask written to hardware | ||
| 110 | * @startup_events: a copy of the first reading of the event registers | ||
| 111 | * @startup_events_read: whether the first events have been read | ||
| 112 | */ | ||
| 113 | struct ab5500 { | ||
| 114 | struct mutex access_mutex; | ||
| 115 | struct device *dev; | ||
| 116 | unsigned int ab5500_irq; | ||
| 117 | unsigned int irq_base; | ||
| 118 | char chip_name[32]; | ||
| 119 | u8 chip_id; | ||
| 120 | struct mutex irq_lock; | ||
| 121 | u32 abb_events; | ||
| 122 | u8 mask[AB5500_NUM_IRQ_REGS]; | ||
| 123 | u8 oldmask[AB5500_NUM_IRQ_REGS]; | ||
| 124 | u8 startup_events[AB5500_NUM_IRQ_REGS]; | ||
| 125 | bool startup_events_read; | ||
| 126 | #ifdef CONFIG_DEBUG_FS | ||
| 127 | unsigned int debug_bank; | ||
| 128 | unsigned int debug_address; | ||
| 129 | #endif | ||
| 130 | }; | ||
| 131 | |||
| 132 | struct ab5500_platform_data { | ||
| 133 | struct {unsigned int base; unsigned int count; } irq; | ||
| 134 | void *dev_data[AB5500_NUM_DEVICES]; | ||
| 135 | struct abx500_init_settings *init_settings; | ||
| 136 | unsigned int init_settings_sz; | ||
| 137 | bool pm_power_off; | ||
| 138 | }; | ||
| 139 | |||
| 140 | #endif /* MFD_AB5500_H */ | ||
diff --git a/include/linux/mfd/abx500/ab8500-gpadc.h b/include/linux/mfd/abx500/ab8500-gpadc.h new file mode 100644 index 000000000000..252966769d93 --- /dev/null +++ b/include/linux/mfd/abx500/ab8500-gpadc.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 ST-Ericsson SA | ||
| 3 | * Licensed under GPLv2. | ||
| 4 | * | ||
| 5 | * Author: Arun R Murthy <arun.murthy@stericsson.com> | ||
| 6 | * Author: Daniel Willerud <daniel.willerud@stericsson.com> | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _AB8500_GPADC_H | ||
| 10 | #define _AB8500_GPADC_H | ||
| 11 | |||
| 12 | /* GPADC source: From datasheet(ADCSwSel[4:0] in GPADCCtrl2) */ | ||
| 13 | #define BAT_CTRL 0x01 | ||
| 14 | #define BTEMP_BALL 0x02 | ||
| 15 | #define MAIN_CHARGER_V 0x03 | ||
| 16 | #define ACC_DETECT1 0x04 | ||
| 17 | #define ACC_DETECT2 0x05 | ||
| 18 | #define ADC_AUX1 0x06 | ||
| 19 | #define ADC_AUX2 0x07 | ||
| 20 | #define MAIN_BAT_V 0x08 | ||
| 21 | #define VBUS_V 0x09 | ||
| 22 | #define MAIN_CHARGER_C 0x0A | ||
| 23 | #define USB_CHARGER_C 0x0B | ||
| 24 | #define BK_BAT_V 0x0C | ||
| 25 | #define DIE_TEMP 0x0D | ||
| 26 | |||
| 27 | struct ab8500_gpadc; | ||
| 28 | |||
| 29 | struct ab8500_gpadc *ab8500_gpadc_get(char *name); | ||
| 30 | int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 channel); | ||
| 31 | int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel); | ||
| 32 | int ab8500_gpadc_ad_to_voltage(struct ab8500_gpadc *gpadc, | ||
| 33 | u8 channel, int ad_value); | ||
| 34 | |||
| 35 | #endif /* _AB8500_GPADC_H */ | ||
diff --git a/include/linux/mfd/abx500/ab8500-gpio.h b/include/linux/mfd/abx500/ab8500-gpio.h new file mode 100644 index 000000000000..488a8c920a29 --- /dev/null +++ b/include/linux/mfd/abx500/ab8500-gpio.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * Copyright ST-Ericsson 2010. | ||
| 3 | * | ||
| 4 | * Author: Bibek Basu <bibek.basu@stericsson.com> | ||
| 5 | * Licensed under GPLv2. | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef _AB8500_GPIO_H | ||
| 9 | #define _AB8500_GPIO_H | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Platform data to register a block: only the initial gpio/irq number. | ||
| 13 | */ | ||
| 14 | |||
| 15 | struct ab8500_gpio_platform_data { | ||
| 16 | int gpio_base; | ||
| 17 | u32 irq_base; | ||
| 18 | u8 config_reg[7]; | ||
| 19 | }; | ||
| 20 | |||
| 21 | #endif /* _AB8500_GPIO_H */ | ||
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h new file mode 100644 index 000000000000..10da0291f8f8 --- /dev/null +++ b/include/linux/mfd/abx500/ab8500-sysctrl.h | |||
| @@ -0,0 +1,254 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson SA 2010 | ||
| 3 | * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com> for ST Ericsson. | ||
| 4 | * License terms: GNU General Public License (GPL) version 2 | ||
| 5 | */ | ||
| 6 | #ifndef __AB8500_SYSCTRL_H | ||
| 7 | #define __AB8500_SYSCTRL_H | ||
| 8 | |||
| 9 | #include <linux/bitops.h> | ||
| 10 | |||
| 11 | #ifdef CONFIG_AB8500_CORE | ||
| 12 | |||
| 13 | int ab8500_sysctrl_read(u16 reg, u8 *value); | ||
| 14 | int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); | ||
| 15 | |||
| 16 | #else | ||
| 17 | |||
| 18 | static inline int ab8500_sysctrl_read(u16 reg, u8 *value) | ||
| 19 | { | ||
| 20 | return 0; | ||
| 21 | } | ||
| 22 | |||
| 23 | static inline int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value) | ||
| 24 | { | ||
| 25 | return 0; | ||
| 26 | } | ||
| 27 | |||
| 28 | #endif /* CONFIG_AB8500_CORE */ | ||
| 29 | |||
| 30 | static inline int ab8500_sysctrl_set(u16 reg, u8 bits) | ||
| 31 | { | ||
| 32 | return ab8500_sysctrl_write(reg, bits, bits); | ||
| 33 | } | ||
| 34 | |||
| 35 | static inline int ab8500_sysctrl_clear(u16 reg, u8 bits) | ||
| 36 | { | ||
| 37 | return ab8500_sysctrl_write(reg, bits, 0); | ||
| 38 | } | ||
| 39 | |||
| 40 | /* Registers */ | ||
| 41 | #define AB8500_TURNONSTATUS 0x100 | ||
| 42 | #define AB8500_RESETSTATUS 0x101 | ||
| 43 | #define AB8500_PONKEY1PRESSSTATUS 0x102 | ||
| 44 | #define AB8500_SYSCLKREQSTATUS 0x142 | ||
| 45 | #define AB8500_STW4500CTRL1 0x180 | ||
| 46 | #define AB8500_STW4500CTRL2 0x181 | ||
| 47 | #define AB8500_STW4500CTRL3 0x200 | ||
| 48 | #define AB8500_MAINWDOGCTRL 0x201 | ||
| 49 | #define AB8500_MAINWDOGTIMER 0x202 | ||
| 50 | #define AB8500_LOWBAT 0x203 | ||
| 51 | #define AB8500_BATTOK 0x204 | ||
| 52 | #define AB8500_SYSCLKTIMER 0x205 | ||
| 53 | #define AB8500_SMPSCLKCTRL 0x206 | ||
| 54 | #define AB8500_SMPSCLKSEL1 0x207 | ||
| 55 | #define AB8500_SMPSCLKSEL2 0x208 | ||
| 56 | #define AB8500_SMPSCLKSEL3 0x209 | ||
| 57 | #define AB8500_SYSULPCLKCONF 0x20A | ||
| 58 | #define AB8500_SYSULPCLKCTRL1 0x20B | ||
| 59 | #define AB8500_SYSCLKCTRL 0x20C | ||
| 60 | #define AB8500_SYSCLKREQ1VALID 0x20D | ||
| 61 | #define AB8500_SYSTEMCTRLSUP 0x20F | ||
| 62 | #define AB8500_SYSCLKREQ1RFCLKBUF 0x210 | ||
| 63 | #define AB8500_SYSCLKREQ2RFCLKBUF 0x211 | ||
| 64 | #define AB8500_SYSCLKREQ3RFCLKBUF 0x212 | ||
| 65 | #define AB8500_SYSCLKREQ4RFCLKBUF 0x213 | ||
| 66 | #define AB8500_SYSCLKREQ5RFCLKBUF 0x214 | ||
| 67 | #define AB8500_SYSCLKREQ6RFCLKBUF 0x215 | ||
| 68 | #define AB8500_SYSCLKREQ7RFCLKBUF 0x216 | ||
| 69 | #define AB8500_SYSCLKREQ8RFCLKBUF 0x217 | ||
| 70 | #define AB8500_DITHERCLKCTRL 0x220 | ||
| 71 | #define AB8500_SWATCTRL 0x230 | ||
| 72 | #define AB8500_HIQCLKCTRL 0x232 | ||
| 73 | #define AB8500_VSIMSYSCLKCTRL 0x233 | ||
| 74 | |||
| 75 | /* Bits */ | ||
| 76 | #define AB8500_TURNONSTATUS_PORNVBAT BIT(0) | ||
| 77 | #define AB8500_TURNONSTATUS_PONKEY1DBF BIT(1) | ||
| 78 | #define AB8500_TURNONSTATUS_PONKEY2DBF BIT(2) | ||
| 79 | #define AB8500_TURNONSTATUS_RTCALARM BIT(3) | ||
| 80 | #define AB8500_TURNONSTATUS_MAINCHDET BIT(4) | ||
| 81 | #define AB8500_TURNONSTATUS_VBUSDET BIT(5) | ||
| 82 | #define AB8500_TURNONSTATUS_USBIDDETECT BIT(6) | ||
| 83 | |||
| 84 | #define AB8500_RESETSTATUS_RESETN4500NSTATUS BIT(0) | ||
| 85 | #define AB8500_RESETSTATUS_SWRESETN4500NSTATUS BIT(2) | ||
| 86 | |||
| 87 | #define AB8500_PONKEY1PRESSSTATUS_PONKEY1PRESSTIME_MASK 0x7F | ||
| 88 | #define AB8500_PONKEY1PRESSSTATUS_PONKEY1PRESSTIME_SHIFT 0 | ||
| 89 | |||
| 90 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ1STATUS BIT(0) | ||
| 91 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ2STATUS BIT(1) | ||
| 92 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ3STATUS BIT(2) | ||
| 93 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ4STATUS BIT(3) | ||
| 94 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ5STATUS BIT(4) | ||
| 95 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ6STATUS BIT(5) | ||
| 96 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ7STATUS BIT(6) | ||
| 97 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ8STATUS BIT(7) | ||
| 98 | |||
| 99 | #define AB8500_STW4500CTRL1_SWOFF BIT(0) | ||
| 100 | #define AB8500_STW4500CTRL1_SWRESET4500N BIT(1) | ||
| 101 | #define AB8500_STW4500CTRL1_THDB8500SWOFF BIT(2) | ||
| 102 | |||
| 103 | #define AB8500_STW4500CTRL2_RESETNVAUX1VALID BIT(0) | ||
| 104 | #define AB8500_STW4500CTRL2_RESETNVAUX2VALID BIT(1) | ||
| 105 | #define AB8500_STW4500CTRL2_RESETNVAUX3VALID BIT(2) | ||
| 106 | #define AB8500_STW4500CTRL2_RESETNVMODVALID BIT(3) | ||
| 107 | #define AB8500_STW4500CTRL2_RESETNVEXTSUPPLY1VALID BIT(4) | ||
| 108 | #define AB8500_STW4500CTRL2_RESETNVEXTSUPPLY2VALID BIT(5) | ||
| 109 | #define AB8500_STW4500CTRL2_RESETNVEXTSUPPLY3VALID BIT(6) | ||
| 110 | #define AB8500_STW4500CTRL2_RESETNVSMPS1VALID BIT(7) | ||
| 111 | |||
| 112 | #define AB8500_STW4500CTRL3_CLK32KOUT2DIS BIT(0) | ||
| 113 | #define AB8500_STW4500CTRL3_RESETAUDN BIT(1) | ||
| 114 | #define AB8500_STW4500CTRL3_RESETDENCN BIT(2) | ||
| 115 | #define AB8500_STW4500CTRL3_THSDENA BIT(3) | ||
| 116 | |||
| 117 | #define AB8500_MAINWDOGCTRL_MAINWDOGENA BIT(0) | ||
| 118 | #define AB8500_MAINWDOGCTRL_MAINWDOGKICK BIT(1) | ||
| 119 | #define AB8500_MAINWDOGCTRL_WDEXPTURNONVALID BIT(4) | ||
| 120 | |||
| 121 | #define AB8500_MAINWDOGTIMER_MAINWDOGTIMER_MASK 0x7F | ||
| 122 | #define AB8500_MAINWDOGTIMER_MAINWDOGTIMER_SHIFT 0 | ||
| 123 | |||
| 124 | #define AB8500_LOWBAT_LOWBATENA BIT(0) | ||
| 125 | #define AB8500_LOWBAT_LOWBAT_MASK 0x7E | ||
| 126 | #define AB8500_LOWBAT_LOWBAT_SHIFT 1 | ||
| 127 | |||
| 128 | #define AB8500_BATTOK_BATTOKSEL0THF_MASK 0x0F | ||
| 129 | #define AB8500_BATTOK_BATTOKSEL0THF_SHIFT 0 | ||
| 130 | #define AB8500_BATTOK_BATTOKSEL1THF_MASK 0xF0 | ||
| 131 | #define AB8500_BATTOK_BATTOKSEL1THF_SHIFT 4 | ||
| 132 | |||
| 133 | #define AB8500_SYSCLKTIMER_SYSCLKTIMER_MASK 0x0F | ||
| 134 | #define AB8500_SYSCLKTIMER_SYSCLKTIMER_SHIFT 0 | ||
| 135 | #define AB8500_SYSCLKTIMER_SYSCLKTIMERADJ_MASK 0xF0 | ||
| 136 | #define AB8500_SYSCLKTIMER_SYSCLKTIMERADJ_SHIFT 4 | ||
| 137 | |||
| 138 | #define AB8500_SMPSCLKCTRL_SMPSCLKINTSEL_MASK 0x03 | ||
| 139 | #define AB8500_SMPSCLKCTRL_SMPSCLKINTSEL_SHIFT 0 | ||
| 140 | #define AB8500_SMPSCLKCTRL_3M2CLKINTENA BIT(2) | ||
| 141 | |||
| 142 | #define AB8500_SMPSCLKSEL1_VARMCLKSEL_MASK 0x07 | ||
| 143 | #define AB8500_SMPSCLKSEL1_VARMCLKSEL_SHIFT 0 | ||
| 144 | #define AB8500_SMPSCLKSEL1_VAPECLKSEL_MASK 0x38 | ||
| 145 | #define AB8500_SMPSCLKSEL1_VAPECLKSEL_SHIFT 3 | ||
| 146 | |||
| 147 | #define AB8500_SMPSCLKSEL2_VMODCLKSEL_MASK 0x07 | ||
| 148 | #define AB8500_SMPSCLKSEL2_VMODCLKSEL_SHIFT 0 | ||
| 149 | #define AB8500_SMPSCLKSEL2_VSMPS1CLKSEL_MASK 0x38 | ||
| 150 | #define AB8500_SMPSCLKSEL2_VSMPS1CLKSEL_SHIFT 3 | ||
| 151 | |||
| 152 | #define AB8500_SMPSCLKSEL3_VSMPS2CLKSEL_MASK 0x07 | ||
| 153 | #define AB8500_SMPSCLKSEL3_VSMPS2CLKSEL_SHIFT 0 | ||
| 154 | #define AB8500_SMPSCLKSEL3_VSMPS3CLKSEL_MASK 0x38 | ||
| 155 | #define AB8500_SMPSCLKSEL3_VSMPS3CLKSEL_SHIFT 3 | ||
| 156 | |||
| 157 | #define AB8500_SYSULPCLKCONF_ULPCLKCONF_MASK 0x03 | ||
| 158 | #define AB8500_SYSULPCLKCONF_ULPCLKCONF_SHIFT 0 | ||
| 159 | #define AB8500_SYSULPCLKCONF_CLK27MHZSTRE BIT(2) | ||
| 160 | #define AB8500_SYSULPCLKCONF_TVOUTCLKDELN BIT(3) | ||
| 161 | #define AB8500_SYSULPCLKCONF_TVOUTCLKINV BIT(4) | ||
| 162 | #define AB8500_SYSULPCLKCONF_ULPCLKSTRE BIT(5) | ||
| 163 | #define AB8500_SYSULPCLKCONF_CLK27MHZBUFENA BIT(6) | ||
| 164 | #define AB8500_SYSULPCLKCONF_CLK27MHZPDENA BIT(7) | ||
| 165 | |||
| 166 | #define AB8500_SYSULPCLKCTRL1_SYSULPCLKINTSEL_MASK 0x03 | ||
| 167 | #define AB8500_SYSULPCLKCTRL1_SYSULPCLKINTSEL_SHIFT 0 | ||
| 168 | #define AB8500_SYSULPCLKCTRL1_ULPCLKREQ BIT(2) | ||
| 169 | #define AB8500_SYSULPCLKCTRL1_4500SYSCLKREQ BIT(3) | ||
| 170 | #define AB8500_SYSULPCLKCTRL1_AUDIOCLKENA BIT(4) | ||
| 171 | #define AB8500_SYSULPCLKCTRL1_SYSCLKBUF2REQ BIT(5) | ||
| 172 | #define AB8500_SYSULPCLKCTRL1_SYSCLKBUF3REQ BIT(6) | ||
| 173 | #define AB8500_SYSULPCLKCTRL1_SYSCLKBUF4REQ BIT(7) | ||
| 174 | |||
| 175 | #define AB8500_SYSCLKCTRL_TVOUTPLLENA BIT(0) | ||
| 176 | #define AB8500_SYSCLKCTRL_TVOUTCLKENA BIT(1) | ||
| 177 | #define AB8500_SYSCLKCTRL_USBCLKENA BIT(2) | ||
| 178 | |||
| 179 | #define AB8500_SYSCLKREQ1VALID_SYSCLKREQ1VALID BIT(0) | ||
| 180 | #define AB8500_SYSCLKREQ1VALID_ULPCLKREQ1VALID BIT(1) | ||
| 181 | #define AB8500_SYSCLKREQ1VALID_USBSYSCLKREQ1VALID BIT(2) | ||
| 182 | |||
| 183 | #define AB8500_SYSTEMCTRLSUP_EXTSUP12LPNCLKSEL_MASK 0x03 | ||
| 184 | #define AB8500_SYSTEMCTRLSUP_EXTSUP12LPNCLKSEL_SHIFT 0 | ||
| 185 | #define AB8500_SYSTEMCTRLSUP_EXTSUP3LPNCLKSEL_MASK 0x0C | ||
| 186 | #define AB8500_SYSTEMCTRLSUP_EXTSUP3LPNCLKSEL_SHIFT 2 | ||
| 187 | #define AB8500_SYSTEMCTRLSUP_INTDB8500NOD BIT(4) | ||
| 188 | |||
| 189 | #define AB8500_SYSCLKREQ1RFCLKBUF_SYSCLKREQ1RFCLKBUF2 BIT(2) | ||
| 190 | #define AB8500_SYSCLKREQ1RFCLKBUF_SYSCLKREQ1RFCLKBUF3 BIT(3) | ||
| 191 | #define AB8500_SYSCLKREQ1RFCLKBUF_SYSCLKREQ1RFCLKBUF4 BIT(4) | ||
| 192 | |||
| 193 | #define AB8500_SYSCLKREQ2RFCLKBUF_SYSCLKREQ2RFCLKBUF2 BIT(2) | ||
| 194 | #define AB8500_SYSCLKREQ2RFCLKBUF_SYSCLKREQ2RFCLKBUF3 BIT(3) | ||
| 195 | #define AB8500_SYSCLKREQ2RFCLKBUF_SYSCLKREQ2RFCLKBUF4 BIT(4) | ||
| 196 | |||
| 197 | #define AB8500_SYSCLKREQ3RFCLKBUF_SYSCLKREQ3RFCLKBUF2 BIT(2) | ||
| 198 | #define AB8500_SYSCLKREQ3RFCLKBUF_SYSCLKREQ3RFCLKBUF3 BIT(3) | ||
| 199 | #define AB8500_SYSCLKREQ3RFCLKBUF_SYSCLKREQ3RFCLKBUF4 BIT(4) | ||
| 200 | |||
| 201 | #define AB8500_SYSCLKREQ4RFCLKBUF_SYSCLKREQ4RFCLKBUF2 BIT(2) | ||
| 202 | #define AB8500_SYSCLKREQ4RFCLKBUF_SYSCLKREQ4RFCLKBUF3 BIT(3) | ||
| 203 | #define AB8500_SYSCLKREQ4RFCLKBUF_SYSCLKREQ4RFCLKBUF4 BIT(4) | ||
| 204 | |||
| 205 | #define AB8500_SYSCLKREQ5RFCLKBUF_SYSCLKREQ5RFCLKBUF2 BIT(2) | ||
| 206 | #define AB8500_SYSCLKREQ5RFCLKBUF_SYSCLKREQ5RFCLKBUF3 BIT(3) | ||
| 207 | #define AB8500_SYSCLKREQ5RFCLKBUF_SYSCLKREQ5RFCLKBUF4 BIT(4) | ||
| 208 | |||
| 209 | #define AB8500_SYSCLKREQ6RFCLKBUF_SYSCLKREQ6RFCLKBUF2 BIT(2) | ||
| 210 | #define AB8500_SYSCLKREQ6RFCLKBUF_SYSCLKREQ6RFCLKBUF3 BIT(3) | ||
| 211 | #define AB8500_SYSCLKREQ6RFCLKBUF_SYSCLKREQ6RFCLKBUF4 BIT(4) | ||
| 212 | |||
| 213 | #define AB8500_SYSCLKREQ7RFCLKBUF_SYSCLKREQ7RFCLKBUF2 BIT(2) | ||
| 214 | #define AB8500_SYSCLKREQ7RFCLKBUF_SYSCLKREQ7RFCLKBUF3 BIT(3) | ||
| 215 | #define AB8500_SYSCLKREQ7RFCLKBUF_SYSCLKREQ7RFCLKBUF4 BIT(4) | ||
| 216 | |||
| 217 | #define AB8500_SYSCLKREQ8RFCLKBUF_SYSCLKREQ8RFCLKBUF2 BIT(2) | ||
| 218 | #define AB8500_SYSCLKREQ8RFCLKBUF_SYSCLKREQ8RFCLKBUF3 BIT(3) | ||
| 219 | #define AB8500_SYSCLKREQ8RFCLKBUF_SYSCLKREQ8RFCLKBUF4 BIT(4) | ||
| 220 | |||
| 221 | #define AB8500_DITHERCLKCTRL_VARMDITHERENA BIT(0) | ||
| 222 | #define AB8500_DITHERCLKCTRL_VSMPS3DITHERENA BIT(1) | ||
| 223 | #define AB8500_DITHERCLKCTRL_VSMPS1DITHERENA BIT(2) | ||
| 224 | #define AB8500_DITHERCLKCTRL_VSMPS2DITHERENA BIT(3) | ||
| 225 | #define AB8500_DITHERCLKCTRL_VMODDITHERENA BIT(4) | ||
| 226 | #define AB8500_DITHERCLKCTRL_VAPEDITHERENA BIT(5) | ||
| 227 | #define AB8500_DITHERCLKCTRL_DITHERDEL_MASK 0xC0 | ||
| 228 | #define AB8500_DITHERCLKCTRL_DITHERDEL_SHIFT 6 | ||
| 229 | |||
| 230 | #define AB8500_SWATCTRL_UPDATERF BIT(0) | ||
| 231 | #define AB8500_SWATCTRL_SWATENABLE BIT(1) | ||
| 232 | #define AB8500_SWATCTRL_RFOFFTIMER_MASK 0x1C | ||
| 233 | #define AB8500_SWATCTRL_RFOFFTIMER_SHIFT 2 | ||
| 234 | #define AB8500_SWATCTRL_SWATBIT5 BIT(6) | ||
| 235 | |||
| 236 | #define AB8500_HIQCLKCTRL_SYSCLKREQ1HIQENAVALID BIT(0) | ||
| 237 | #define AB8500_HIQCLKCTRL_SYSCLKREQ2HIQENAVALID BIT(1) | ||
| 238 | #define AB8500_HIQCLKCTRL_SYSCLKREQ3HIQENAVALID BIT(2) | ||
| 239 | #define AB8500_HIQCLKCTRL_SYSCLKREQ4HIQENAVALID BIT(3) | ||
| 240 | #define AB8500_HIQCLKCTRL_SYSCLKREQ5HIQENAVALID BIT(4) | ||
| 241 | #define AB8500_HIQCLKCTRL_SYSCLKREQ6HIQENAVALID BIT(5) | ||
| 242 | #define AB8500_HIQCLKCTRL_SYSCLKREQ7HIQENAVALID BIT(6) | ||
| 243 | #define AB8500_HIQCLKCTRL_SYSCLKREQ8HIQENAVALID BIT(7) | ||
| 244 | |||
| 245 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ1VALID BIT(0) | ||
| 246 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ2VALID BIT(1) | ||
| 247 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ3VALID BIT(2) | ||
| 248 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ4VALID BIT(3) | ||
| 249 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ5VALID BIT(4) | ||
| 250 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ6VALID BIT(5) | ||
| 251 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ7VALID BIT(6) | ||
| 252 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ8VALID BIT(7) | ||
| 253 | |||
| 254 | #endif /* __AB8500_SYSCTRL_H */ | ||
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h new file mode 100644 index 000000000000..838c6b487cc5 --- /dev/null +++ b/include/linux/mfd/abx500/ab8500.h | |||
| @@ -0,0 +1,201 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson SA 2010 | ||
| 3 | * | ||
| 4 | * License Terms: GNU General Public License v2 | ||
| 5 | * Author: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> | ||
| 6 | */ | ||
| 7 | #ifndef MFD_AB8500_H | ||
| 8 | #define MFD_AB8500_H | ||
| 9 | |||
| 10 | #include <linux/device.h> | ||
| 11 | |||
| 12 | /* | ||
| 13 | * AB8500 bank addresses | ||
| 14 | */ | ||
| 15 | #define AB8500_SYS_CTRL1_BLOCK 0x1 | ||
| 16 | #define AB8500_SYS_CTRL2_BLOCK 0x2 | ||
| 17 | #define AB8500_REGU_CTRL1 0x3 | ||
| 18 | #define AB8500_REGU_CTRL2 0x4 | ||
| 19 | #define AB8500_USB 0x5 | ||
| 20 | #define AB8500_TVOUT 0x6 | ||
| 21 | #define AB8500_DBI 0x7 | ||
| 22 | #define AB8500_ECI_AV_ACC 0x8 | ||
| 23 | #define AB8500_RESERVED 0x9 | ||
| 24 | #define AB8500_GPADC 0xA | ||
| 25 | #define AB8500_CHARGER 0xB | ||
| 26 | #define AB8500_GAS_GAUGE 0xC | ||
| 27 | #define AB8500_AUDIO 0xD | ||
| 28 | #define AB8500_INTERRUPT 0xE | ||
| 29 | #define AB8500_RTC 0xF | ||
| 30 | #define AB8500_MISC 0x10 | ||
| 31 | #define AB8500_DEVELOPMENT 0x11 | ||
| 32 | #define AB8500_DEBUG 0x12 | ||
| 33 | #define AB8500_PROD_TEST 0x13 | ||
| 34 | #define AB8500_OTP_EMUL 0x15 | ||
| 35 | |||
| 36 | /* | ||
| 37 | * Interrupts | ||
| 38 | */ | ||
| 39 | |||
| 40 | #define AB8500_INT_MAIN_EXT_CH_NOT_OK 0 | ||
| 41 | #define AB8500_INT_UN_PLUG_TV_DET 1 | ||
| 42 | #define AB8500_INT_PLUG_TV_DET 2 | ||
| 43 | #define AB8500_INT_TEMP_WARM 3 | ||
| 44 | #define AB8500_INT_PON_KEY2DB_F 4 | ||
| 45 | #define AB8500_INT_PON_KEY2DB_R 5 | ||
| 46 | #define AB8500_INT_PON_KEY1DB_F 6 | ||
| 47 | #define AB8500_INT_PON_KEY1DB_R 7 | ||
| 48 | #define AB8500_INT_BATT_OVV 8 | ||
| 49 | #define AB8500_INT_MAIN_CH_UNPLUG_DET 10 | ||
| 50 | #define AB8500_INT_MAIN_CH_PLUG_DET 11 | ||
| 51 | #define AB8500_INT_USB_ID_DET_F 12 | ||
| 52 | #define AB8500_INT_USB_ID_DET_R 13 | ||
| 53 | #define AB8500_INT_VBUS_DET_F 14 | ||
| 54 | #define AB8500_INT_VBUS_DET_R 15 | ||
| 55 | #define AB8500_INT_VBUS_CH_DROP_END 16 | ||
| 56 | #define AB8500_INT_RTC_60S 17 | ||
| 57 | #define AB8500_INT_RTC_ALARM 18 | ||
| 58 | #define AB8500_INT_BAT_CTRL_INDB 20 | ||
| 59 | #define AB8500_INT_CH_WD_EXP 21 | ||
| 60 | #define AB8500_INT_VBUS_OVV 22 | ||
| 61 | #define AB8500_INT_MAIN_CH_DROP_END 23 | ||
| 62 | #define AB8500_INT_CCN_CONV_ACC 24 | ||
| 63 | #define AB8500_INT_INT_AUD 25 | ||
| 64 | #define AB8500_INT_CCEOC 26 | ||
| 65 | #define AB8500_INT_CC_INT_CALIB 27 | ||
| 66 | #define AB8500_INT_LOW_BAT_F 28 | ||
| 67 | #define AB8500_INT_LOW_BAT_R 29 | ||
| 68 | #define AB8500_INT_BUP_CHG_NOT_OK 30 | ||
| 69 | #define AB8500_INT_BUP_CHG_OK 31 | ||
| 70 | #define AB8500_INT_GP_HW_ADC_CONV_END 32 | ||
| 71 | #define AB8500_INT_ACC_DETECT_1DB_F 33 | ||
| 72 | #define AB8500_INT_ACC_DETECT_1DB_R 34 | ||
| 73 | #define AB8500_INT_ACC_DETECT_22DB_F 35 | ||
| 74 | #define AB8500_INT_ACC_DETECT_22DB_R 36 | ||
| 75 | #define AB8500_INT_ACC_DETECT_21DB_F 37 | ||
| 76 | #define AB8500_INT_ACC_DETECT_21DB_R 38 | ||
| 77 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 | ||
| 78 | #define AB8500_INT_GPIO6R 40 | ||
| 79 | #define AB8500_INT_GPIO7R 41 | ||
| 80 | #define AB8500_INT_GPIO8R 42 | ||
| 81 | #define AB8500_INT_GPIO9R 43 | ||
| 82 | #define AB8500_INT_GPIO10R 44 | ||
| 83 | #define AB8500_INT_GPIO11R 45 | ||
| 84 | #define AB8500_INT_GPIO12R 46 | ||
| 85 | #define AB8500_INT_GPIO13R 47 | ||
| 86 | #define AB8500_INT_GPIO24R 48 | ||
| 87 | #define AB8500_INT_GPIO25R 49 | ||
| 88 | #define AB8500_INT_GPIO36R 50 | ||
| 89 | #define AB8500_INT_GPIO37R 51 | ||
| 90 | #define AB8500_INT_GPIO38R 52 | ||
| 91 | #define AB8500_INT_GPIO39R 53 | ||
| 92 | #define AB8500_INT_GPIO40R 54 | ||
| 93 | #define AB8500_INT_GPIO41R 55 | ||
| 94 | #define AB8500_INT_GPIO6F 56 | ||
| 95 | #define AB8500_INT_GPIO7F 57 | ||
| 96 | #define AB8500_INT_GPIO8F 58 | ||
| 97 | #define AB8500_INT_GPIO9F 59 | ||
| 98 | #define AB8500_INT_GPIO10F 60 | ||
| 99 | #define AB8500_INT_GPIO11F 61 | ||
| 100 | #define AB8500_INT_GPIO12F 62 | ||
| 101 | #define AB8500_INT_GPIO13F 63 | ||
| 102 | #define AB8500_INT_GPIO24F 64 | ||
| 103 | #define AB8500_INT_GPIO25F 65 | ||
| 104 | #define AB8500_INT_GPIO36F 66 | ||
| 105 | #define AB8500_INT_GPIO37F 67 | ||
| 106 | #define AB8500_INT_GPIO38F 68 | ||
| 107 | #define AB8500_INT_GPIO39F 69 | ||
| 108 | #define AB8500_INT_GPIO40F 70 | ||
| 109 | #define AB8500_INT_GPIO41F 71 | ||
| 110 | #define AB8500_INT_ADP_SOURCE_ERROR 72 | ||
| 111 | #define AB8500_INT_ADP_SINK_ERROR 73 | ||
| 112 | #define AB8500_INT_ADP_PROBE_PLUG 74 | ||
| 113 | #define AB8500_INT_ADP_PROBE_UNPLUG 75 | ||
| 114 | #define AB8500_INT_ADP_SENSE_OFF 76 | ||
| 115 | #define AB8500_INT_USB_PHY_POWER_ERR 78 | ||
| 116 | #define AB8500_INT_USB_LINK_STATUS 79 | ||
| 117 | #define AB8500_INT_BTEMP_LOW 80 | ||
| 118 | #define AB8500_INT_BTEMP_LOW_MEDIUM 81 | ||
| 119 | #define AB8500_INT_BTEMP_MEDIUM_HIGH 82 | ||
| 120 | #define AB8500_INT_BTEMP_HIGH 83 | ||
| 121 | #define AB8500_INT_USB_CHARGER_NOT_OK 89 | ||
| 122 | #define AB8500_INT_ID_WAKEUP_R 90 | ||
| 123 | #define AB8500_INT_ID_DET_R1R 92 | ||
| 124 | #define AB8500_INT_ID_DET_R2R 93 | ||
| 125 | #define AB8500_INT_ID_DET_R3R 94 | ||
| 126 | #define AB8500_INT_ID_DET_R4R 95 | ||
| 127 | #define AB8500_INT_ID_WAKEUP_F 96 | ||
| 128 | #define AB8500_INT_ID_DET_R1F 98 | ||
| 129 | #define AB8500_INT_ID_DET_R2F 99 | ||
| 130 | #define AB8500_INT_ID_DET_R3F 100 | ||
| 131 | #define AB8500_INT_ID_DET_R4F 101 | ||
| 132 | #define AB8500_INT_USB_CHG_DET_DONE 102 | ||
| 133 | #define AB8500_INT_USB_CH_TH_PROT_F 104 | ||
| 134 | #define AB8500_INT_USB_CH_TH_PROT_R 105 | ||
| 135 | #define AB8500_INT_MAIN_CH_TH_PROT_F 106 | ||
| 136 | #define AB8500_INT_MAIN_CH_TH_PROT_R 107 | ||
| 137 | #define AB8500_INT_USB_CHARGER_NOT_OKF 111 | ||
| 138 | |||
| 139 | #define AB8500_NR_IRQS 112 | ||
| 140 | #define AB8500_NUM_IRQ_REGS 14 | ||
| 141 | |||
| 142 | /** | ||
| 143 | * struct ab8500 - ab8500 internal structure | ||
| 144 | * @dev: parent device | ||
| 145 | * @lock: read/write operations lock | ||
| 146 | * @irq_lock: genirq bus lock | ||
| 147 | * @irq: irq line | ||
| 148 | * @chip_id: chip revision id | ||
| 149 | * @write: register write | ||
| 150 | * @read: register read | ||
| 151 | * @rx_buf: rx buf for SPI | ||
| 152 | * @tx_buf: tx buf for SPI | ||
| 153 | * @mask: cache of IRQ regs for bus lock | ||
| 154 | * @oldmask: cache of previous IRQ regs for bus lock | ||
| 155 | */ | ||
| 156 | struct ab8500 { | ||
| 157 | struct device *dev; | ||
| 158 | struct mutex lock; | ||
| 159 | struct mutex irq_lock; | ||
| 160 | |||
| 161 | int irq_base; | ||
| 162 | int irq; | ||
| 163 | u8 chip_id; | ||
| 164 | |||
| 165 | int (*write) (struct ab8500 *a8500, u16 addr, u8 data); | ||
| 166 | int (*read) (struct ab8500 *a8500, u16 addr); | ||
| 167 | |||
| 168 | unsigned long tx_buf[4]; | ||
| 169 | unsigned long rx_buf[4]; | ||
| 170 | |||
| 171 | u8 mask[AB8500_NUM_IRQ_REGS]; | ||
| 172 | u8 oldmask[AB8500_NUM_IRQ_REGS]; | ||
| 173 | }; | ||
| 174 | |||
| 175 | struct regulator_reg_init; | ||
| 176 | struct regulator_init_data; | ||
| 177 | struct ab8500_gpio_platform_data; | ||
| 178 | |||
| 179 | /** | ||
| 180 | * struct ab8500_platform_data - AB8500 platform data | ||
| 181 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used | ||
| 182 | * @init: board-specific initialization after detection of ab8500 | ||
| 183 | * @num_regulator_reg_init: number of regulator init registers | ||
| 184 | * @regulator_reg_init: regulator init registers | ||
| 185 | * @num_regulator: number of regulators | ||
| 186 | * @regulator: machine-specific constraints for regulators | ||
| 187 | */ | ||
| 188 | struct ab8500_platform_data { | ||
| 189 | int irq_base; | ||
| 190 | void (*init) (struct ab8500 *); | ||
| 191 | int num_regulator_reg_init; | ||
| 192 | struct ab8500_regulator_reg_init *regulator_reg_init; | ||
| 193 | int num_regulator; | ||
| 194 | struct regulator_init_data *regulator; | ||
| 195 | struct ab8500_gpio_platform_data *gpio; | ||
| 196 | }; | ||
| 197 | |||
| 198 | extern int __devinit ab8500_init(struct ab8500 *ab8500); | ||
| 199 | extern int __devexit ab8500_exit(struct ab8500 *ab8500); | ||
| 200 | |||
| 201 | #endif /* MFD_AB8500_H */ | ||
