From 7febee82195f615670ed8484f541c2154ddbb6cd Mon Sep 17 00:00:00 2001 From: Girish S Ghongdemath Date: Thu, 7 Jul 2011 18:54:48 -0500 Subject: 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 Signed-off-by: Girish S G --- drivers/gpio/gpio-omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpio') 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; -- cgit v1.1