Sachin Kamat | 4e353ed | 2013-12-27 17:13:17 -0800 | [diff] [blame^] | 1 | #ifndef __KEYPAD_EP93XX_H |
| 2 | #define __KEYPAD_EP93XX_H |
H Hartley Sweeten | e06003a | 2009-04-18 23:43:57 -0700 | [diff] [blame] | 3 | |
H Hartley Sweeten | a5abd95 | 2010-01-13 00:34:12 -0800 | [diff] [blame] | 4 | struct matrix_keymap_data; |
| 5 | |
H Hartley Sweeten | e06003a | 2009-04-18 23:43:57 -0700 | [diff] [blame] | 6 | /* flags for the ep93xx_keypad driver */ |
| 7 | #define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */ |
| 8 | #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ |
| 9 | #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */ |
| 10 | #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */ |
| 11 | #define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */ |
| 12 | #define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */ |
| 13 | |
| 14 | /** |
| 15 | * struct ep93xx_keypad_platform_data - platform specific device structure |
H Hartley Sweeten | a5abd95 | 2010-01-13 00:34:12 -0800 | [diff] [blame] | 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 |
H Hartley Sweeten | e06003a | 2009-04-18 23:43:57 -0700 | [diff] [blame] | 20 | */ |
| 21 | struct ep93xx_keypad_platform_data { |
H Hartley Sweeten | a5abd95 | 2010-01-13 00:34:12 -0800 | [diff] [blame] | 22 | struct matrix_keymap_data *keymap_data; |
H Hartley Sweeten | e06003a | 2009-04-18 23:43:57 -0700 | [diff] [blame] | 23 | unsigned int debounce; |
| 24 | unsigned int prescale; |
| 25 | unsigned int flags; |
| 26 | }; |
| 27 | |
H Hartley Sweeten | 60214f0 | 2009-12-15 08:39:51 -0800 | [diff] [blame] | 28 | #define EP93XX_MATRIX_ROWS (8) |
| 29 | #define EP93XX_MATRIX_COLS (8) |
H Hartley Sweeten | e06003a | 2009-04-18 23:43:57 -0700 | [diff] [blame] | 30 | |
Sachin Kamat | 4e353ed | 2013-12-27 17:13:17 -0800 | [diff] [blame^] | 31 | #endif /* __KEYPAD_EP93XX_H */ |