xref: /OK3568_Linux_fs/kernel/include/linux/tca6416_keypad.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * tca6416 keypad platform support
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 2010 Texas Instruments
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  * Author: Sriramakrishnan <srk@ti.com>
8*4882a593Smuzhiyun  */
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #ifndef _TCA6416_KEYS_H
11*4882a593Smuzhiyun #define _TCA6416_KEYS_H
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #include <linux/types.h>
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun struct tca6416_button {
16*4882a593Smuzhiyun 	/* Configuration parameters */
17*4882a593Smuzhiyun 	int code;		/* input event code (KEY_*, SW_*) */
18*4882a593Smuzhiyun 	int active_low;
19*4882a593Smuzhiyun 	int type;		/* input event type (EV_KEY, EV_SW) */
20*4882a593Smuzhiyun };
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun struct tca6416_keys_platform_data {
23*4882a593Smuzhiyun 	struct tca6416_button *buttons;
24*4882a593Smuzhiyun 	int nbuttons;
25*4882a593Smuzhiyun 	unsigned int rep:1;	/* enable input subsystem auto repeat */
26*4882a593Smuzhiyun 	uint16_t pinmask;
27*4882a593Smuzhiyun 	uint16_t invert;
28*4882a593Smuzhiyun 	int irq_is_gpio;
29*4882a593Smuzhiyun 	int use_polling;	/* use polling if Interrupt is not connected*/
30*4882a593Smuzhiyun };
31*4882a593Smuzhiyun #endif
32