mfd: max77663: Unmask EN0 rising interrupt
Jinyoung Park [Wed, 25 Apr 2012 06:21:42 +0000 (15:21 +0900)]
Unmasked EN0 rising interrupt to generate fast PMU_INT by
EN0(POWER_KEY).

Bug 930883

Change-Id: I9a3d8c4f564e83deea86fbd3d05f14933a0b0f65
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/98665
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

drivers/mfd/max77663-core.c

index ff47cb1..dbd4fff 100644 (file)
 
 #define ONOFF_SLP_LPM_MASK             (1 << 5)
 
+#define ONOFF_IRQ_EN0_RISING           (1 << 3)
+
 enum {
        CACHE_IRQ_LBT,
        CACHE_IRQ_SD,
@@ -1132,6 +1134,10 @@ static int max77663_irq_init(struct max77663_chip *chip)
        max77663_write(chip->dev, MAX77663_REG_LBT_IRQ_MASK,
                       &chip->cache_irq_mask[CACHE_IRQ_LBT], 1, 0);
 
+       chip->cache_irq_mask[CACHE_IRQ_ONOFF] &= ~ONOFF_IRQ_EN0_RISING;
+       max77663_write(chip->dev, MAX77663_REG_ONOFF_IRQ_MASK,
+                      &chip->cache_irq_mask[CACHE_IRQ_ONOFF], 1, 0);
+
        return 0;
 }