From 679a14d229af744dfa5496caee4ae41b0cdd15ae Mon Sep 17 00:00:00 2001 From: Taniya Das Date: Tue, 22 Jan 2013 11:01:55 +0530 Subject: [PATCH] gpio: msm-common: Fix irq_set_type for dual edge trigger msm_gpio_update_dual_edge_pos() function will set correct trigger type based on the current gpio level in case that the interrupt type is both edge trigger type (IRQF_TRIGGER_RISING |IRQF_TRIGGER_FALLING). Later again we set the msm_gpio_irq_extn set_type with mpm to set it as IRQF_TRIGGER_RISING. Avoid configuring the type with mpm if it is dual edge trigger. CRs-Fixed: 421325 Change-Id: I049362e7f7eacdeab13d4c6b190262c015419efd Signed-off-by: Taniya Das --- drivers/gpio/gpio-msm-common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-msm-common.c b/drivers/gpio/gpio-msm-common.c index 9a06da220c1..41301e3cbe2 100644 --- a/drivers/gpio/gpio-msm-common.c +++ b/drivers/gpio/gpio-msm-common.c @@ -343,8 +343,10 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int flow_type) mb(); spin_unlock_irqrestore(&tlmm_lock, irq_flags); - if (msm_gpio_irq_extn.irq_set_type) - msm_gpio_irq_extn.irq_set_type(d, flow_type); + if ((flow_type & IRQ_TYPE_EDGE_BOTH) != IRQ_TYPE_EDGE_BOTH) { + if (msm_gpio_irq_extn.irq_set_type) + msm_gpio_irq_extn.irq_set_type(d, flow_type); + } return 0; }