UDM-keyboard.txt 1.8 KB

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