summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2010-05-13 22:52:01 +0530
committerGary King <gking@nvidia.com>2010-05-14 14:59:26 -0700
commit7c5ade31d650992a7486e2db4f9458207039a6ce (patch)
treec5ae66be8a6995b985a984dd99fac72d3470b91d
parente24561a3dd7683174a9828c1d982ed9ba369afef (diff)
tegra kbc: Sw interface to set debaunce time in clock ticks.
It is require to set the debaunce time in terms of clock tick granularity. 1 clock tick is 1/32 ms. The granulairty of 1ms is too much to tune the key scanning performance. Bug 684129 Change-Id: Ida7ca5c07ca1d6aa8f8aee57b243aea32baca38a Reviewed-on: http://git-master/r/1383 Reviewed-by: Hu He <hhe@nvidia.com> Tested-by: Hu He <hhe@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/include/nvodm_query_kbc.h6
-rw-r--r--arch/arm/mach-tegra/odm_to_plat.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/include/nvodm_query_kbc.h b/arch/arm/mach-tegra/include/nvodm_query_kbc.h
index f8078961978e..7129178aa551 100644
--- a/arch/arm/mach-tegra/include/nvodm_query_kbc.h
+++ b/arch/arm/mach-tegra/include/nvodm_query_kbc.h
@@ -60,7 +60,13 @@ typedef enum
{
NvOdmKbcParameter_NumOfRows=1,
NvOdmKbcParameter_NumOfColumns,
+
+ /* The debaunce time in terms of number of clocks. Clock frequency is
+ * 32 KHz */
NvOdmKbcParameter_DebounceTime,
+
+ /* The repeat cycle in milliseconds. The next scan start after waiting
+ * of repeat cycle time */
NvOdmKbcParameter_RepeatCycleTime,
NvOdmKbcParameter_Force32 = 0x7FFFFFFF
} NvOdmKbcParameter;
diff --git a/arch/arm/mach-tegra/odm_to_plat.c b/arch/arm/mach-tegra/odm_to_plat.c
index 209268572276..b152ef2cf88f 100644
--- a/arch/arm/mach-tegra/odm_to_plat.c
+++ b/arch/arm/mach-tegra/odm_to_plat.c
@@ -71,9 +71,8 @@ struct tegra_kbc_plat *tegra_kbc_odm_to_plat(void)
NvOdmKbcGetParameter(NvOdmKbcParameter_DebounceTime, 1, &temp);
- /* debounce time is reported from ODM in milliseconds,
- * but needs to be specified in 32KHz ticks */
- pdata->debounce_cnt = temp *32;
+ /* debounce time is reported from ODM in terms of clock ticks. */
+ pdata->debounce_cnt = temp;
/* repeat cycle is reported from ODM in milliseconds,
* but needs to be specified in 32KHz ticks */