← Documents Documentation/userspace-api/media/v4l/dev-touch.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / V4L

Touch 장치

V4L2 touch node, raw capacitance 처리, capability와 data format 협상을 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/dev-touch.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

dev-touch.rst:1-56

Touch node는 major 81의 `/dev/v4l-touch*`로 노출됩니다. Raw capacitance와 baseline의 차이를 ASIC 또는 host에서 처리해 input event를 생성합니다.

Application은 `VIDIOC_QUERYCAP`에서 `V4L2_CAP_VIDEO_CAPTURE`와 `V4L2_CAP_TOUCH`를 함께 확인하고, 장치가 지원하는 touch format과 I/O method를 선택해야 합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Touch character device node

1-14

이 문서는 `GFDL-1.1-no-invariants-or-later` 조건으로 제공되며 `touch` 참조 anchor에서 Touch 장치 인터페이스를 정의합니다.

Touch 장치는 `/dev/v4l-touch0`부터 `/dev/v4l-touch255`까지의 character device special file로 접근합니다. Major number는 81이고 minor number 0~255는 동적으로 할당됩니다.

Touch device node 범위
항목설명
Node/dev/v4l-touch0 ... /dev/v4l-touch255
Major81
Minor0~255, 동적 할당

V4L2 touch node의 이름과 device number 규칙입니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later

.. _touch:

*************
Touch Devices
*************

Touch devices are accessed through character device special files named
``/dev/v4l-touch0`` to ``/dev/v4l-touch255`` with major number 81 and
dynamically allocated minor numbers 0 to 255.

Overview
========

Sensor와 raw capacitance 처리

15-36

Touch sensor는 optical 방식 또는 projected capacitive touch(PCT) 방식일 수 있습니다.

Raw data를 분석해 input event를 만들려면 processing이 필요합니다. 어떤 system에서는 ASIC이 이를 수행하고 raw data는 diagnostics 또는 tuning을 위한 side channel로만 제공됩니다. 다른 system에서는 ASIC이 고속 touch data를 전달하는 단순한 analogue front end이므로 모든 touch processing을 host에서 수행해야 합니다.

Capacitive touch screen은 horizontal·vertical conductor 배열로 구성됩니다. 이 도체들은 rows/columns, X/Y lines 또는 tx/rx라고도 합니다. Mutual Capacitance는 도체가 교차하는 node에서 측정하고, Self Capacitance는 각 column과 row의 signal을 서로 독립적으로 측정합니다.

Touch input은 raw capacitance와 touch가 없는 reference, 즉 baseline 측정값을 비교해 판정할 수 있습니다. 계산식은 `Delta = Raw - Reference`입니다.

Reference 측정값은 제조 불균일, 환경 영향, edge effect 등으로 touch sensor matrix 전체에서 capacitance가 달라지는 현상을 반영합니다.

Capacitance 측정 방식
항목설명
Mutual CapacitanceHorizontal/vertical conductor가 교차하는 node별 측정
Self Capacitance각 column과 row의 signal을 독립적으로 측정

도체 배열에서 signal을 읽는 두 방식을 비교합니다.

Raw touch data 처리
Sensor matrix에서 Raw capacitance 측정No-touch Reference 또는 baseline 적용Delta = Raw - Reference 계산ASIC 또는 host에서 touch 분석Input event 생성

Sensor 측정값에서 input event를 만드는 기본 흐름입니다.


Sensors may be Optical, or Projected Capacitive touch (PCT).

Processing is required to analyse the raw data and produce input events. In
some systems, this may be performed on the ASIC and the raw data is purely a
side-channel for diagnostics or tuning. In other systems, the ASIC is a simple
analogue front end device which delivers touch data at high rate, and any touch
processing must be done on the host.

For capacitive touch sensing, the touchscreen is composed of an array of
horizontal and vertical conductors (alternatively called rows/columns, X/Y
lines, or tx/rx). Mutual Capacitance measured is at the nodes where the
conductors cross. Alternatively, Self Capacitance measures the signal from each
column and row independently.

A touch input may be determined by comparing the raw capacitance measurement to
a no-touch reference (or "baseline") measurement:

Delta = Raw - Reference

The reference measurement takes account of variations in the capacitance across
the touch sensor matrix, for example manufacturing irregularities,

Capability 조회와 touch format

37-52

Touch interface를 지원하는 장치는 `VIDIOC_QUERYCAP` ioctl이 반환하는 `v4l2_capability`의 `capabilities` field에 `V4L2_CAP_VIDEO_CAPTURE`와 `V4L2_CAP_TOUCH` flag를 모두 설정합니다.

Read/write I/O 또는 streaming I/O method 가운데 적어도 하나를 지원해야 합니다.

Touch 장치가 지원하는 format은 `Touch Formats <tch-formats>` 참조 절에 정의되어 있습니다.

Touch capability 확인
항목설명
ioctlVIDIOC_QUERYCAP
구조체v4l2_capability
필수 flagsV4L2_CAP_VIDEO_CAPTURE + V4L2_CAP_TOUCH
필수 I/ORead/write 또는 streaming 중 하나 이상

Application이 touch node 지원 여부를 판별하는 항목입니다.

environmental or edge effects.

Querying Capabilities
=====================

Devices supporting the touch interface set the ``V4L2_CAP_VIDEO_CAPTURE`` flag
and the ``V4L2_CAP_TOUCH`` flag in the ``capabilities`` field of
:c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl.

At least one of the read/write or streaming I/O methods must be
supported.

The formats supported by touch devices are documented in
:ref:`Touch Formats <tch-formats>`.

Data format 협상

53-56

Touch 장치는 V4L2가 정의하는 어떤 I/O method도 지원할 수 있습니다. Application은 capability와 지원 format을 조회한 뒤 장치가 제공하는 method로 data format을 협상합니다.

Touch I/O 선택
VIDIOC_QUERYCAP 호출V4L2_CAP_TOUCH와 capture capability 확인Touch Formats 열거 및 선택지원되는 I/O method로 data 교환

Capability 조회에서 format 협상으로 이어지는 순서입니다.

Data Format Negotiation
=======================

A touch device may support any I/O method.