summaryrefslogtreecommitdiffstats
path: root/include/linux/i2c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-01-06 14:42:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 15:59:25 -0800
commitcabb3fc4bd1628c37c37e054960eb3e4bf30dc26 (patch)
treedb8acce21cc4c9762da5f815779ec702f5a59c0c /include/linux/i2c
parentba6c4033b9db22cb54e7e03dae5b624b7b0ffaf9 (diff)
downloadlinux-cabb3fc4bd1628c37c37e054960eb3e4bf30dc26.tar.gz
linux-cabb3fc4bd1628c37c37e054960eb3e4bf30dc26.tar.bz2
linux-cabb3fc4bd1628c37c37e054960eb3e4bf30dc26.zip
twl4030-gpio: cleanup debounce
Provide a static debounce configuration mechanism for twl4030 GPIOs, replacing the previous dynamic one. The single user of that mechanism was for MMC card detect debouncing. Boards can provide a bitmask saying which GPIOs to debounce (30 msec). It's always enabled for pins with the MMC card-detect/VMMCx link active, so most boards won't need to set the debounce mask. This is a net code shrink, including runtime footprint. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/i2c')
-rw-r--r--include/linux/i2c/twl4030.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h
index a8f84c01f82e..8137f660a5cc 100644
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -234,6 +234,9 @@ struct twl4030_gpio_platform_data {
/* gpio-n should control VMMC(n+1) if BIT(n) in mmc_cd is set */
u8 mmc_cd;
+ /* if BIT(N) is set, or VMMC(n+1) is linked, debounce GPIO-N */
+ u32 debounce;
+
/* For gpio-N, bit (1 << N) in "pullups" is set if that pullup
* should be enabled. Else, if that bit is set in "pulldowns",
* that pulldown is enabled. Don't waste power by letting any
@@ -307,12 +310,6 @@ int twl4030_sih_setup(int module);
#define TWL4030_VAUX3_DEV_GRP 0x1F
#define TWL4030_VAUX3_DEDICATED 0x22
-/*
- * Exported TWL4030 GPIO APIs
- *
- * WARNING -- use standard GPIO and IRQ calls instead; these will vanish.
- */
-int twl4030_set_gpio_debounce(int gpio, int enable);
#if defined(CONFIG_TWL4030_BCI_BATTERY) || \
defined(CONFIG_TWL4030_BCI_BATTERY_MODULE)