xref: /OK3568_Linux_fs/kernel/include/linux/input/samsung-keypad.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Samsung Keypad platform data definitions
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 2010 Samsung Electronics Co.Ltd
6*4882a593Smuzhiyun  * Author: Joonyoung Shim <jy0922.shim@samsung.com>
7*4882a593Smuzhiyun  */
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #ifndef __SAMSUNG_KEYPAD_H
10*4882a593Smuzhiyun #define __SAMSUNG_KEYPAD_H
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include <linux/input/matrix_keypad.h>
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #define SAMSUNG_MAX_ROWS	8
15*4882a593Smuzhiyun #define SAMSUNG_MAX_COLS	8
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun /**
18*4882a593Smuzhiyun  * struct samsung_keypad_platdata - Platform device data for Samsung Keypad.
19*4882a593Smuzhiyun  * @keymap_data: pointer to &matrix_keymap_data.
20*4882a593Smuzhiyun  * @rows: number of keypad row supported.
21*4882a593Smuzhiyun  * @cols: number of keypad col supported.
22*4882a593Smuzhiyun  * @no_autorepeat: disable key autorepeat.
23*4882a593Smuzhiyun  * @wakeup: controls whether the device should be set up as wakeup source.
24*4882a593Smuzhiyun  * @cfg_gpio: configure the GPIO.
25*4882a593Smuzhiyun  *
26*4882a593Smuzhiyun  * Initialisation data specific to either the machine or the platform
27*4882a593Smuzhiyun  * for the device driver to use or call-back when configuring gpio.
28*4882a593Smuzhiyun  */
29*4882a593Smuzhiyun struct samsung_keypad_platdata {
30*4882a593Smuzhiyun 	const struct matrix_keymap_data	*keymap_data;
31*4882a593Smuzhiyun 	unsigned int rows;
32*4882a593Smuzhiyun 	unsigned int cols;
33*4882a593Smuzhiyun 	bool no_autorepeat;
34*4882a593Smuzhiyun 	bool wakeup;
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun 	void (*cfg_gpio)(unsigned int rows, unsigned int cols);
37*4882a593Smuzhiyun };
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun #endif /* __SAMSUNG_KEYPAD_H */
40