diff options
Diffstat (limited to 'include/linux/mfd/abx500/ab8500.h')
-rw-r--r-- | include/linux/mfd/abx500/ab8500.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index fccc3002f271..91dd3ef63e99 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #ifndef MFD_AB8500_H | 7 | #ifndef MFD_AB8500_H |
8 | #define MFD_AB8500_H | 8 | #define MFD_AB8500_H |
9 | 9 | ||
10 | #include <linux/atomic.h> | ||
10 | #include <linux/mutex.h> | 11 | #include <linux/mutex.h> |
11 | 12 | ||
12 | struct device; | 13 | struct device; |
@@ -194,6 +195,14 @@ enum ab8500_version { | |||
194 | #define AB9540_INT_GPIO52F 123 | 195 | #define AB9540_INT_GPIO52F 123 |
195 | #define AB9540_INT_GPIO53F 124 | 196 | #define AB9540_INT_GPIO53F 124 |
196 | #define AB9540_INT_GPIO54F 125 /* not 8505 */ | 197 | #define AB9540_INT_GPIO54F 125 /* not 8505 */ |
198 | /* ab8500_irq_regoffset[16] -> IT[Source|Latch|Mask]25 */ | ||
199 | #define AB8505_INT_KEYSTUCK 128 | ||
200 | #define AB8505_INT_IKR 129 | ||
201 | #define AB8505_INT_IKP 130 | ||
202 | #define AB8505_INT_KP 131 | ||
203 | #define AB8505_INT_KEYDEGLITCH 132 | ||
204 | #define AB8505_INT_MODPWRSTATUSF 134 | ||
205 | #define AB8505_INT_MODPWRSTATUSR 135 | ||
197 | 206 | ||
198 | /* | 207 | /* |
199 | * AB8500_AB9540_NR_IRQS is used when configuring the IRQ numbers for the | 208 | * AB8500_AB9540_NR_IRQS is used when configuring the IRQ numbers for the |
@@ -203,8 +212,8 @@ enum ab8500_version { | |||
203 | * which is larger. | 212 | * which is larger. |
204 | */ | 213 | */ |
205 | #define AB8500_NR_IRQS 112 | 214 | #define AB8500_NR_IRQS 112 |
206 | #define AB8505_NR_IRQS 128 | 215 | #define AB8505_NR_IRQS 136 |
207 | #define AB9540_NR_IRQS 128 | 216 | #define AB9540_NR_IRQS 136 |
208 | /* This is set to the roof of any AB8500 chip variant IRQ counts */ | 217 | /* This is set to the roof of any AB8500 chip variant IRQ counts */ |
209 | #define AB8500_MAX_NR_IRQS AB9540_NR_IRQS | 218 | #define AB8500_MAX_NR_IRQS AB9540_NR_IRQS |
210 | 219 | ||
@@ -216,6 +225,7 @@ enum ab8500_version { | |||
216 | * @dev: parent device | 225 | * @dev: parent device |
217 | * @lock: read/write operations lock | 226 | * @lock: read/write operations lock |
218 | * @irq_lock: genirq bus lock | 227 | * @irq_lock: genirq bus lock |
228 | * @transfer_ongoing: 0 if no transfer ongoing | ||
219 | * @irq: irq line | 229 | * @irq: irq line |
220 | * @version: chip version id (e.g. ab8500 or ab9540) | 230 | * @version: chip version id (e.g. ab8500 or ab9540) |
221 | * @chip_id: chip revision id | 231 | * @chip_id: chip revision id |
@@ -234,7 +244,7 @@ struct ab8500 { | |||
234 | struct device *dev; | 244 | struct device *dev; |
235 | struct mutex lock; | 245 | struct mutex lock; |
236 | struct mutex irq_lock; | 246 | struct mutex irq_lock; |
237 | 247 | atomic_t transfer_ongoing; | |
238 | int irq_base; | 248 | int irq_base; |
239 | int irq; | 249 | int irq; |
240 | enum ab8500_version version; | 250 | enum ab8500_version version; |
@@ -280,6 +290,8 @@ extern int __devinit ab8500_init(struct ab8500 *ab8500, | |||
280 | enum ab8500_version version); | 290 | enum ab8500_version version); |
281 | extern int __devexit ab8500_exit(struct ab8500 *ab8500); | 291 | extern int __devexit ab8500_exit(struct ab8500 *ab8500); |
282 | 292 | ||
293 | extern int ab8500_suspend(struct ab8500 *ab8500); | ||
294 | |||
283 | static inline int is_ab8500(struct ab8500 *ab) | 295 | static inline int is_ab8500(struct ab8500 *ab) |
284 | { | 296 | { |
285 | return ab->version == AB8500_VERSION_AB8500; | 297 | return ab->version == AB8500_VERSION_AB8500; |