From patchwork Fri Jul 8 11:25:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Dyer X-Patchwork-Id: 9220537 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5ABFD6127B for ; Fri, 8 Jul 2016 11:28:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A4F6286EA for ; Fri, 8 Jul 2016 11:28:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D55B286ED; Fri, 8 Jul 2016 11:28:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8C86286FA for ; Fri, 8 Jul 2016 11:28:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754826AbcGHL04 (ORCPT ); Fri, 8 Jul 2016 07:26:56 -0400 Received: from kdh-gw.itdev.co.uk ([89.21.227.133]:61665 "EHLO hermes.kdh.itdev.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754360AbcGHL0M (ORCPT ); Fri, 8 Jul 2016 07:26:12 -0400 Received: from bumblebee.kdh.itdev.co.uk (bumblebee.kdh.itdev.co.uk [192.168.1.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hermes.kdh.itdev.co.uk (Postfix) with ESMTPSA id 4936D7F3F6; Fri, 8 Jul 2016 12:26:09 +0100 (BST) From: Nick Dyer To: Dmitry Torokhov , Hans Verkuil Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Benjamin Tissoires , Benson Leung , Alan Bowens , Javier Martinez Canillas , Chris Healy , Henrik Rydberg , Andrew Duggan , James Chen , Dudley Du , Andrew de los Reyes , sheckylin@chromium.org, Peter Hutterer , Florian Echtler , mchehab@osg.samsung.com, jon.older@itdev.co.uk, nick.dyer@itdev.co.uk, Nick Dyer Subject: [PATCH v7 03/11] DocBook: add support for touch devices Date: Fri, 8 Jul 2016 12:25:56 +0100 Message-Id: <1467977164-17551-4-git-send-email-nick@shmanahar.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1467977164-17551-1-git-send-email-nick@shmanahar.org> References: <1467977164-17551-1-git-send-email-nick@shmanahar.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nick Dyer --- Documentation/DocBook/media/v4l/dev-touch.xml | 51 ++++++++++++ Documentation/DocBook/media/v4l/media-types.xml | 5 ++ .../DocBook/media/v4l/pixfmt-tch-td08.xml | 66 ++++++++++++++++ .../DocBook/media/v4l/pixfmt-tch-td16.xml | 82 ++++++++++++++++++++ .../DocBook/media/v4l/pixfmt-tch-tu08.xml | 66 ++++++++++++++++ .../DocBook/media/v4l/pixfmt-tch-tu16.xml | 81 +++++++++++++++++++ Documentation/DocBook/media/v4l/pixfmt.xml | 13 ++++ Documentation/DocBook/media/v4l/v4l2.xml | 1 + 8 files changed, 365 insertions(+) create mode 100644 Documentation/DocBook/media/v4l/dev-touch.xml create mode 100644 Documentation/DocBook/media/v4l/pixfmt-tch-td08.xml create mode 100644 Documentation/DocBook/media/v4l/pixfmt-tch-td16.xml create mode 100644 Documentation/DocBook/media/v4l/pixfmt-tch-tu08.xml create mode 100644 Documentation/DocBook/media/v4l/pixfmt-tch-tu16.xml diff --git a/Documentation/DocBook/media/v4l/dev-touch.xml b/Documentation/DocBook/media/v4l/dev-touch.xml new file mode 100644 index 0000000..85d492a --- /dev/null +++ b/Documentation/DocBook/media/v4l/dev-touch.xml @@ -0,0 +1,51 @@ +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 in the + capabilities field of &v4l2-capability; + returned by the &VIDIOC-QUERYCAP; ioctl. + + At least one of the read/write or streaming I/O methods must be + supported. +
+ +
+ Data Format Negotiation + + A touch device may support any I/O method. +
diff --git a/Documentation/DocBook/media/v4l/media-types.xml b/Documentation/DocBook/media/v4l/media-types.xml index 5e3f20f..fb957c7 100644 --- a/Documentation/DocBook/media/v4l/media-types.xml +++ b/Documentation/DocBook/media/v4l/media-types.xml @@ -202,6 +202,11 @@ typically, /dev/swradio? + MEDIA_INTF_T_V4L_TOUCH + Device node interface for Touch device (V4L) + typically, /dev/v4l-touch? + + MEDIA_INTF_T_ALSA_PCM_CAPTURE Device node interface for ALSA PCM Capture typically, /dev/snd/pcmC?D?c diff --git a/Documentation/DocBook/media/v4l/pixfmt-tch-td08.xml b/Documentation/DocBook/media/v4l/pixfmt-tch-td08.xml new file mode 100644 index 0000000..2483eb0 --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-tch-td08.xml @@ -0,0 +1,66 @@ + + + V4L2_TCH_FMT_DELTA_TD08 ('TD08') + &manvol; + + + V4L2_TCH_FMT_DELTA_TD08 + 8-bit signed Touch Delta + + + Description + + This format represents delta data from a touch controller + + Delta values may range from -128 to 127. Typically the values + will vary through a small range depending on whether the sensor is + touched or not. The full value may be seen if one of the + touchscreen nodes has a fault or the line is not connected. + + + <constant>V4L2_TCH_FMT_DELTA_TD08</constant> 4 × 4 + node matrix + + + Byte Order. + Each cell is one byte. + + + + + + start + 0: + D'00 + D'01 + D'02 + D'03 + + + start + 4: + D'10 + D'11 + D'12 + D'13 + + + start + 8: + D'20 + D'21 + D'22 + D'23 + + + start + 12: + D'30 + D'31 + D'32 + D'33 + + + + + + + + + diff --git a/Documentation/DocBook/media/v4l/pixfmt-tch-td16.xml b/Documentation/DocBook/media/v4l/pixfmt-tch-td16.xml new file mode 100644 index 0000000..72f6245 --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-tch-td16.xml @@ -0,0 +1,82 @@ + + + V4L2_TCH_FMT_DELTA_TD16 ('TD16') + &manvol; + + + V4L2_TCH_FMT_DELTA_TD16 + 16-bit signed Touch Delta + + + Description + + This format represents delta data from a touch controller + + Delta values may range from -32768 to 32767. Typically the values + will vary through a small range depending on whether the sensor is + touched or not. The full value may be seen if one of the + touchscreen nodes has a fault or the line is not connected. + + + <constant>V4L2_TCH_FMT_DELTA_TD16</constant> 4 × 4 + node matrix + + + Byte Order. + Each cell is one byte. + + + + + + start + 0: + D'00low + D'00high + D'01low + D'01high + D'02low + D'02high + D'03low + D'03high + + + start + 8: + D'10low + D'10high + D'11low + D'11high + D'12low + D'12high + D'13low + D'13high + + + start + 16: + D'20low + D'20high + D'21low + D'21high + D'22low + D'22high + D'23low + D'23high + + + start + 24: + D'30low + D'30high + D'31low + D'31high + D'32low + D'32high + D'33low + D'33high + + + + + + + + + diff --git a/Documentation/DocBook/media/v4l/pixfmt-tch-tu08.xml b/Documentation/DocBook/media/v4l/pixfmt-tch-tu08.xml new file mode 100644 index 0000000..24f76ab --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-tch-tu08.xml @@ -0,0 +1,66 @@ + + + V4L2_TCH_FMT_TU08 ('TU08') + &manvol; + + + V4L2_TCH_FMT_TU08 + 8-bit unsigned raw touch data + + + Description + + This format represents unsigned 8-bit data from a touch + controller. + + This may be used for output for raw and reference data. Values may + range from 0 to 255. + + + <constant>V4L2_TCH_FMT_TU08</constant> 4 × 4 + node matrix + + + Byte Order. + Each cell is one byte. + + + + + + start + 0: + R'00 + R'01 + R'02 + R'03 + + + start + 4: + R'10 + R'11 + R'12 + R'13 + + + start + 8: + R'20 + R'21 + R'22 + R'23 + + + start + 12: + R'30 + R'31 + R'32 + R'33 + + + + + + + + + + diff --git a/Documentation/DocBook/media/v4l/pixfmt-tch-tu16.xml b/Documentation/DocBook/media/v4l/pixfmt-tch-tu16.xml new file mode 100644 index 0000000..2db69af --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-tch-tu16.xml @@ -0,0 +1,81 @@ + + + V4L2_TCH_FMT_TU16 ('TU16') + &manvol; + + + V4L2_TCH_FMT_TU16 + 16-bit unsigned raw touch data + + + Description + + This format represents unsigned 16-bit data from a touch + controller. + + This may be used for output for raw and reference data. Values may + range from 0 to 65535. + + + <constant>V4L2_TCH_FMT_TU16</constant> 4 × 4 + node matrix + + + Byte Order. + Each cell is one byte. + + + + + + start + 0: + R'00low + R'00high + R'01low + R'01high + R'02low + R'02high + R'03low + R'03high + + + start + 8: + R'10low + R'10high + R'11low + R'11high + R'12low + R'12high + R'13low + R'13high + + + start + 16: + R'20low + R'20high + R'21low + R'21high + R'22low + R'22high + R'23low + R'23high + + + start + 24: + R'30low + R'30high + R'31low + R'31high + R'32low + R'32high + R'33low + R'33high + + + + + + + + + diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index 5a08aee..509248a 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml @@ -1754,6 +1754,19 @@ interface only. +
+ Touch Formats + + These formats are used for Touch Sensor +interface only. + + &sub-tch-td16; + &sub-tch-td08; + &sub-tch-tu16; + &sub-tch-tu08; + +
+
Reserved Format Identifiers diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 42e626d..b577de2 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml @@ -605,6 +605,7 @@ and discussions on the V4L mailing list.
&sub-dev-radio;
&sub-dev-rds;
&sub-dev-sdr;
+
&sub-dev-touch;
&sub-dev-event;
&sub-dev-subdev;