diff options
-rw-r--r-- | arch/arm/mach-tegra/include/mach/kbc.h | 3 | ||||
-rw-r--r-- | drivers/input/keyboard/tegra-kbc.c | 24 |
2 files changed, 2 insertions, 25 deletions
diff --git a/arch/arm/mach-tegra/include/mach/kbc.h b/arch/arm/mach-tegra/include/mach/kbc.h index bd99744f27db..4f3572a1c684 100644 --- a/arch/arm/mach-tegra/include/mach/kbc.h +++ b/arch/arm/mach-tegra/include/mach/kbc.h | |||
@@ -50,9 +50,6 @@ struct tegra_kbc_platform_data { | |||
50 | unsigned int debounce_cnt; | 50 | unsigned int debounce_cnt; |
51 | unsigned int repeat_cnt; | 51 | unsigned int repeat_cnt; |
52 | 52 | ||
53 | unsigned int wake_cnt; /* 0:wake on any key >1:wake on wake_cfg */ | ||
54 | const struct tegra_kbc_wake_key *wake_cfg; | ||
55 | |||
56 | struct tegra_kbc_pin_cfg pin_cfg[KBC_MAX_GPIO]; | 53 | struct tegra_kbc_pin_cfg pin_cfg[KBC_MAX_GPIO]; |
57 | const struct matrix_keymap_data *keymap_data; | 54 | const struct matrix_keymap_data *keymap_data; |
58 | 55 | ||
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 5fb4b972f205..2b3b73ec6689 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c | |||
@@ -66,8 +66,6 @@ struct tegra_kbc { | |||
66 | void __iomem *mmio; | 66 | void __iomem *mmio; |
67 | struct input_dev *idev; | 67 | struct input_dev *idev; |
68 | unsigned int irq; | 68 | unsigned int irq; |
69 | unsigned int wake_enable_rows; | ||
70 | unsigned int wake_enable_cols; | ||
71 | spinlock_t lock; | 69 | spinlock_t lock; |
72 | unsigned int repoll_dly; | 70 | unsigned int repoll_dly; |
73 | unsigned long cp_dly_jiffies; | 71 | unsigned long cp_dly_jiffies; |
@@ -418,21 +416,11 @@ static void tegra_kbc_setup_wakekeys(struct tegra_kbc *kbc, bool filter) | |||
418 | int i; | 416 | int i; |
419 | unsigned int rst_val; | 417 | unsigned int rst_val; |
420 | 418 | ||
421 | BUG_ON(pdata->wake_cnt > KBC_MAX_KEY); | 419 | /* Either mask all keys or none. */ |
422 | rst_val = (filter && pdata->wake_cnt) ? ~0 : 0; | 420 | rst_val = (filter && !pdata->wakeup) ? ~0 : 0; |
423 | 421 | ||
424 | for (i = 0; i < KBC_MAX_ROW; i++) | 422 | for (i = 0; i < KBC_MAX_ROW; i++) |
425 | writel(rst_val, kbc->mmio + KBC_ROW0_MASK_0 + i * 4); | 423 | writel(rst_val, kbc->mmio + KBC_ROW0_MASK_0 + i * 4); |
426 | |||
427 | if (filter) { | ||
428 | for (i = 0; i < pdata->wake_cnt; i++) { | ||
429 | u32 val, addr; | ||
430 | addr = pdata->wake_cfg[i].row * 4 + KBC_ROW0_MASK_0; | ||
431 | val = readl(kbc->mmio + addr); | ||
432 | val &= ~(1 << pdata->wake_cfg[i].col); | ||
433 | writel(val, kbc->mmio + addr); | ||
434 | } | ||
435 | } | ||
436 | } | 424 | } |
437 | 425 | ||
438 | static void tegra_kbc_config_pins(struct tegra_kbc *kbc) | 426 | static void tegra_kbc_config_pins(struct tegra_kbc *kbc) |
@@ -594,7 +582,6 @@ static int __devinit tegra_kbc_probe(struct platform_device *pdev) | |||
594 | struct resource *res; | 582 | struct resource *res; |
595 | int irq; | 583 | int irq; |
596 | int err; | 584 | int err; |
597 | int i; | ||
598 | int num_rows = 0; | 585 | int num_rows = 0; |
599 | unsigned int debounce_cnt; | 586 | unsigned int debounce_cnt; |
600 | unsigned int scan_time_rows; | 587 | unsigned int scan_time_rows; |
@@ -651,13 +638,6 @@ static int __devinit tegra_kbc_probe(struct platform_device *pdev) | |||
651 | goto err_iounmap; | 638 | goto err_iounmap; |
652 | } | 639 | } |
653 | 640 | ||
654 | kbc->wake_enable_rows = 0; | ||
655 | kbc->wake_enable_cols = 0; | ||
656 | for (i = 0; i < pdata->wake_cnt; i++) { | ||
657 | kbc->wake_enable_rows |= (1 << pdata->wake_cfg[i].row); | ||
658 | kbc->wake_enable_cols |= (1 << pdata->wake_cfg[i].col); | ||
659 | } | ||
660 | |||
661 | /* | 641 | /* |
662 | * The time delay between two consecutive reads of the FIFO is | 642 | * The time delay between two consecutive reads of the FIFO is |
663 | * the sum of the repeat time and the time taken for scanning | 643 | * the sum of the repeat time and the time taken for scanning |