Skip to contentSkip to conversation

gpio: gpio-langwell: fix IRQ wake functionality

PATCH New Mathias Nyman 1 participant 1 message Jan 11, 2012 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: gpio-langwell: fix IRQ wake functionality

Some chips are able to use gpio as a wake up source - e.g., you may want your gpio button to wake up your device.

Currently 'irq_set_irq_wake()' is broken for gpio-langwell because the driver does not provide the '->irq_set_wake()' method, which makes 'set_irq_wake_real()' return -ENXIO, so that the 'IRQD_WAKEUP_STATE' bit is not changed. This also causes the "Unbalanced IRQ X wake disable" warnings at some point.

This patch fixes the issue with the 'IRQCHIP_SKIP_SET_WAKE' flag. This flag basically tells the the IRQ core subsystem that we support IRQ wakes but do not need any driver-specific code.

---
 drivers/gpio/gpio-langwell.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpio/gpio-langwell.c +1 -0
index 00692e8..4bb748e 100644
@@ -227,6 +227,7 @@ static struct irq_chip lnw_irqchip = {
 	.irq_mask	= lnw_irq_mask,
 	.irq_unmask	= lnw_irq_unmask,
 	.irq_set_type	= lnw_irq_type,
+	.flags		= IRQCHIP_SKIP_SET_WAKE,
 };
 
 static DEFINE_PCI_DEVICE_TABLE(lnw_gpio_ids) = {   /* pin number */
Signature · 1 line
1.7.4.1