summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2010-10-18 19:09:26 +0530
committerVarun Colbert <vcolbert@nvidia.com>2010-10-19 17:10:58 -0700
commitb5ec7cc7a010e333f63eac4e9ff605cb51361bfd (patch)
treede3b88c9db7eee6e3f634e8ac5c5a39e0b53fc7a /drivers
parentb3c5b3ae3c492dcfc49dc1a7265b801398565d3b (diff)
[arm/tegra] kbc: Adding scanning timeout configuration.
Keyboard controller goes to continuous polling mode from wakeup mode if any key is pressed and stay for hw default to 5 second. This parameter was not configurable from odm. It is require to configure this parameter from odm based on platform. Adding support for keeping this time as configurable. The default time still be 5 second if it is not configured from odm. Change-Id: I0fc11cc2a2d64db33b00c048f87081b6181354fa Reviewed-on: http://git-master/r/8644 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Chun-Hung (Alex) Wu <chuwu@nvidia.com> Tested-by: Chun-Hung (Alex) Wu <chuwu@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers')
-rwxr-xr-xdrivers/input/keyboard/tegra-kbc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 692ca225ea7e..d0b578b7f7b4 100755
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -40,6 +40,7 @@
#define KBC_INT_0 4
#define KBC_ROW_CFG0_0 8
#define KBC_COL_CFG0_0 0x18
+#define KBC_TO_CNT_0 0x24
#define KBC_RPT_DLY_0 0x2c
#define KBC_KP_ENT0_0 0x30
#define KBC_KP_ENT1_0 0x34
@@ -307,6 +308,10 @@ static int tegra_kbc_open(struct input_dev *dev)
val |= 1; /* enable */
writel(val, kbc->mmio + KBC_CONTROL_0);
+ /* Bit 19:0 is for scan timeout count */
+ kbc->pdata->scan_timeout_cnt &= 0xFFFFF;
+ writel(kbc->pdata->scan_timeout_cnt, kbc->mmio + KBC_TO_CNT_0);
+
/* atomically clear out any remaining entries in the key FIFO
* and enable keyboard interrupts */
spin_lock_irqsave(&kbc->lock, flags);