summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorHimanshu Aggarwal <haggarwa@codeaurora.org>2015-07-20 19:32:49 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:58:01 -0700
commit8366ca71813ba9a97bfb3141863fab9a62e181bf (patch)
tree744b0bd5bfd079a67778c92ea46c3ca169e8d958 /include/uapi
parent937a5478fed52f0b1eed3ec2ed24549983b9dfb7 (diff)
input: hbtp_input: Port and add snapshot of changes from msm-3.10
Port the HBTP Input driver and apply the following driver changes taken from msm-3.10 kernel branch as of msm-3.10 commit. 31773451 input: misc: add input driver for HBTP 20bf9c5f input: hbtp_input: bypass alphabetical and numeric key config e424ee72 input: misc: hbtp-input: add event type in uevents Change-Id: I122d22cf738c747bcd43ec7f90c33a239288fd9d Signed-off-by: Jing Lin <jinglin@codeaurora.org> Signed-off-by: Chun Zhang <chunz@codeaurora.org> Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/hbtp_input.h58
2 files changed, 59 insertions, 0 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 671e98bf2496..3589e9d08ffb 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -145,6 +145,7 @@ header-y += gen_stats.h
header-y += gfs2_ondisk.h
header-y += gigaset_dev.h
header-y += gsmmux.h
+header-y += hbtp_input.h
header-y += hdlcdrv.h
header-y += hdlc.h
header-y += hdreg.h
diff --git a/include/uapi/linux/hbtp_input.h b/include/uapi/linux/hbtp_input.h
new file mode 100644
index 000000000000..67692ed8e3b8
--- /dev/null
+++ b/include/uapi/linux/hbtp_input.h
@@ -0,0 +1,58 @@
+#ifndef _UAPI_HBTP_INPUT_H
+#define _UAPI_HBTP_INPUT_H
+
+#include <linux/input.h>
+
+#define HBTP_MAX_FINGER 20
+#define HBTP_ABS_MT_FIRST ABS_MT_TOUCH_MAJOR
+#define HBTP_ABS_MT_LAST ABS_MT_TOOL_Y
+
+#define HBTP_EVENT_TYPE_DISPLAY "EVENT_TYPE=HBTP_DISPLAY"
+
+struct hbtp_input_touch {
+ bool active;
+ __s32 tool;
+ __s32 x;
+ __s32 y;
+ __s32 pressure;
+ __s32 major;
+ __s32 minor;
+ __s32 orientation;
+};
+
+struct hbtp_input_mt {
+ __s32 num_touches;
+ struct hbtp_input_touch touches[HBTP_MAX_FINGER];
+ struct timeval time_val;
+};
+
+struct hbtp_input_absinfo {
+ bool active;
+ __u16 code;
+ __s32 minimum;
+ __s32 maximum;
+};
+
+enum hbtp_afe_power_cmd {
+ HBTP_AFE_POWER_ON,
+ HBTP_AFE_POWER_OFF,
+};
+
+struct hbtp_input_key {
+ __u32 code;
+ __s32 value;
+};
+
+/* ioctl */
+#define HBTP_INPUT_IOCTL_BASE 'T'
+#define HBTP_SET_ABSPARAM _IOW(HBTP_INPUT_IOCTL_BASE, 201, \
+ struct hbtp_input_absinfo *)
+#define HBTP_SET_TOUCHDATA _IOW(HBTP_INPUT_IOCTL_BASE, 202, \
+ struct hbtp_input_mt)
+#define HBTP_SET_POWERSTATE _IOW(HBTP_INPUT_IOCTL_BASE, 203, \
+ enum hbtp_afe_power_cmd)
+#define HBTP_SET_KEYDATA _IOW(HBTP_INPUT_IOCTL_BASE, 204, \
+ struct hbtp_input_key)
+
+#endif /* _UAPI_HBTP_INPUT_H */
+