lkml.org 
[lkml]   [2009]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] gpiolib: Add gpio_detect, gpio_debounce and gpio_alt_func features to GPIOLIB
Date
Le Monday 15 June 2009 14:51:46 Ben Dooks, vous avez écrit :
> On Mon, Jun 15, 2009 at 05:15:02PM +0800, Alek Du wrote:
> > >From 7a76916ccea4a376a260ea67fbc79ac4d958757f Mon Sep 17 00:00:00 2001
> >
> > From: Alek Du <alek.du@intel.com>
> > Date: Fri, 8 May 2009 09:46:49 +0800
> > Subject: [PATCH] gpiolib: Add gpio_detect, gpio_debounce and
> > gpio_alt_func features to GPIOLIB
> >
> > Add some more functions to GPIOLIB, they are:
> > * gpio_detect is to set GPIO interrupt triggering method (edge, level,
> > high, low, etc.)

The name does not seem to reflect what it does, what about gpio_set_type or
gpio_set_int_type for instance ?

>
> This is the wrong way of doing it, there is as a definit set_type
> method in the irq_chip structure which should be used to alter the
> way the IRQ is triggered.

I would expect your architecture IRQ handler to have a set_type callback for
the GPIO lines capables of generating an interrupt. See how we have beeing
doing it for rb532 for instance:
http://www.linux-mips.org/git?p=linux-queue.git;a=blob;f=arch/mips/rb532/irq.c;h=f07882029a90d3d155c17b462812c2936229458c;hb=HEAD#l173
--
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/

\
 
 \ /
  Last update: 2009-06-15 15:07    [W:0.109 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site