diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2012-02-20 15:42:17 -0500 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-03-06 12:46:42 -0500 |
| commit | 2ced445e2ddf65f484a489161accddf475676965 (patch) | |
| tree | 0163f95ef6a77963937c4b195f109ae52276e280 /include/linux | |
| parent | 0f620837595145cd42be1c9dc6b619146fbeaf88 (diff) | |
mfd: Parametrize ab8500 IRQ masks and registers
This makes the AB8500 state struct contain the IRQ mask and
register offsets previously hard-coded so as to make room for
more AB8500 variants.
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@stericsson.com>
Signed-off-by: Alex Macro <alex.macro@stericsson.com>
Signed-off-by: Michel Jaouen <michel.jaouen@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/abx500/ab8500.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 79892585c087..55eabe8b6ce6 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
| @@ -175,6 +175,9 @@ enum ab8500_version { | |||
| 175 | * @tx_buf: tx buf for SPI | 175 | * @tx_buf: tx buf for SPI |
| 176 | * @mask: cache of IRQ regs for bus lock | 176 | * @mask: cache of IRQ regs for bus lock |
| 177 | * @oldmask: cache of previous IRQ regs for bus lock | 177 | * @oldmask: cache of previous IRQ regs for bus lock |
| 178 | * @mask_size: Actual number of valid entries in mask[], oldmask[] and | ||
| 179 | * irq_reg_offset | ||
| 180 | * @irq_reg_offset: Array of offsets into IRQ registers | ||
| 178 | */ | 181 | */ |
| 179 | struct ab8500 { | 182 | struct ab8500 { |
| 180 | struct device *dev; | 183 | struct device *dev; |
| @@ -192,8 +195,10 @@ struct ab8500 { | |||
| 192 | unsigned long tx_buf[4]; | 195 | unsigned long tx_buf[4]; |
| 193 | unsigned long rx_buf[4]; | 196 | unsigned long rx_buf[4]; |
| 194 | 197 | ||
| 195 | u8 mask[AB8500_NUM_IRQ_REGS]; | 198 | u8 *mask; |
| 196 | u8 oldmask[AB8500_NUM_IRQ_REGS]; | 199 | u8 *oldmask; |
| 200 | int mask_size; | ||
| 201 | const int *irq_reg_offset; | ||
| 197 | }; | 202 | }; |
| 198 | 203 | ||
| 199 | struct regulator_reg_init; | 204 | struct regulator_reg_init; |
