]> asedeno.scripts.mit.edu Git - linux.git/blob - drivers/media/platform/vivid/vivid-touch-cap.h
media: vivid: Add touch support
[linux.git] / drivers / media / platform / vivid / vivid-touch-cap.h
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
15 enum 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
27 extern const struct vb2_ops vivid_touch_cap_qops;
28
29 int vivid_enum_fmt_tch(struct file *file, void  *priv, struct v4l2_fmtdesc *f);
30 int vivid_g_fmt_tch(struct file *file, void *priv, struct v4l2_format *f);
31 int vivid_enum_input_tch(struct file *file, void *priv, struct v4l2_input *inp);
32 int vivid_g_input_tch(struct file *file, void *priv, unsigned int *i);
33 int vivid_s_input_tch(struct file *file, void *priv, unsigned int i);
34 void vivid_fillbuff_tch(struct vivid_dev *dev, struct vivid_buffer *buf);
35 int vivid_set_touch(struct vivid_dev *dev, unsigned int i);
36 int vivid_g_parm_tch(struct file *file, void *priv,
37                      struct v4l2_streamparm *parm);
38 #endif