Himanshu Aggarwal | bafe727 | 2015-07-20 19:32:49 +0530 | [diff] [blame] | 1 | #ifndef _UAPI_HBTP_INPUT_H |
| 2 | #define _UAPI_HBTP_INPUT_H |
| 3 | |
| 4 | #include <linux/input.h> |
| 5 | |
| 6 | #define HBTP_MAX_FINGER 20 |
| 7 | #define HBTP_ABS_MT_FIRST ABS_MT_TOUCH_MAJOR |
| 8 | #define HBTP_ABS_MT_LAST ABS_MT_TOOL_Y |
| 9 | |
| 10 | #define HBTP_EVENT_TYPE_DISPLAY "EVENT_TYPE=HBTP_DISPLAY" |
| 11 | |
| 12 | struct hbtp_input_touch { |
| 13 | bool active; |
| 14 | __s32 tool; |
| 15 | __s32 x; |
| 16 | __s32 y; |
| 17 | __s32 pressure; |
| 18 | __s32 major; |
| 19 | __s32 minor; |
| 20 | __s32 orientation; |
| 21 | }; |
| 22 | |
| 23 | struct hbtp_input_mt { |
| 24 | __s32 num_touches; |
| 25 | struct hbtp_input_touch touches[HBTP_MAX_FINGER]; |
| 26 | struct timeval time_val; |
| 27 | }; |
| 28 | |
| 29 | struct hbtp_input_absinfo { |
| 30 | bool active; |
| 31 | __u16 code; |
| 32 | __s32 minimum; |
| 33 | __s32 maximum; |
| 34 | }; |
| 35 | |
| 36 | enum hbtp_afe_power_cmd { |
| 37 | HBTP_AFE_POWER_ON, |
| 38 | HBTP_AFE_POWER_OFF, |
| 39 | }; |
| 40 | |
| 41 | struct hbtp_input_key { |
| 42 | __u32 code; |
| 43 | __s32 value; |
| 44 | }; |
| 45 | |
| 46 | enum hbtp_afe_signal { |
| 47 | HBTP_AFE_SIGNAL_ON_RESUME, |
| 48 | HBTP_AFE_SIGNAL_ON_SUSPEND, |
| 49 | }; |
| 50 | |
| 51 | enum hbtp_afe_power_ctrl { |
| 52 | HBTP_AFE_POWER_ENABLE_SYNC, |
| 53 | HBTP_AFE_POWER_ENABLE_SYNC_SIGNAL, |
| 54 | }; |
| 55 | |
| 56 | |
| 57 | /* ioctl */ |
| 58 | #define HBTP_INPUT_IOCTL_BASE 'T' |
| 59 | #define HBTP_SET_ABSPARAM _IOW(HBTP_INPUT_IOCTL_BASE, 201, \ |
| 60 | struct hbtp_input_absinfo *) |
| 61 | #define HBTP_SET_TOUCHDATA _IOW(HBTP_INPUT_IOCTL_BASE, 202, \ |
| 62 | struct hbtp_input_mt) |
| 63 | #define HBTP_SET_POWERSTATE _IOW(HBTP_INPUT_IOCTL_BASE, 203, \ |
| 64 | enum hbtp_afe_power_cmd) |
| 65 | #define HBTP_SET_KEYDATA _IOW(HBTP_INPUT_IOCTL_BASE, 204, \ |
| 66 | struct hbtp_input_key) |
| 67 | #define HBTP_SET_SYNCSIGNAL _IOW(HBTP_INPUT_IOCTL_BASE, 205, \ |
| 68 | enum hbtp_afe_signal) |
| 69 | #define HBTP_SET_POWER_CTRL _IOW(HBTP_INPUT_IOCTL_BASE, 206, \ |
| 70 | enum hbtp_afe_power_ctrl) |
| 71 | |
| 72 | #endif /* _UAPI_HBTP_INPUT_H */ |
| 73 | |