On 06/23/2016 12:08 AM, Nick Dyer wrote:
> Some touch controllers send out touch data in a similar way to a
> greyscale frame grabber.
>
> Use a new device prefix v4l-touch for these devices, to stop generic
> capture software from treating them as webcams.
>
> Add formats:
> - V4L2_TCH_FMT_DELTA_TD16 for signed 16-bit touch deltas
> - V4L2_TCH_FMT_DELTA_TD08 for signed 16-bit touch deltas
> - V4L2_TCH_FMT_TU16 for unsigned 16-bit touch data
> - V4L2_TCH_FMT_TU08 for unsigned 8-bit touch data
>
> This support will be used by:
> * Atmel maXTouch (atmel_mxt_ts)
> * Synaptics RMI4.
> * sur40
>
> Signed-off-by: Nick Dyer
> ---
> Documentation/DocBook/media/v4l/dev-touch.xml | 53 ++
> 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 +
> drivers/media/v4l2-core/v4l2-dev.c | 16 -
> drivers/media/v4l2-core/v4l2-ioctl.c | 44
> drivers/media/v4l2-core/videobuf2-v4l2.c | 1 +
You forgot drivers/media/v4l2-core/v4l2-compat-ioctl32.c.
For the next version, please place the docbook changes in a separate patch.
> include/media/v4l2-dev.h | 3 +-
> include/uapi/linux/media.h | 2 +
> include/uapi/linux/videodev2.h | 10 +++
> 14 files changed, 439 insertions(+), 4 deletions(-)
> 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 000..9e36328
> --- /dev/null
> +++ b/Documentation/DocBook/media/v4l/dev-touch.xml
> @@ -0,0 +1,53 @@
> +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
And the V4L2_CAP_TOUCH flag, right?
> +capabilities field of &v4l2-capability;
> +returned by the &VIDIOC-QUERYCAP; ioctl.
> +
> + At least one of the read/write, streaming or asynchronous I/O methods
Change to:
"At least one of the read/write or streaming I/O methods"
Asynchronous I/O was never implemented. We really need to remove this old stuff
from the spec.
> +must be supported.
> +
> +
> +
> + Data Format Negotiation
> +
> + A touch device may support read/write
> +and/or streaming (memory mapping or
> +user pointer) I/O.
dma-buf isn't mentioned here.
> +
> 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