Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
4e353edf SK |
2 | #ifndef __KEYPAD_EP93XX_H |
3 | #define __KEYPAD_EP93XX_H | |
e06003af | 4 | |
a5abd95c HS |
5 | struct matrix_keymap_data; |
6 | ||
e06003af HS |
7 | /* flags for the ep93xx_keypad driver */ |
8 | #define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */ | |
9 | #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ | |
10 | #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ | |
11 | #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ | |
dfb6db00 | 12 | #define EP93XX_KEYPAD_AUTOREPEAT (1<<4) /* enable key autorepeat */ |
e06003af HS |
13 | |
14 | /** | |
15 | * struct ep93xx_keypad_platform_data - platform specific device structure | |
a5abd95c HS |
16 | * @keymap_data: pointer to &matrix_keymap_data |
17 | * @debounce: debounce start count; terminal count is 0xff | |
18 | * @prescale: row/column counter pre-scaler load value | |
19 | * @flags: see above | |
e06003af HS |
20 | */ |
21 | struct ep93xx_keypad_platform_data { | |
a5abd95c | 22 | struct matrix_keymap_data *keymap_data; |
e06003af HS |
23 | unsigned int debounce; |
24 | unsigned int prescale; | |
25 | unsigned int flags; | |
dfb6db00 | 26 | unsigned int clk_rate; |
e06003af HS |
27 | }; |
28 | ||
60214f05 HS |
29 | #define EP93XX_MATRIX_ROWS (8) |
30 | #define EP93XX_MATRIX_COLS (8) | |
e06003af | 31 | |
4e353edf | 32 | #endif /* __KEYPAD_EP93XX_H */ |