Messages in this thread | | | From | Grant Likely <> | Subject | Re: PCA GPIO interrupt triggers | Date | Sat, 24 Mar 2012 17:02:12 +0000 |
| |
On Thu, 22 Mar 2012 16:58:09 +0100, Peter Rusko <rusko.peter@prolan.hu> wrote: > Hi, > > I'm using a GPIO chip (PCA9554) for a matrix-keypad. The keypad driver > itself needs interrupts for both rising and falling edges. The PCA > driver (gpio-pca953x.c) doesn't support it, but I don't understand why. > > I think, this patch should work:
Can someone with hardware review this patch please? David perhaps?
g.
> > diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c > index 147df8a..be9aff4 100644 > --- a/drivers/gpio/gpio-pca953x.c > +++ b/drivers/gpio/gpio-pca953x.c > @@ -356,12 +356,6 @@ static int pca953x_irq_set_type(struct irq_data *d, > unsigned int type) > uint16_t level = d->irq - chip->irq_base; > uint16_t mask = 1 << level; > > - if (!(type & IRQ_TYPE_EDGE_BOTH)) { > - dev_err(&chip->client->dev, "irq %d: unsupported type %d\n", > - d->irq, type); > - return -EINVAL; > - } > - > if (type & IRQ_TYPE_EDGE_FALLING) > chip->irq_trig_fall |= mask; > else > > I think that the other parts of the code checks for rising and falling > edges correctly. Am I missing something? > > -- > Ruskó Péter > FejlesztÅmérnök > > Prolan Zrt. / Prolan Co. > Hungary 2011 Budakalász, Szentendrei út 1-3. > Tel./Phone: +36 20 954 3118 > Fax: +36 26 540 420 > E-mail: rusko.peter@prolan.hu > Web: www.prolan.hu > Timezone:CET
-- Grant Likely, B.Sc, P.Eng. Secret Lab Technologies,Ltd. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |