mfd: max77663: Set irq as wake interrupt
Jin Park [Mon, 5 Sep 2011 06:19:21 +0000 (15:19 +0900)]
The irq need to set as wake interrupt to wake from sleep
when interrupt receiving from MAX77663 PMU.

Bug 868996

Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/50694
(cherry picked from commit 4bbdf8764bbc262215ab33996e3a91473e7a7e68)
Change-Id: I1489e9a4ea501ac668e040a73ad20fa1fd6544fb
Reviewed-on: http://git-master/r/54634
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: Rba7e15fbb7f58e304aee22d7d39fdbea8e552095

drivers/mfd/max77663-core.c

index 1b3a015..4728ca7 100644 (file)
@@ -941,6 +941,9 @@ static int max77663_irq_init(struct max77663_chip *chip)
                return ret;
        }
 
+       device_init_wakeup(chip->dev, 1);
+       enable_irq_wake(chip->i2c_power->irq);
+
        chip->cache_irq_top_mask &= ~IRQ_TOP_GLBL_MASK;
        max77663_write(chip->dev, MAX77663_REG_IRQ_TOP_MASK,
                       &chip->cache_irq_top_mask, 1, 0);