diff options
author | Victor Ryabukhin <vryabukhin@nvidia.com> | 2010-07-07 14:29:38 +0900 |
---|---|---|
committer | Janne Hellsten <jhellsten@nvidia.com> | 2010-07-12 01:48:38 -0700 |
commit | 0d62e36456719c9c02709a82d0ecaa89d58d7989 (patch) | |
tree | aefec6b6d67efdbba57505a36a668e31c38cb769 /drivers | |
parent | 0a78303054f9fd89d382cc14f0b8dff69ac937cb (diff) |
[Tegra KBC] Added call of NvOdmKbcFilterKeys function from keyboard driver.
Fix for bug 688807.
Function NvOdmKbcFilterKeys (ghost keys filter) was called only from bootloader
keyboard driver, but not from OS driver. Fixed.
Change-Id: Ibf8c0ccbf393e9c53a08a4cb2f746960bb43e4f8
Reviewed-on: http://git-master/r/3648
Tested-by: Victor Ryabukhin <vryabukhin@nvidia.com>
Reviewed-by: Janne Hellsten <jhellsten@nvidia.com>
Diffstat (limited to 'drivers')
-rwxr-xr-x[-rw-r--r--] | drivers/input/keyboard/tegra-kbc.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index b43f1cdda1d6..7797b47b78a0 100644..100755 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -34,6 +34,7 @@ #include <mach/kbc.h> #include <mach/pmc.h> #include <mach/clk.h> +#include <nvodm_kbc.h> #define KBC_CONTROL_0 0 #define KBC_INT_0 4 @@ -110,9 +111,10 @@ static int tegra_kbc_resume(struct platform_device *pdev) static void tegra_kbc_report_keys(struct tegra_kbc *kbc, int *fifo) { int curr_fifo[KBC_MAX_KPENT]; + int rows_val[KBC_MAX_KPENT], cols_val[KBC_MAX_KPENT]; u32 kp_ent_val[(KBC_MAX_KPENT + 3) / 4]; u32 *kp_ents = kp_ent_val; - u32 kp_ent; + u32 kp_ent = 0; unsigned long flags; int i, j, valid=0; @@ -121,18 +123,26 @@ static void tegra_kbc_report_keys(struct tegra_kbc *kbc, int *fifo) kp_ent_val[i] = readl(kbc->mmio + KBC_KP_ENT0_0 + (i*4)); local_irq_restore(flags); + valid = 0; for (i=0; i<KBC_MAX_KPENT; i++) { if (!(i&3)) kp_ent=*kp_ents++; if (kp_ent & 0x80) { - int c = kp_ent & 0x7; - int r = (kp_ent >> 3) & 0xf; - int k = tegra_kbc_keycode(kbc, r, c); - if (likely(k!=-1)) curr_fifo[valid++] = k; + cols_val[valid] = kp_ent & 0x7; + rows_val[valid++] = (kp_ent >> 3) & 0xf; } kp_ent >>= 8; } + valid = NvOdmKbcFilterKeys(rows_val, cols_val, valid); + + j = 0; + for (i=0; i<valid; i++) { + int k = tegra_kbc_keycode(kbc, rows_val[i], cols_val[i]); + if (likely(k!=-1)) curr_fifo[j++] = k; + } + valid = j; + for (i=0; i<KBC_MAX_KPENT; i++) { if (fifo[i]==-1) continue; for (j=0; j<valid; j++) { |