summaryrefslogtreecommitdiff
path: root/drivers/input/tegra-kbc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-09-27 15:18:41 +0000
committerTom Rini <trini@ti.com>2012-10-15 11:54:04 -0700
commit1b1d3e6461e9195f825d6d8aa6a2a0e1e3188f62 (patch)
treea6120c3afff73816064a1e4fbeed227aaad84097 /drivers/input/tegra-kbc.c
parent00f1099e09d627632b60a3a29cb1bce2339510a7 (diff)
downloadu-boot-imx-1b1d3e6461e9195f825d6d8aa6a2a0e1e3188f62.zip
u-boot-imx-1b1d3e6461e9195f825d6d8aa6a2a0e1e3188f62.tar.gz
u-boot-imx-1b1d3e6461e9195f825d6d8aa6a2a0e1e3188f62.tar.bz2
input: Separate out keyboard repeat/delay from init
It is inconvenient to have to specify the keyboard repeat and delay at init time if it is not yet available, so move this into a separate function. Some drivers will want to do this when their keyboard init routine is actually called. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/input/tegra-kbc.c')
-rw-r--r--drivers/input/tegra-kbc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index f164791..9a30942 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -321,6 +321,8 @@ static int init_tegra_keyboard(void)
debug("%s: No keyboard register found\n", __func__);
return -1;
}
+ input_set_delays(&config.input, KBC_REPEAT_DELAY_MS,
+ KBC_REPEAT_RATE_MS);
/* Decode the keyboard matrix information (16 rows, 8 columns) */
if (key_matrix_init(&config.matrix, 16, 8)) {
@@ -356,8 +358,7 @@ int drv_keyboard_init(void)
{
struct stdio_dev dev;
- if (input_init(&config.input, 0, KBC_REPEAT_DELAY_MS,
- KBC_REPEAT_RATE_MS)) {
+ if (input_init(&config.input, 0)) {
debug("%s: Cannot set up input\n", __func__);
return -1;
}