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