Low-Level Keypad Driver
i.MX51 EVK Linux Reference Manual
20-2
Freescale Semiconductor
Every keypress or release follows the debounce state machine shown i
. The
mxc_kpp_scan_matrix
function is called for every keypress and release interrupt.
Figure 20-1. Keypad Driver State Machine
The keypad driver registers the input device structure within the
__init
function by calling
input_register_device(&mxckbd_dev)
.
The driver sets input bit fields and conveys all the events that can be generated by this input device to other
parts of the input systems. The keypad driver can generate only
EV_KEY
type events. This can be indicated
using
__set_bit(EV_KEY, mxckbd_dev.evbit)
.
The keypress key codes are reported by calling
input_event()
. The reported key press/release events are
passed to the event interface (
/dev/input/event0
). This event interface is created when the
evdev.c
executable, located in
<ltib_dir>/rpm/BUILD/linux/drivers/input
, is compiled. The event interface is a
generic input event interface. It passes the events generated in the kernel to the user space with timestamps.
Blocking reads, non-blocking reads and
select()
can be done on
/dev/input/event0
.
The structure of
input_event
is as follows:
struct input_event {
struct timeval time;
unsigned short type;
unsigned short code;
unsigned int value;
};
Summary of Contents for i.MX51 EVK
Page 1: ...Part Number 924 76374 Rev 10 11 01 11 2010 i MX51 EVK Linux Reference Manual...
Page 14: ...i MX51 EVK Linux Reference Manual xiv Freescale Semiconductor...
Page 18: ...i MX51 EVK Linux Reference Manual xviii Freescale Semiconductor...
Page 24: ...i MX51 EVK Linux Reference Manual xxiv Freescale Semiconductor...
Page 38: ...Machine Specific Layer MSL i MX51 EVK Linux Reference Manual 2 8 Freescale Semiconductor...
Page 52: ...MC13892 Digitizer Driver i MX51 EVK Linux Reference Manual 5 4 Freescale Semiconductor...
Page 64: ...TV Encoder TVE Driver i MX51 EVK Linux Reference Manual 10 4 Freescale Semiconductor...
Page 82: ...Video for Linux Two V4L2 Driver i MX51 EVK Linux Reference Manual 12 8 Freescale Semiconductor...
Page 86: ...i MX5 Dual Display i MX51 EVK Linux Reference Manual 13 4 Freescale Semiconductor...
Page 100: ...X Windows Acceleration i MX51 EVK Linux Reference Manual 16 6 Freescale Semiconductor...
Page 118: ...Low Level Keypad Driver i MX51 EVK Linux Reference Manual 20 6 Freescale Semiconductor...
Page 134: ...Security Drivers i MX51 EVK Linux Reference Manual 22 10 Freescale Semiconductor...
Page 148: ...Inter IC I2C Driver i MX51 EVK Linux Reference Manual 24 4 Freescale Semiconductor...
Page 178: ...ARC USB Driver i MX51 EVK Linux Reference Manual 29 10 Freescale Semiconductor...
Page 194: ...OProfile i MX51 EVK Linux Reference Manual 33 6 Freescale Semiconductor...