linux/drivers
Felipe Balbi c4b5be98fe gpiolib: introduce set_debounce method
A few architectures, like OMAP, allow you to set a debouncing time for the
gpio before generating the IRQ.  Teach gpiolib about that.

Mark said:
: This would be generally useful for embedded systems, especially where
: the interrupt concerned is a wake source.  It allows drivers to avoid
: spurious interrupts from noisy sources so if the hardware supports it
: the driver can avoid having to explicitly wait for the signal to become
: stable and software has to cope with fewer events.  We've lived without
: it for quite some time, though.

David said:
: I looked at adding debounce support to the generic GPIO calls (and thus
: gpiolib) some time back, but decided against it.  I forget why at this
: time (check list archives) but it wasn't because of lack of utility in
: certain contexts.
:
: One thing to watch out for is just how variable the hardware capabilities
: are.  Atmel GPIOs have something like a fixed number of 32K clock cycles
: for debounce, twl4030 had something odd, OMAPs were more like the Atmel
: chips but with a different clock.  In some cases debouncing had to be
: ganged, not per-GPIO.  And so forth.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: David Brownell <david-b@pacbell.net>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:42 -07:00
..
accessibility
acpi drivers: acpi: don't use own implementation of hex_to_bin() 2010-05-25 08:07:06 -07:00
amba
ata Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
atm Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
auxdisplay auxdisplay: section cleanup in cfag12864bfb driver 2010-05-25 08:07:09 -07:00
base mm: compaction: add /sys trigger for per-node memory compaction 2010-05-25 08:06:59 -07:00
block Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
cdrom of: Always use 'struct device.of_node' to get device node pointer. 2010-05-18 16:10:44 -06:00
char drivers/char/vt.c: use memdup_user 2010-05-27 09:12:40 -07:00
clocksource Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-19 17:10:57 -07:00
connector
cpufreq Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:49:13 -07:00
cpuidle cpuidle: add a repeating pattern detector to the menu governor 2010-05-25 08:07:02 -07:00
crypto Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
dca
dio
dma kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN 2010-05-25 08:07:02 -07:00
edac Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
eisa
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
firmware sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
gpio gpiolib: introduce set_debounce method 2010-05-27 09:12:42 -07:00
gpu Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-05-26 12:30:09 -07:00
hid HID: roccat: fix build failure if built as module 2010-05-25 09:58:05 +02:00
hwmon drivers/hwmon/coretemp.c: get TjMax value from MSR 2010-05-25 08:07:07 -07:00
i2c Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 2010-05-24 08:05:29 -07:00
idle
ieee1394
ieee802154
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2010-05-25 12:05:17 -07:00
input Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-05-25 16:59:51 -07:00
leds of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
lguest
macintosh Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
mca
md Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-05-21 19:37:45 -07:00
media Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
memstick
message drivers/message/i2o/i2o_config.c: use memdup_user 2010-05-27 09:12:41 -07:00
mfd regulator: use voltage number array in 88pm860x 2010-05-25 10:16:02 +01:00
misc ad525x_dpot: add support for one time programmable pots 2010-05-25 08:07:04 -07:00
mmc drivers/mmc/host: use ERR_CAST 2010-05-27 09:12:40 -07:00
mtd Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-05-25 16:59:51 -07:00
nubus
of Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
oprofile
parisc
parport Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
pci Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2010-05-21 18:58:52 -07:00
pcmcia Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
platform Move N014, N051 and CR620 dmi information to load scm dmi table 2010-05-20 10:16:13 -04:00
pnp
power Merge git://git.infradead.org/battery-2.6 2010-05-25 08:16:34 -07:00
pps
ps3
rapidio sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
regulator regulator: return set_mode is same mode is requested 2010-05-25 10:16:02 +01:00
rtc rtc: AB8500 RTC driver 2010-05-27 09:12:41 -07:00
s390 sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
sbus Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
scsi kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN 2010-05-25 08:07:02 -07:00
serial Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2010-05-25 12:04:17 -07:00
sfi
sh
sn
spi spi/xilinx: Fix compile error 2010-05-25 00:48:24 -06:00
ssb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
staging staging: rt2860: use new hex_to_bin() method 2010-05-25 08:07:05 -07:00
tc
telephony
thermal
uio
usb Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-05-25 12:06:33 -07:00
uwb
vhost kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN 2010-05-25 08:07:02 -07:00
video nuc900fb: release correct mem region 2010-05-25 08:07:09 -07:00
virtio Merge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2010-05-21 17:22:52 -07:00
vlynq
w1 sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
watchdog watchdog: Driver for the watchdog timer on Freescale IMX2 (and later) processors. 2010-05-25 12:43:46 +00:00
xen xen: fix build when SYSRQ is disabled 2010-05-25 08:07:07 -07:00
zorro sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
Kconfig
Makefile