diff options
Diffstat (limited to 'arch/arm')
-rwxr-xr-x | arch/arm/mach-tegra/board-nvodm.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/kbc.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/nvodm_query_kbc.h | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-nvodm.c b/arch/arm/mach-tegra/board-nvodm.c index 1e93c42b4f7d..16adcb6f8ea1 100755 --- a/arch/arm/mach-tegra/board-nvodm.c +++ b/arch/arm/mach-tegra/board-nvodm.c @@ -753,8 +753,18 @@ static noinline void __init tegra_setup_kbc(void) /* debounce time is reported from ODM in terms of clock ticks. */ pdata->debounce_cnt = temp; + /* Get the scanning timeout in terms of MilliSeconds.*/ + temp = 0; + NvOdmKbcGetParameter(NvOdmKbcParameter_KeyScanTimeout, 1, &temp); + /* If value is 0 then set it to 5 second as default */ + if (!temp) + temp = 5000; + /* Convert Milliseconds to clock count of 32Kz */ + pdata->scan_timeout_cnt = temp*32; + /* repeat cycle is reported from ODM in milliseconds, * but needs to be specified in 32KHz ticks */ + temp = 0; NvOdmKbcGetParameter(NvOdmKbcParameter_RepeatCycleTime, 1, &temp); pdata->repeat_cnt = temp * 32; diff --git a/arch/arm/mach-tegra/include/mach/kbc.h b/arch/arm/mach-tegra/include/mach/kbc.h index 83810aef2612..ab2ee0a879b8 100644 --- a/arch/arm/mach-tegra/include/mach/kbc.h +++ b/arch/arm/mach-tegra/include/mach/kbc.h @@ -52,6 +52,9 @@ struct tegra_kbc_wake_key { struct tegra_kbc_plat { unsigned int debounce_cnt; unsigned int repeat_cnt; + /* Number of clock count (32KHz) to keep scanning of key after + * Key is pressed. */ + unsigned int scan_timeout_cnt; int wake_cnt; /* 0:wake on any key >1:wake on wake_cfg */ struct tegra_kbc_pin_cfg pin_cfg[KBC_MAX_GPIO]; struct tegra_kbc_wake_key *wake_cfg; diff --git a/arch/arm/mach-tegra/include/nvodm_query_kbc.h b/arch/arm/mach-tegra/include/nvodm_query_kbc.h index f8078961978e..08ea045b2ff6 100644 --- a/arch/arm/mach-tegra/include/nvodm_query_kbc.h +++ b/arch/arm/mach-tegra/include/nvodm_query_kbc.h @@ -62,6 +62,9 @@ typedef enum NvOdmKbcParameter_NumOfColumns, NvOdmKbcParameter_DebounceTime, NvOdmKbcParameter_RepeatCycleTime, + /* Amount of time in MilliSecond to continue the scanning of key + * once key is pressed. */ + NvOdmKbcParameter_KeyScanTimeout, NvOdmKbcParameter_Force32 = 0x7FFFFFFF } NvOdmKbcParameter; |