diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2010-05-04 19:59:08 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-05-04 17:43:25 -0700 |
commit | 7871116830fe633b55d8104deddac603f003306a (patch) | |
tree | 05915eb688a98cbcfa6ad1417cda55026c320544 /arch | |
parent | fc5f671424da0d58aad8378294dfdc0432ec5997 (diff) |
tegra kbc: Fixing android boot if key is kept press during boot.
Following changes are done:
- Created the new workqueue for the kbc scan process. On default workqueue,
the msleep() was not causing the schedule() to booting process.
- If there is no entry in fifo then wait for the next scan to complete before
re-reading the number of entries in the fifo. if there is no entry then rep
key released.
- Fixed timing calculation and size of the event entry array.
- Fixed the debaunce count calculation from debaunce time from odm.
Tested on whistler, with normal boot as well as with continous key pressed d
the entire boot time.
Change-Id: I53b321ae6f5e1f425b51edcd63f7de4ae404e505
Reviewed-on: http://git-master/r/1238
Reviewed-by: Hu He <hhe@nvidia.com>
Tested-by: Hu He <hhe@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board_nvodm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/odm_to_plat.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board_nvodm.c b/arch/arm/mach-tegra/board_nvodm.c index d9eefc00db3f..f13f503a3683 100644 --- a/arch/arm/mach-tegra/board_nvodm.c +++ b/arch/arm/mach-tegra/board_nvodm.c @@ -430,7 +430,7 @@ static void kbc_init(void) struct tegra_kbc_plat *pdata = NULL; static struct resource res[2]; - dev = platform_device_alloc("tegra_kbc", -1); + dev = platform_device_alloc("tegra-kbc", -1); if (!dev) goto fail; diff --git a/arch/arm/mach-tegra/odm_to_plat.c b/arch/arm/mach-tegra/odm_to_plat.c index 7ccc982d1f25..209268572276 100644 --- a/arch/arm/mach-tegra/odm_to_plat.c +++ b/arch/arm/mach-tegra/odm_to_plat.c @@ -71,12 +71,14 @@ struct tegra_kbc_plat *tegra_kbc_odm_to_plat(void) NvOdmKbcGetParameter(NvOdmKbcParameter_DebounceTime, 1, &temp); - pdata->debounce_cnt = temp; + /* debounce time is reported from ODM in milliseconds, + * but needs to be specified in 32KHz ticks */ + pdata->debounce_cnt = temp *32; /* repeat cycle is reported from ODM in milliseconds, * but needs to be specified in 32KHz ticks */ NvOdmKbcGetParameter(NvOdmKbcParameter_RepeatCycleTime, 1, &temp); - pdata->repeat_cnt = temp * 4096 / 125; + pdata->repeat_cnt = temp * 32; temp = NvOdmPeripheralEnumerate(&srch_attr, &srch_val, 1, &guid, 1); if (!temp) { |