aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorGirish S Ghongdemath <girishsg@ti.com>2011-07-07 18:54:48 -0500
committerNishanth Menon <nm@ti.com>2011-07-14 11:53:50 -0700
commit7febee82195f615670ed8484f541c2154ddbb6cd (patch)
tree97e3505f8677163931ec7878c4de02fee05658fe /drivers/gpio
parent79cc5075831eaaebeec13d62f32074b6a978fe7c (diff)
downloadkernel_samsung_tuna-7febee82195f615670ed8484f541c2154ddbb6cd.zip
kernel_samsung_tuna-7febee82195f615670ed8484f541c2154ddbb6cd.tar.gz
kernel_samsung_tuna-7febee82195f615670ed8484f541c2154ddbb6cd.tar.bz2
GPIO: OMAP2+: allow level/edge triggering
The code does a wrong check and does not allow OMAP2+ to set level type. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Girish S G <girishsg@ti.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-omap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index d087fdf..82abef0 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -343,7 +343,8 @@ static int gpio_irq_type(struct irq_data *d, unsigned type)
bank = irq_data_get_irq_chip_data(d);
- if (bank->regs->leveldetect0 && (type &
+ /* OMAP1 allows only edge triggering */
+ if (!bank->regs->leveldetect0 && (type &
(IRQ_TYPE_LEVEL_LOW|IRQ_TYPE_LEVEL_HIGH)))
return -EINVAL;