arm: tegra: cardhu: Setting debounce time for keys
Laxman Dewangan [Tue, 19 Apr 2011 07:25:23 +0000 (12:25 +0530)]
Setting the debounce interval time for keys connected
directly to interrupt lines.

bug 814005

Original-Change-Id: I2964a8c1052d16bc3f057219de9c4564206446ef
Reviewed-on: http://git-master/r/28166
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ramachandrudu Kandhala <rkandhala@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Original-Change-Id: I68f728bd0b2a1583e388443ca283eb7cd70aae61

Rebase-Id: Rbde5f0f4159865f86fdf082405d10352ca3cba5b

arch/arm/mach-tegra/board-cardhu-kbc.c

index 0a99e05..42b74cd 100644 (file)
@@ -181,7 +181,7 @@ static struct platform_device cardhu_keys_e1291_device = {
        },
 };
 
-#define INT_KEY(_id, _irq, _iswake)            \
+#define INT_KEY(_id, _irq, _iswake, _deb_int)  \
        {                                       \
                .code = _id,                    \
                .irq = _irq,                    \
@@ -189,11 +189,11 @@ static struct platform_device cardhu_keys_e1291_device = {
                .desc = #_id,                   \
                .type = EV_KEY,                 \
                .wakeup = _iswake,              \
-               .debounce_interval = 10,        \
+               .debounce_interval = _deb_int,  \
        }
 static struct interrupt_keys_button cardhu_int_keys_e1291[] = {
-       [0] = INT_KEY(KEY_MENU, TPS6591X_IRQ_BASE + TPS6591X_INT_PWRON, 0),
-       [1] = INT_KEY(KEY_MENU, TPS6591X_IRQ_BASE + TPS6591X_INT_PWRON_LP, 0),
+       [0] = INT_KEY(KEY_MENU, TPS6591X_IRQ_BASE + TPS6591X_INT_PWRON, 0, 100),
+       [1] = INT_KEY(KEY_POWER, TPS6591X_IRQ_BASE + TPS6591X_INT_PWRON_LP, 0, 8000),
 };
 
 static struct interrupt_keys_platform_data cardhu_int_keys_e1291_pdata = {