xref: /linux/Documentation/userspace-api/media/v4l/dev-touch.rst (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3.. _touch:
4
5*************
6Touch Devices
7*************
8
9Touch devices are accessed through character device special files named
10``/dev/v4l-touch0`` to ``/dev/v4l-touch255`` with major number 81 and
11dynamically allocated minor numbers 0 to 255.
12
13Overview
14========
15
16Sensors may be Optical, or Projected Capacitive touch (PCT).
17
18Processing is required to analyse the raw data and produce input events. In
19some systems, this may be performed on the ASIC and the raw data is purely a
20side-channel for diagnostics or tuning. In other systems, the ASIC is a simple
21analogue front end device which delivers touch data at high rate, and any touch
22processing must be done on the host.
23
24For capacitive touch sensing, the touchscreen is composed of an array of
25horizontal and vertical conductors (alternatively called rows/columns, X/Y
26lines, or tx/rx). Mutual Capacitance measured is at the nodes where the
27conductors cross. Alternatively, Self Capacitance measures the signal from each
28column and row independently.
29
30A touch input may be determined by comparing the raw capacitance measurement to
31a no-touch reference (or "baseline") measurement:
32
33Delta = Raw - Reference
34
35The reference measurement takes account of variations in the capacitance across
36the touch sensor matrix, for example manufacturing irregularities,
37environmental or edge effects.
38
39Querying Capabilities
40=====================
41
42Devices supporting the touch interface set the ``V4L2_CAP_VIDEO_CAPTURE`` flag
43and the ``V4L2_CAP_TOUCH`` flag in the ``capabilities`` field of
44:c:type:`v4l2_capability` returned by the
45:ref:`VIDIOC_QUERYCAP` ioctl.
46
47At least one of the read/write or streaming I/O methods must be
48supported.
49
50The formats supported by touch devices are documented in
51:ref:`Touch Formats <tch-formats>`.
52
53Data Format Negotiation
54=======================
55
56A touch device may support any I/O method.
57