blob: 5babfc55f19c8315968f9d9125d5ff2a540d4fdb [file] [log] [blame]
Marek Vasut909bbcc2012-08-08 01:42:17 +00001The U-Boot Driver Model Project
2===============================
3Keyboard input analysis
4=======================
5Marek Vasut <marek.vasut@gmail.com>
62012-02-20
7
8I) Overview
9-----------
10
11The keyboard drivers are most often registered with STDIO subsystem. There are
12components of the keyboard drivers though, which operate in severe ad-hoc
13manner, often being related to interrupt-driven keypress reception. This
14components will require the most sanitization of all parts of keyboard input
15subsystem.
16
17Otherwise, the keyboard is no different from other standard input but with the
18necessity to decode scancodes. These are decoded using tables provided by
19keyboard drivers. These tables are often driver specific.
20
21II) Approach
22------------
23
24The most problematic part is the interrupt driven keypress reception. For this,
25the buffers that are currently shared throughout the whole U-Boot would need to
26be converted into driver's private data.
27
28III) Analysis of in-tree drivers
29--------------------------------
30
Masahiro Yamadaa756da92013-09-24 10:32:04 +090031 board/mpl/common/kbd.c
32 ----------------------
Marek Vasut909bbcc2012-08-08 01:42:17 +000033 This driver is a classic STDIO driver, no problem with conversion is expected.
34 Only necessary change will be to move this driver to a proper location.
35
Masahiro Yamadaa756da92013-09-24 10:32:04 +090036 board/rbc823/kbd.c
37 ------------------
Marek Vasut909bbcc2012-08-08 01:42:17 +000038 This driver is a classic STDIO driver, no problem with conversion is expected.
39 Only necessary change will be to move this driver to a proper location.
40
Masahiro Yamadaa756da92013-09-24 10:32:04 +090041 drivers/input/keyboard.c
42 ------------------------
Marek Vasut909bbcc2012-08-08 01:42:17 +000043 This driver is special in many ways. Firstly because this is a universal stub
44 driver for converting scancodes from i8042 and the likes. Secondly because the
45 buffer is filled by various other ad-hoc implementations of keyboard input by
46 using this buffer as an extern. This will need to be fixed by allowing drivers
47 to pass certain routines to this driver via platform data.