Nick Dyer [Mon, 18 Jul 2016 21:10:31 +0000 (18:10 -0300)]
[media] Input: atmel_mxt_ts - add support for T37 diagnostic data
Atmel maXTouch devices have a T37 object which can be used to read raw
touch deltas from the device. This consists of an array of 16-bit
integers, one for each node on the touchscreen matrix.
Signed-off-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Nick Dyer [Mon, 18 Jul 2016 21:10:30 +0000 (18:10 -0300)]
[media] v4l2-core: Add support for touch devices
Some touch controllers send out touch data in a similar way to a
greyscale frame grabber.
Add new device type VFL_TYPE_TOUCH:
- This uses a new device prefix v4l-touch for these devices, to stop
generic capture software from treating them as webcams. Otherwise,
touch is treated similarly to video capture.
- Add V4L2_INPUT_TYPE_TOUCH
- Add MEDIA_INTF_T_V4L_TOUCH
- Add V4L2_CAP_TOUCH to indicate device is a touch device
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 <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
I'm leaving ITDev, so change to my personal email. My understanding is
that someone at Atmel will take this on once their takeover by Microchip
has settled down.
Signed-off-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Niklas Söderlund [Mon, 15 Aug 2016 15:06:35 +0000 (12:06 -0300)]
[media] rcar-vin: move media bus information to struct rvin_graph_entity
The primary reason for this change is to prepare for Gen3 support where
there will be more then one possible video source. Each source will have
its own media bus format and code, so it needs to be moved from the per
device structure to a structure used to represent an individual
connection to a video source.
Niklas Söderlund [Mon, 15 Aug 2016 15:06:34 +0000 (12:06 -0300)]
[media] rcar-vin: rework how subdevice is found and bound
The original drivers code to find a subdevice by looking in the DT grpah
and how the callbacks to the v4l2 async bind framework where poorly
written. The most obvious example of badness was the duplication of data
in the struct rvin_graph_entity.
This patch removes the data duplication, simplifies the parsing of the
DT graph and add checks to the v4l2 callbacks.
Niklas Söderlund [Mon, 15 Aug 2016 15:06:33 +0000 (12:06 -0300)]
[media] rcar-vin: move chip check for pixelformat support
The check for if the specific pixelformat is supported on the current
chip should happen in VIDIOC_S_FMT and VIDIOC_TRY_FMT and not when we
try to setup the hardware for streaming.
Niklas Söderlund [Mon, 15 Aug 2016 15:06:31 +0000 (12:06 -0300)]
[media] rcar-vin: do not use v4l2_device_call_until_err()
Fix a error from the original driver where v4l2_device_call_until_err()
where used for the pad specific v4l2 operation set_fmt. Also fix up the
error path from this fix so if there is an error it will be propagated
to the caller.
The error path label have also been renamed as a result from a
nitpicking review comment since we are fixing other issues here.
Niklas Söderlund [Mon, 15 Aug 2016 15:06:29 +0000 (12:06 -0300)]
[media] rcar-vin: rename entity to digital
When Gen3 support is added to the driver more then one possible video
source entity will be possible. Knowing that the name entity is a bad
one, rename it to digital since it will deal with the digital input
source.
This is broken when it is used inside a \begin{alltt} block.
So, replace it by just "#2", as this won't cause troubles, and
it is one of the fallback methods for it.
[media] docs-rst: Convert MC uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
While here, improve the documentation to make them to look more
like the rest of the document.
[media] docs-rst: Convert LIRC uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
While here, improve the documentation to make them to look more
like the rest of the document.
[media] docs-rst: Convert CEC uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
While here, improve the documentation to make them to look more
like the rest of the document.
[media] docs-rst: Convert DVB uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
While here, improve the documentation, marking the deprecated
ioctls, and making the non-deprecated ones more like the rest
of the media book.
Also, add a notice for ioctls that still require documentation.
[media] docs-rst: Convert V4L2 uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
Merge remote-tracking branch 'docs-next/docs-next' into devel/docs-next
* docs-next/docs-next: (51 commits)
docs-rst: add package adjustbox
docs-rst: Fix an warning when in interactive mode
docs-rst: Use better colors for note/warning/attention boxes
docs-rst: conf.py: adjust the size of .. note:: tag
docs-rst: add support for LaTeX output
doc-rst: migrate ioctl CEC_DQEVENT to c-domain
doc-rst: Revert "kernel-doc: fix handling of address_space tags"
doc-rst: moved *duplicate* warnings to nitpicky mode
doc-rst:c-domain: ref-name of a function declaration
doc-rst: add boilerplate to customize c-domain
docs: Sphinxify gdb-kernel-debugging.txt and move to dev-tools
docs: sphinxify kmemcheck.txt and move to dev-tools
docs: sphinxify kmemleak.txt and move it to dev-tools
docs: sphinxify ubsan.txt and move it to dev-tools
docs: sphinxify kasan.txt and move to dev-tools
docs: sphinixfy gcov.txt and move to dev-tools
docs: sphinxify kcov.txt and move to dev-tools
docs: sphinxify sparse.txt and move to dev-tools
docs: sphinxify coccinelle.txt and add it to dev-tools
docs: create a new dev-tools directory
...
docs-rst: Use better colors for note/warning/attention boxes
Instead of painting the box with gray, let's use a colored
box. IMHO, that makes easier to warn users about some issue
pointed by the Sphinx. It also matches to what we do already
with the HTML output.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
docs-rst: conf.py: adjust the size of .. note:: tag
While the current implementation works well when using as a
paragraph, it doesn't work properly if inside a table. As we
have quite a few such cases, fix the logic to take the column
size into account.
PS.: I took the logic there from the latest version of Sphinx.sty
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Sphinx supports LaTeX output. Sometimes, it is interesting to
call it directly, instead of also generating a PDF. As it comes
for free, add a target for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Markus Heiser [Mon, 15 Aug 2016 14:08:28 +0000 (16:08 +0200)]
doc-rst: migrate ioctl CEC_DQEVENT to c-domain
This is only one example, demonstrating the benefits of the patch
series. The CEC_DQEVENT ioctl is migrated to the sphinx c-domain and
referred by ":name: CEC_DQEVENT".
With this change the indirection using ":ref:`CEC_DQEVENT` is no longer
needed, we can refer the ioctl directly with ":c:func:`CEC_DQEVENT`". As
addition in the index, there is a entry "CEC_DQEVENT (C function)".
Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Markus Heiser [Mon, 15 Aug 2016 14:08:26 +0000 (16:08 +0200)]
doc-rst: moved *duplicate* warnings to nitpicky mode
Moved the *duplicate C object description* warnings for function
declarations in the nitpicky mode. In nitpick mode, you can suppress
those warnings (e.g. ioctl) with::
See Sphinx documentation for the config values for ``nitpick`` and
``nitpick_ignore`` [1].
With this change all the ".. cpp:function:: int ioctl(..)" descriptions
(found in the media book) can be migrated to ".. c:function:: int
ioctl(..)", without getting any warnings. E.g.::
.. cpp:function:: int ioctl( int fd, int request, struct cec_event *argp )
.. c:function:: int ioctl( int fd, int request, struct cec_event *argp )
The main effect, is that we get those *CPP-types* back into Sphinx's C-
namespace and we need no longer to distinguish between c/cpp references,
when we refer a function like the ioctl.
Markus Heiser [Mon, 15 Aug 2016 14:08:25 +0000 (16:08 +0200)]
doc-rst:c-domain: ref-name of a function declaration
Add option 'name' to the "c:function:" directive. With option 'name'
the ref-name of a function can be modified. E.g.::
.. c:function:: int ioctl( int fd, int request )
:name: VIDIOC_LOG_STATUS
The func-name (e.g. ioctl) remains in the output but the ref-name
changed from ``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for
this function is also changed to ``VIDIOC_LOG_STATUS`` and the function
can now referenced by::
:c:func:`VIDIOC_LOG_STATUS`
Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Songjun Wu [Wed, 17 Aug 2016 06:05:27 +0000 (03:05 -0300)]
[media] atmel-isc: add the Image Sensor Controller code
Add driver for the Image Sensor Controller. It manages
incoming data from a parallel based CMOS/CCD sensor.
It has an internal image processor, also integrates a
triple channel direct memory access controller master
interface.
[media] subdev-formats.rst: adjust tables size for LaTeX output
There are two big tables here that are very hard to adjust its
size.
The first one would fit into one page, but the latex.py logic
at Sphinx auto-switches to longtable when there are more than 30
rows. There's no way to override without coding.
The second one is really big, and won't fit on a single page.
So, it has to use tiny font to fit.
[media] vidioc-g-sliced-vbi-cap.rst: make tables fit on LaTeX output
The tables don't fit at the page on this file. As noticed
before, Sphinx (or LaTeX?) does a crap job on tables with
cell span, and some work has to be done to make it fit.
Move the see also reference to a footnote, break one paragraph
into two and adjust the table columns to make it visible.
[media] diff-v4l.rst: Make capabilities table fit in LaTeX
This table has several troubles:
- a duplicated "struct" on its name;
- a reference to a V4L version 1 struct that will never
point to something (as we got rid of V4L1 API a long
time ago);
- misses hints for LaTeX output (column size and longtable
style).
Fix them.
It should be noticed that the first column of this table is
not aligned with the rest. I suspect that this is a bug at
the flat-table extension.
[media] subdev-formats.rst: adjust most of the tables to fill in page
Fix mosto fo the tables there in order to make them fit at the
page size.
There are, however, two exceptions: RGB and YUV big tables,
where adding the raw latex adjustbox caused the tables to not
be properly formatted. I suspect that the problem is because
those are long tables, but not really sure.
The thing is that Sphinx lacks an "adjustbox" tag that would
avoid the raw latex hacks.
[media] dev-raw-vbi.rst: add a footnote for the count limits
There's a bug with LaTeX output on flat-tables with Sphinx 1.4.5
that prevents references at a cell span to be broken. As the
text is indeed too long, it makes sense to place the reference
to the pictures showing the VBI limits as a footnote.
That makes the text easier to read and also solves the issue
with LaTeX output.
[media] buffer.rst: Adjust table columns for LaTeX output
The table columns are not properly displayed. Also, some
tables are too big to fit into just one page. So, fix them,
in order to better display the tables.
[media] pixfmt-packed-rgb.rst: adjust tables to fit in LaTeX
Adjust the tables to fit at the LaTeX and PDF outputs.
I wrote a previous patch RFC to show the big table in landscape,
but it makes harder to read on displays.
So, instead, let's use the adjustbox to shrink the size of those
long tables, as the table size can still be visible on screen,
and it is a way better to read in horizontal position and
visible if printed.
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
[media] vidioc-querycap.rst: Better format tables on PDF output
Both tables on this rst file were not shown right, as they miss
the proper tag (tabularcolumns) to specify the column widths
required for PDF and LaTeX output.
Also, the second table is too big to fit into one page. So,
it should use the longtable class to allow it to be split into
two pages.
[media] docs-rst: get rid of code-block inside tables
There are two tables with a C code-block inside it. Unfortunately,
that causes LaTeX output to break. Yet, there's nothing special
there, so let's remove the code-block from them.
pdflatex doesn't like gif images:
None:None: WARNING: no matching candidate for image URI u'media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.*'
None:None: WARNING: no matching candidate for image URI u'media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.*'
But it works fine with png. So, convert them. As a plus, PNG images
are smaller.