diff options
Diffstat (limited to 'arch/arm/mach-ep93xx/include')
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h b/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h new file mode 100644 index 000000000000..83f31cd0a274 --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_EP93XX_KEYPAD_H | ||
6 | #define __ASM_ARCH_EP93XX_KEYPAD_H | ||
7 | |||
8 | #define MAX_MATRIX_KEY_ROWS (8) | ||
9 | #define MAX_MATRIX_KEY_COLS (8) | ||
10 | |||
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 */ | ||
18 | |||
19 | /** | ||
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 | ||
27 | * @flags: see above | ||
28 | */ | ||
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; | ||
36 | unsigned int flags; | ||
37 | }; | ||
38 | |||
39 | /* macro for creating the matrix_key_map table */ | ||
40 | #define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val)) | ||
41 | |||
42 | #endif /* __ASM_ARCH_EP93XX_KEYPAD_H */ | ||