blob: 0e36818e368056f849920788207986c8b32ef36e [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sachin Kamat4e353ed2013-12-27 17:13:17 -08002#ifndef __KEYPAD_EP93XX_H
3#define __KEYPAD_EP93XX_H
H Hartley Sweetene06003a2009-04-18 23:43:57 -07004
H Hartley Sweetena5abd952010-01-13 00:34:12 -08005struct matrix_keymap_data;
6
H Hartley Sweetene06003a2009-04-18 23:43:57 -07007/* 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 */
12#define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */
13#define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */
14
15/**
16 * struct ep93xx_keypad_platform_data - platform specific device structure
H Hartley Sweetena5abd952010-01-13 00:34:12 -080017 * @keymap_data: pointer to &matrix_keymap_data
18 * @debounce: debounce start count; terminal count is 0xff
19 * @prescale: row/column counter pre-scaler load value
20 * @flags: see above
H Hartley Sweetene06003a2009-04-18 23:43:57 -070021 */
22struct ep93xx_keypad_platform_data {
H Hartley Sweetena5abd952010-01-13 00:34:12 -080023 struct matrix_keymap_data *keymap_data;
H Hartley Sweetene06003a2009-04-18 23:43:57 -070024 unsigned int debounce;
25 unsigned int prescale;
26 unsigned int flags;
27};
28
H Hartley Sweeten60214f02009-12-15 08:39:51 -080029#define EP93XX_MATRIX_ROWS (8)
30#define EP93XX_MATRIX_COLS (8)
H Hartley Sweetene06003a2009-04-18 23:43:57 -070031
Sachin Kamat4e353ed2013-12-27 17:13:17 -080032#endif /* __KEYPAD_EP93XX_H */