diff options
author | Simon Glass <sjg@chromium.org> | 2018-03-19 15:20:25 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-04-06 17:04:33 -0400 |
commit | b79b9f198bad2c2ad58319a88bd5adca3a54b864 (patch) | |
tree | 213b2fa103821bb5723550f3f8d68680b9e9edef /drivers/input/keyboard.c | |
parent | 22fc7b6cd6e66911c58848d03eb0f1ddee024137 (diff) |
input: Drop PS/2 keyboard support
This is not used by any current board and has not been converted to driver
model. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/input/keyboard.c')
-rw-r--r-- | drivers/input/keyboard.c | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/drivers/input/keyboard.c b/drivers/input/keyboard.c deleted file mode 100644 index 84ee015cb3..0000000000 --- a/drivers/input/keyboard.c +++ /dev/null @@ -1,87 +0,0 @@ -/*********************************************************************** - * - * (C) Copyright 2004 - * DENX Software Engineering - * Wolfgang Denk, wd@denx.de - * - * Keyboard driver - * - ***********************************************************************/ - -#include <common.h> -#include <console.h> -#include <input.h> - -#include <stdio_dev.h> -#include <keyboard.h> -#include <stdio_dev.h> - -static struct input_config config; - -static int kbd_read_keys(struct input_config *config) -{ -#if defined(CONFIG_ARCH_MPC8540) || \ - defined(CONFIG_ARCH_MPC8541) || defined(CONFIG_ARCH_MPC8555) - /* no ISR is used, so received chars must be polled */ - ps2ser_check(); -#endif - - return 1; -} - -static int check_leds(int ret) -{ - int leds; - - leds = input_leds_changed(&config); - if (leds >= 0) - pckbd_leds(leds); - - return ret; -} - -/* test if a character is in the queue */ -static int kbd_testc(struct stdio_dev *dev) -{ - return check_leds(input_tstc(&config)); -} - -/* gets the character from the queue */ -static int kbd_getc(struct stdio_dev *dev) -{ - return check_leds(input_getc(&config)); -} - -void handle_scancode(unsigned char scan_code) -{ - bool release = false; - - /* Compare with i8042_kbd_check() in i8042.c if some logic is missing */ - if (scan_code & 0x80) { - scan_code &= 0x7f; - release = true; - } - - input_add_keycode(&config, scan_code, release); -} - -/* TODO: convert to driver model */ -int kbd_init (void) -{ - struct stdio_dev kbddev; - struct input_config *input = &config; - - if(kbd_init_hw()==-1) - return -1; - memset (&kbddev, 0, sizeof(kbddev)); - strcpy(kbddev.name, "kbd"); - kbddev.flags = DEV_FLAGS_INPUT; - kbddev.getc = kbd_getc; - kbddev.tstc = kbd_testc; - - input_init(input, 0); - input->read_keys = kbd_read_keys; - input_add_tables(input, true); - - return input_stdio_register(&kbddev); -} |