^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * vivid-touch-cap.h - touch support functions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #ifndef _VIVID_TOUCH_CAP_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #define _VIVID_TOUCH_CAP_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #define VIVID_TCH_HEIGHT 12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define VIVID_TCH_WIDTH 21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define VIVID_MIN_PRESSURE 180
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define VIVID_PRESSURE_LIMIT 40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define TCH_SEQ_COUNT 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define TCH_PATTERN_COUNT 12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) enum vivid_tch_test {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) SINGLE_TAP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) DOUBLE_TAP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) TRIPLE_TAP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) MOVE_LEFT_TO_RIGHT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ZOOM_IN,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) ZOOM_OUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) PALM_PRESS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) MULTIPLE_PRESS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) TEST_CASE_MAX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) extern const struct vb2_ops vivid_touch_cap_qops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) int vivid_enum_fmt_tch(struct file *file, void *priv, struct v4l2_fmtdesc *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) int vivid_g_fmt_tch(struct file *file, void *priv, struct v4l2_format *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) int vivid_g_fmt_tch_mplane(struct file *file, void *priv, struct v4l2_format *f);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) int vivid_enum_input_tch(struct file *file, void *priv, struct v4l2_input *inp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) int vivid_g_input_tch(struct file *file, void *priv, unsigned int *i);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) int vivid_s_input_tch(struct file *file, void *priv, unsigned int i);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) void vivid_fillbuff_tch(struct vivid_dev *dev, struct vivid_buffer *buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) int vivid_set_touch(struct vivid_dev *dev, unsigned int i);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) int vivid_g_parm_tch(struct file *file, void *priv,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) struct v4l2_streamparm *parm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #endif