xref: /OK3568_Linux_fs/u-boot/include/dt-bindings/input/input.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * This header provides constants for most input bindings.
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Most input bindings include key code, matrix key code format.
5*4882a593Smuzhiyun  * In most cases, key code and matrix key code format uses
6*4882a593Smuzhiyun  * the standard values/macro defined in this header.
7*4882a593Smuzhiyun  */
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #ifndef _DT_BINDINGS_INPUT_INPUT_H
10*4882a593Smuzhiyun #define _DT_BINDINGS_INPUT_INPUT_H
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include "linux-event-codes.h"
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #define MATRIX_KEY(row, col, code)	\
15*4882a593Smuzhiyun 	((((row) & 0xFF) << 24) | (((col) & 0xFF) << 16) | ((code) & 0xFFFF))
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #endif /* _DT_BINDINGS_INPUT_INPUT_H */
18