Re: [PATCH] Documentation: add support for V4L touch devices

2016-08-12 Thread Hans Verkuil
Hi Nick,

On 07/18/2016 11:11 PM, y...@shmanahar.org wrote:
> From: Nick Dyer 
> 
> Signed-off-by: Nick Dyer 

I'm missing documentation for the new V4L2_CAP_TOUCH capability and the
V4L2_INPUT_TYPE_TOUCH define.

> diff --git a/Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst 
> b/Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst
> new file mode 100644
> index 000..32e21f8
> --- /dev/null
> +++ b/Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst
> @@ -0,0 +1,78 @@
> +.. -*- coding: utf-8; mode: rst -*-
> +
> +.. _V4L2-TCH-FMT-DELTA-TU08:

The -DELTA part should be removed here and in tu16.rst.

> +
> +**
> +V4L2_TCH_FMT_DELTA_TU08 ('TU08')
> +**
> +
> +*man V4L2_TCH_FMT_DELTA_TU08(2)*

Ditto.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Documentation: add support for V4L touch devices

2016-07-18 Thread y
From: Nick Dyer 

Signed-off-by: Nick Dyer 
---
 Documentation/media/uapi/mediactl/media-types.rst |   24 +++--
 Documentation/media/uapi/v4l/dev-touch.rst|   55 ++
 Documentation/media/uapi/v4l/devices.rst  |1 +
 Documentation/media/uapi/v4l/pixfmt-tch-td08.rst  |   80 +++
 Documentation/media/uapi/v4l/pixfmt-tch-td16.rst  |  111 +
 Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst  |   78 +++
 Documentation/media/uapi/v4l/pixfmt-tch-tu16.rst  |  110 
 Documentation/media/uapi/v4l/pixfmt.rst   |1 +
 Documentation/media/uapi/v4l/tch-formats.rst  |   18 
 9 files changed, 471 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/media/uapi/v4l/dev-touch.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-tch-td08.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-tch-td16.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-tch-tu16.rst
 create mode 100644 Documentation/media/uapi/v4l/tch-formats.rst

diff --git a/Documentation/media/uapi/mediactl/media-types.rst 
b/Documentation/media/uapi/mediactl/media-types.rst
index c77717b..0265edc 100644
--- a/Documentation/media/uapi/mediactl/media-types.rst
+++ b/Documentation/media/uapi/mediactl/media-types.rst
@@ -429,6 +429,16 @@ Types and flags used to represent the media graph elements
 
 -  .. row 11
 
+   ..  _MEDIA-INTF-T-V4L-TOUCH:
+
+   -  ``MEDIA_INTF_T_V4L_TOUCH``
+
+   -  Device node interface for Touch device (V4L)
+
+   -  typically, /dev/v4l-touch?
+
+-  .. row 12
+
..  _MEDIA-INTF-T-ALSA-PCM-CAPTURE:
 
-  ``MEDIA_INTF_T_ALSA_PCM_CAPTURE``
@@ -437,7 +447,7 @@ Types and flags used to represent the media graph elements
 
-  typically, /dev/snd/pcmC?D?c
 
--  .. row 12
+-  .. row 13
 
..  _MEDIA-INTF-T-ALSA-PCM-PLAYBACK:
 
@@ -447,7 +457,7 @@ Types and flags used to represent the media graph elements
 
-  typically, /dev/snd/pcmC?D?p
 
--  .. row 13
+-  .. row 14
 
..  _MEDIA-INTF-T-ALSA-CONTROL:
 
@@ -457,7 +467,7 @@ Types and flags used to represent the media graph elements
 
-  typically, /dev/snd/controlC?
 
--  .. row 14
+-  .. row 15
 
..  _MEDIA-INTF-T-ALSA-COMPRESS:
 
@@ -467,7 +477,7 @@ Types and flags used to represent the media graph elements
 
-  typically, /dev/snd/compr?
 
--  .. row 15
+-  .. row 16
 
..  _MEDIA-INTF-T-ALSA-RAWMIDI:
 
@@ -477,7 +487,7 @@ Types and flags used to represent the media graph elements
 
-  typically, /dev/snd/midi?
 
--  .. row 16
+-  .. row 17
 
..  _MEDIA-INTF-T-ALSA-HWDEP:
 
@@ -487,7 +497,7 @@ Types and flags used to represent the media graph elements
 
-  typically, /dev/snd/hwC?D?
 
--  .. row 17
+-  .. row 18
 
..  _MEDIA-INTF-T-ALSA-SEQUENCER:
 
@@ -497,7 +507,7 @@ Types and flags used to represent the media graph elements
 
-  typically, /dev/snd/seq
 
--  .. row 18
+-  .. row 19
 
..  _MEDIA-INTF-T-ALSA-TIMER:
 
diff --git a/Documentation/media/uapi/v4l/dev-touch.rst 
b/Documentation/media/uapi/v4l/dev-touch.rst
new file mode 100644
index 000..5c71ee9
--- /dev/null
+++ b/Documentation/media/uapi/v4l/dev-touch.rst
@@ -0,0 +1,55 @@
+.. -*- coding: utf-8; mode: rst -*-
+
+.. _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``