summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAlex Sarraf <asarraf@codeaurora.org>2017-02-22 12:24:20 -0800
committerAlex Sarraf <asarraf@codeaurora.org>2017-04-13 14:30:49 -0700
commit14e89235dc188bd86f550770945e9f0e93110f1b (patch)
treed8f2c9044e2a61c4b039f63a54c5c9e013692eaa /include/uapi/linux
parent9898f867d919f610016c338b39127595cc532a07 (diff)
input: misc: hbtp_input: Support for Region of Interest/sensors
Add support for sensor and Region of Interest (ROI) events. Create new ioctl to receive sensor data from userspace. Create binary sysfs entries to expose data from kernel to userspace. Change-Id: Ifa76f08eb293c3da0618c22c07e65976319ea926 Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/hbtp_input.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/uapi/linux/hbtp_input.h b/include/uapi/linux/hbtp_input.h
index 9173c2ab72ed..3b124ffcdcf3 100644
--- a/include/uapi/linux/hbtp_input.h
+++ b/include/uapi/linux/hbtp_input.h
@@ -6,6 +6,8 @@
#define HBTP_MAX_FINGER 20
#define HBTP_ABS_MT_FIRST ABS_MT_TOUCH_MAJOR
#define HBTP_ABS_MT_LAST ABS_MT_TOOL_Y
+#define MAX_ROI_SIZE 144
+#define MAX_ACCEL_SIZE 128
#define HBTP_EVENT_TYPE_DISPLAY "EVENT_TYPE=HBTP_DISPLAY"
@@ -20,6 +22,11 @@ struct hbtp_input_touch {
__s32 orientation;
};
+struct hbtp_sensor_data {
+ __s16 accelBuffer[MAX_ACCEL_SIZE];
+ __s16 ROI[MAX_ROI_SIZE];
+};
+
struct hbtp_input_mt {
__s32 num_touches;
struct hbtp_input_touch touches[HBTP_MAX_FINGER];
@@ -68,6 +75,8 @@ enum hbtp_afe_power_ctrl {
enum hbtp_afe_signal)
#define HBTP_SET_POWER_CTRL _IOW(HBTP_INPUT_IOCTL_BASE, 206, \
enum hbtp_afe_power_ctrl)
+#define HBTP_SET_SENSORDATA _IOW(HBTP_INPUT_IOCTL_BASE, 207, \
+ struct hbtp_sensor_data)
#endif /* _UAPI_HBTP_INPUT_H */