xref: /OK3568_Linux_fs/kernel/include/linux/platform_data/lm8323.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * lm8323.h - Configuration for LM8323 keypad driver.
4*4882a593Smuzhiyun  */
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun #ifndef __LINUX_LM8323_H
7*4882a593Smuzhiyun #define __LINUX_LM8323_H
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #include <linux/types.h>
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun /*
12*4882a593Smuzhiyun  * Largest keycode that the chip can send, plus one,
13*4882a593Smuzhiyun  * so keys can be mapped directly at the index of the
14*4882a593Smuzhiyun  * LM8323 keycode instead of subtracting one.
15*4882a593Smuzhiyun  */
16*4882a593Smuzhiyun #define LM8323_KEYMAP_SIZE	(0x7f + 1)
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun #define LM8323_NUM_PWMS		3
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun struct lm8323_platform_data {
21*4882a593Smuzhiyun 	int debounce_time; /* Time to watch for key bouncing, in ms. */
22*4882a593Smuzhiyun 	int active_time; /* Idle time until sleep, in ms. */
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun 	int size_x;
25*4882a593Smuzhiyun 	int size_y;
26*4882a593Smuzhiyun 	bool repeat;
27*4882a593Smuzhiyun 	const unsigned short *keymap;
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun 	const char *pwm_names[LM8323_NUM_PWMS];
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun 	const char *name; /* Device name. */
32*4882a593Smuzhiyun };
33*4882a593Smuzhiyun 
34*4882a593Smuzhiyun #endif /* __LINUX_LM8323_H */
35