summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-10-30 18:45:05 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-11-08 14:06:23 -0800
commit3360ed5be86a2afd6716bc5227cc39657efd35b2 (patch)
tree257e4545a500c958ca978195ff094c8e8740cf72 /arch
parent961b764bfb70a7035feb5d46912dd2d667560e54 (diff)
input: tegra: kbc: Board param for scan count
The scan timeout of the continuous mode can be calculated based on init delay, repeat delay, debounce count and number of active row. It also depends on how many scan need to be done before kbc change the mode from continuous to wakeup mode. Providing mechanism to select the scan count from platform data and calculating the scan timeout count based on above parameters. bug 876712 Reviewed-on: http://git-master/r/61060 (cherry picked from commit 830fbf574f7d545926a4ed3fd2433585688b884b) Change-Id: Ibced5559af2d2b0f87de626d86d16e6127b9b2fb Reviewed-on: http://git-master/r/62591 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/include/mach/kbc.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/include/mach/kbc.h b/arch/arm/mach-tegra/include/mach/kbc.h
index 4725c9815d0b..44d686fbe45e 100644
--- a/arch/arm/mach-tegra/include/mach/kbc.h
+++ b/arch/arm/mach-tegra/include/mach/kbc.h
@@ -53,7 +53,11 @@ struct tegra_kbc_pin_cfg {
* @repeat_cnt: The time to start next scan after completing the current scan
* in terms of clock ticks of 32KHz clock
* @scan_timeout_cnt: Number of clock count (32KHz) to keep scanning of keys
- * after any key is pressed.
+ * after last pressed key is released.
+ * @scan_count: Number of scanning done by kbc after last key released. Based
+ * parameter, the scan timeout can be calculated. User can
+ * provide the value either for scan_count or scan_timeout_cnt.
+ * Both parameters are not require to be set.
* @plain_keycode: The key code array for keys in normal mode.
* @fn_keycode: The key code array for keys with function key pressed.
* @is_filter_keys: Tells whether filter algorithms applied or not.
@@ -66,6 +70,7 @@ struct tegra_kbc_platform_data {
unsigned int debounce_cnt;
unsigned int repeat_cnt;
unsigned int scan_timeout_cnt;
+ unsigned int scan_count;
int *plain_keycode;
int *fn_keycode;
bool is_filter_keys;