aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/twl6030-irq.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2011-09-06 11:59:30 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-10-24 08:09:13 -0400
commit49dcd070d0718a8b8db344d7b3d5e278362ecd86 (patch)
tree2f074fe45891a0e648d91813a79f5a1e7f0e9993 /drivers/mfd/twl6030-irq.c
parent5da721c87aee3d94cfc48384073c2ec51a0b9a3b (diff)
mfd: Set twl6030 irq_wake infrastructure up
TWL6030 devices have an interrupt line which is connected to application processor like OMAP. These devices support multiple features such as MMC card detect, USB cable detect, RTC interrupt, etc. that must wake up the application processor. With this change, TWL6030 client drivers can make use of irq_wake() if the wakeup is desirable on it's irq events. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/twl6030-irq.c')
-rw-r--r--drivers/mfd/twl6030-irq.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index 776402566c9e..f94a04ca1d37 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -187,6 +187,13 @@ static inline void activate_irq(int irq)
187#endif 187#endif
188} 188}
189 189
190int twl6030_irq_set_wake(struct irq_data *d, unsigned int on)
191{
192 int twl_irq = (int)irq_get_chip_data(d->irq);
193
194 return irq_set_irq_wake(twl_irq, on);
195}
196
190/*----------------------------------------------------------------------*/ 197/*----------------------------------------------------------------------*/
191 198
192static unsigned twl6030_irq_next; 199static unsigned twl6030_irq_next;
@@ -318,10 +325,12 @@ int twl6030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end)
318 twl6030_irq_chip = dummy_irq_chip; 325 twl6030_irq_chip = dummy_irq_chip;
319 twl6030_irq_chip.name = "twl6030"; 326 twl6030_irq_chip.name = "twl6030";
320 twl6030_irq_chip.irq_set_type = NULL; 327 twl6030_irq_chip.irq_set_type = NULL;
328 twl6030_irq_chip.irq_set_wake = twl6030_irq_set_wake;
321 329
322 for (i = irq_base; i < irq_end; i++) { 330 for (i = irq_base; i < irq_end; i++) {
323 irq_set_chip_and_handler(i, &twl6030_irq_chip, 331 irq_set_chip_and_handler(i, &twl6030_irq_chip,
324 handle_simple_irq); 332 handle_simple_irq);
333 irq_set_chip_data(i, (void *)irq_num);
325 activate_irq(i); 334 activate_irq(i);
326 } 335 }
327 336