From 998dd96da8de4e39f17eacdff4d7e58a897dab59 Mon Sep 17 00:00:00 2001 From: Rohit Vaswani Date: Fri, 3 Aug 2012 11:54:09 -0700 Subject: [PATCH] gpio: msm: Clear the interrupt status before unmasking After the change to keep the RAW_STATUS_EN always on, the interrupt status bit was latched and could be set during other (non-interrupt) activity on the GPIO line. This would end up triggering the interrupt as soon as it was unmasked. Hence, clear the interrupt status before unmasking the gpio interrupt. This keeps the behavior and expectations same as when the RAW_STATUS_EN was toggled and it prevented the interrupt status to be updated while the interrupt was masked. Change-Id: I3ccb31b5d8a7efe93f8253d4aff4a1c44281163f CRs-Fixed: 346861 Signed-off-by: Rohit Vaswani --- drivers/gpio/gpio-msm-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-msm-common.c b/drivers/gpio/gpio-msm-common.c index fa8239a9edd..bdb81711567 100644 --- a/drivers/gpio/gpio-msm-common.c +++ b/drivers/gpio/gpio-msm-common.c @@ -299,6 +299,7 @@ static void msm_gpio_irq_unmask(struct irq_data *d) spin_lock_irqsave(&tlmm_lock, irq_flags); __set_bit(gpio, msm_gpio.enabled_irqs); + __msm_gpio_set_intr_status(gpio); __msm_gpio_set_intr_cfg_enable(gpio, 1); mb(); spin_unlock_irqrestore(&tlmm_lock, irq_flags);