요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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
========
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,
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 Negotiation
=======================
A touch device may support any I/O method.
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는 동적으로 할당됩니다.
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-36Touch 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가 달라지는 현상을 반영합니다.
도체 배열에서 signal을 읽는 두 방식을 비교합니다.
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-52Touch 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>` 참조 절에 정의되어 있습니다.
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-56Touch 장치는 V4L2가 정의하는 어떤 I/O method도 지원할 수 있습니다. Application은 capability와 지원 format을 조회한 뒤 장치가 제공하는 method로 data format을 협상합니다.
Capability 조회에서 format 협상으로 이어지는 순서입니다.
Data Format Negotiation
=======================
A touch device may support any I/O method.
요약·해설
dev-touch.rst:1-56Touch 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를 선택해야 합니다.