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 <tdas@codeaurora.org>
This commit is contained in:
Taniya Das 2013-01-22 11:01:55 +05:30 committed by Iliyan Malchev
parent a5c3edbe9c
commit 679a14d229
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}