Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Santosh Shilimkar and committed by
Samuel Ortiz
49dcd070 5da721c8

+9
+9
drivers/mfd/twl6030-irq.c
··· 187 187 #endif 188 188 } 189 189 190 + int 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 192 199 static unsigned twl6030_irq_next; ··· 325 318 twl6030_irq_chip = dummy_irq_chip; 326 319 twl6030_irq_chip.name = "twl6030"; 327 320 twl6030_irq_chip.irq_set_type = NULL; 321 + twl6030_irq_chip.irq_set_wake = twl6030_irq_set_wake; 328 322 329 323 for (i = irq_base; i < irq_end; i++) { 330 324 irq_set_chip_and_handler(i, &twl6030_irq_chip, 331 325 handle_simple_irq); 326 + irq_set_chip_data(i, (void *)irq_num); 332 327 activate_irq(i); 333 328 } 334 329