2 * arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h
5 #ifndef __ASM_ARCH_EP93XX_KEYPAD_H
6 #define __ASM_ARCH_EP93XX_KEYPAD_H
8 #define MAX_MATRIX_KEY_ROWS (8)
9 #define MAX_MATRIX_KEY_COLS (8)
11 /* flags for the ep93xx_keypad driver */
12 #define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */
13 #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */
14 #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */
15 #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */
16 #define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */
17 #define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */
20 * struct ep93xx_keypad_platform_data - platform specific device structure
21 * @matrix_key_rows: number of rows in the keypad matrix
22 * @matrix_key_cols: number of columns in the keypad matrix
23 * @matrix_key_map: array of keycodes defining the keypad matrix
24 * @matrix_key_map_size: ARRAY_SIZE(matrix_key_map)
25 * @debounce: debounce start count; terminal count is 0xff
26 * @prescale: row/column counter pre-scaler load value
29 struct ep93xx_keypad_platform_data
{
30 unsigned int matrix_key_rows
;
31 unsigned int matrix_key_cols
;
32 unsigned int *matrix_key_map
;
33 int matrix_key_map_size
;
34 unsigned int debounce
;
35 unsigned int prescale
;
39 /* macro for creating the matrix_key_map table */
40 #define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val))
42 #endif /* __ASM_ARCH_EP93XX_KEYPAD_H */