platform/kernel/linux-3.10.git
9 years agoupstream: [media] redrat3: errors on unplug
Sean Young [Mon, 8 Jul 2013 20:33:08 +0000 (17:33 -0300)]
upstream: [media] redrat3: errors on unplug

In an usb disconnect handler, the urbs have already been cancelled so the
attempt to disable the IR receiver just results in errors:
[  899.638862] redrat3 7-2:1.0: redrat3_send_cmd: Error sending rr3 cmd res -110, data 0
[  899.638870] redrat3 7-2:1.0: redrat3_disable_detector: detector status: 251, should be 0

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] ene_ir: don't use pr_debug after all
Maxim Levitsky [Sun, 7 Jul 2013 23:22:47 +0000 (20:22 -0300)]
upstream: [media] ene_ir: don't use pr_debug after all

This way to only way to get debug info is to use dynamic debug, but I
left debugging prints to debug hardware issues, and so I want this to be
enabled by module param.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] ene_ir: disable the device if wake is disabled
Maxim Levitsky [Sun, 7 Jul 2013 23:22:46 +0000 (20:22 -0300)]
upstream: [media] ene_ir: disable the device if wake is disabled

It doesn't hurt and on my notebook despite clearing the
wake flag the remote still wakes up the system.

This way it doesn't.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] ene_ir: Fix interrupt line passthrough to hardware
Maxim Levitsky [Sun, 7 Jul 2013 23:22:45 +0000 (20:22 -0300)]
upstream: [media] ene_ir: Fix interrupt line passthrough to hardware

While we can delay IRQ intialization, we need the interrupt number
right away because unusually hardware have programable interrupt number,
and thus we give it the number that was allocated by BIOS

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] staging: lirc: clean error handling in probe()
Dan Carpenter [Wed, 26 Jun 2013 13:37:36 +0000 (10:37 -0300)]
upstream: [media] staging: lirc: clean error handling in probe()

We have reorganized the error handling into a simpler and more canonical
format.
Additionally we removed extra empty lines, switched to devm_kzalloc(), and
substitute 'minor' by 'ret' in the igorplugusb_remote_probe() function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: Fix vidioc fmt vid cap v4l2 compliance
Alban Browaeys [Tue, 16 Jul 2013 22:06:46 +0000 (19:06 -0300)]
upstream: [media] em28xx: Fix vidioc fmt vid cap v4l2 compliance

Set fmt.pix.priv to zero in vidioc_try_fmt_vid_cap.
Catched by v4l2-compliance.

Signed-off-by: Alban Browaeys <prahal@yahoo.com>
[hans.verkuil@cisco.com: dropping unnecessary change to g_fmt_vid_cap]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] radio-aztech: Implement signal strength detection and fix stereo...
Ondrej Zary [Fri, 19 Jul 2013 16:46:18 +0000 (13:46 -0300)]
upstream: [media] radio-aztech: Implement signal strength detection and fix stereo detection

Current stereo detection code is wrong - it reads TUNED bit instead of STEREO bit.
Fix that and implement signal strength detection too.
Also remove useless s_stereo functionn.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] radio-aztech: Convert to generic lm7000 implementation
Ondrej Zary [Fri, 19 Jul 2013 16:46:17 +0000 (13:46 -0300)]
upstream: [media] radio-aztech: Convert to generic lm7000 implementation

Aztech radio card is based on LM7001 chip which is (software) compatible with LM7000.
So remove the LM7000-specific code from the driver and use generic code.
Also found that the card does not have A0..A2 ISA pins connected, which means that the region size is 8 bytes.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] bttv: stop abusing mbox_we for sw_status
Ondrej Zary [Tue, 14 May 2013 19:54:44 +0000 (16:54 -0300)]
upstream: [media] bttv: stop abusing mbox_we for sw_status

Kodicom 4400R and Geovision GV-800 code in bttv driver abuses mbox_we (int)
in struct bttv as char *.
Remove this hack and add a proper sw_status array to struct bttv instead.
This is a a preparation to remove mbox_we.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: stk1160: Ignore unchanged standard set
Ezequiel Garcia [Thu, 18 Jul 2013 12:01:23 +0000 (09:01 -0300)]
upstream: [media] media: stk1160: Ignore unchanged standard set

This commit adds an early check to vidioc_s_std() to detect if the
new and current standards are equal, and exit with success in that
case.
This is needed to prevent userspace applications that might attempt
to re-set the same standard from failing if that's done when streaming
has started.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] stk1160: Allow to change input while streaming
Ezequiel Garcia [Wed, 17 Jul 2013 07:43:22 +0000 (04:43 -0300)]
upstream: [media] stk1160: Allow to change input while streaming

Remove the check as there's no reason to prevent the input from
being set when the device is streaming. This allows surveillance
applications (such as motion, zoneminder, etc.) to configure the
input while streaming.

Reported-by: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] usbtv: remove unused including <linux/version.h>
Wei Yongjun [Wed, 17 Jul 2013 01:01:12 +0000 (22:01 -0300)]
upstream: [media] usbtv: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] ml86v7667: override default field interlace order
Vladimir Barinov [Mon, 15 Jul 2013 18:12:21 +0000 (15:12 -0300)]
upstream: [media] ml86v7667: override default field interlace order

ML86V7667 always transmits top field first for both PAL and  NTSC -- that makes
application incorrectly  treat interlaced  fields when relying on the standard.
Hence we must set V4L2_FIELD_INTERLACED_TB format explicitly.

[Sergei: added a comment.]

Reported-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Tested-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] usbtv: Add S-Video input support
Lubomir Rintel [Fri, 12 Jul 2013 08:03:03 +0000 (05:03 -0300)]
upstream: [media] usbtv: Add S-Video input support

Alongside already existing Composite input.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] tlg2300: fix checking firmware in poseidon_probe()
Alexey Khoroshilov [Mon, 24 Jun 2013 18:57:37 +0000 (15:57 -0300)]
upstream: [media] tlg2300: fix checking firmware in poseidon_probe()

check_firmware() makes sure firmware is in a device.
It returns zero on success and error code otherwise.
Also it sets down_firmware flag to 1 if downloading occurs.
The only caller poseidon_probe() checks down_firmware flag and
returns 0 without any initialization if it is set.
That looks very strange, so the patch removes down_firmware argument
of check_firmware() and returns error code if check_firmware() fails
in poseidon_probe().
Not tested on real hardware.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] tlg2300: implement error handling in poseidon_probe()
Alexey Khoroshilov [Mon, 24 Jun 2013 18:57:36 +0000 (15:57 -0300)]
upstream: [media] tlg2300: implement error handling in poseidon_probe()

All poseidon init functions properly return error codes,
but they are ignored by poseidon_probe(). The patch implements
handling of error cases.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] drivers/media/radio/radio-maxiradio: Convert to module_pci_driver
Libo Chen [Mon, 27 May 2013 01:31:59 +0000 (22:31 -0300)]
upstream: [media] drivers/media/radio/radio-maxiradio: Convert to module_pci_driver

use module_pci_driver instead of init/exit, make code clean

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] marvell-ccic: switch to resource managed allocation and request
Libin Yang [Wed, 3 Jul 2013 04:56:04 +0000 (01:56 -0300)]
upstream: [media] marvell-ccic: switch to resource managed allocation and request

This patch switchs to resource managed allocation and request in mmp-driver.
It can remove free resource operations.

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] marvell-ccic: add SOF / EOF pair check for marvell-ccic driver
Libin Yang [Wed, 3 Jul 2013 04:56:03 +0000 (01:56 -0300)]
upstream: [media] marvell-ccic: add SOF / EOF pair check for marvell-ccic driver

This patch adds the SOFx/EOFx pair check for marvell-ccic.
When switching format, the last EOF may not arrive when stop streamning.
And the EOF will be detected in the next start streaming.
Must ensure clear the left over frame flags before every really start streaming.

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] marvell-ccic: add new formats support for marvell-ccic driver
Libin Yang [Wed, 3 Jul 2013 04:56:02 +0000 (01:56 -0300)]
upstream: [media] marvell-ccic: add new formats support for marvell-ccic driver

This patch adds some planar formats support for marvell-ccic.

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] marvell-ccic: refine mcam_set_contig_buffer function
Libin Yang [Wed, 3 Jul 2013 04:56:01 +0000 (01:56 -0300)]
upstream: [media] marvell-ccic: refine mcam_set_contig_buffer function

This patch refines mcam_set_contig_buffer() in mcam core.
It can remove redundant code line and enhance readability.

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] marvell-ccic: reset ccic phy when stop streaming for stability
Libin Yang [Wed, 3 Jul 2013 04:56:00 +0000 (01:56 -0300)]
upstream: [media] marvell-ccic: reset ccic phy when stop streaming for stability

This patch adds the reset ccic phy operation when stop streaming.
Stop streaming without reset ccic phy, the next start streaming
may be unstable.
Also need add CCIC2 definition when PXA688/PXA2128 support dual ccics.

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] marvell-ccic: add clock tree support for marvell-ccic driver
Libin Yang [Wed, 3 Jul 2013 04:55:59 +0000 (01:55 -0300)]
upstream: [media] marvell-ccic: add clock tree support for marvell-ccic driver

This patch adds the clock tree support for marvell-ccic.

Signed-off-by: Libin Yang <lbyang@marvell.com>
Signed-off-by: Albert Wang <twang13@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] marvell-ccic: add MIPI support for marvell-ccic driver
Libin Yang [Wed, 3 Jul 2013 04:55:58 +0000 (01:55 -0300)]
upstream: [media] marvell-ccic: add MIPI support for marvell-ccic driver

This patch adds the MIPI support for marvell-ccic.
Board driver should determine whether using MIPI or not.

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: i2c: adv7343: add OF support
Lad, Prabhakar [Sat, 20 Jul 2013 05:21:06 +0000 (02:21 -0300)]
upstream: [media] media: i2c: adv7343: add OF support

add OF support for the adv7343 driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: i2c: adv7343: make the platform data members as array
Lad, Prabhakar [Sat, 20 Jul 2013 05:21:05 +0000 (02:21 -0300)]
upstream: [media] media: i2c: adv7343: make the platform data members as array

This patch makes the platform data members as array wherever
possible, so as this makes easier while collecting the data
in DT case and read the entire array at once.
This patch also makes appropriate changes to board-da850-evm.c

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: davinci: vpss: convert to devm* api
Lad, Prabhakar [Sat, 13 Jul 2013 07:50:30 +0000 (04:50 -0300)]
upstream: [media] media: davinci: vpss: convert to devm* api

Replace existing resource handling in the driver with managed
device resource, this ensures more consistent error values and
simplifies error paths.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: davinci: vpbe_display: convert to devm* api
Lad, Prabhakar [Sat, 13 Jul 2013 07:50:29 +0000 (04:50 -0300)]
upstream: [media] media: davinci: vpbe_display: convert to devm* api

Replace existing resource handling in the driver with managed
device resource, this ensures more consistent error values and
simplifies error paths.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: davinci: vpbe_osd: convert to devm_* api
Lad, Prabhakar [Sat, 13 Jul 2013 07:50:28 +0000 (04:50 -0300)]
upstream: [media] media: davinci: vpbe_osd: convert to devm_* api

Replace existing resource handling in the driver with managed
device resource, this ensures more consistent error values and
simplifies error paths.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: davinci: vpbe_venc: convert to devm_* api
Lad, Prabhakar [Sat, 13 Jul 2013 07:50:27 +0000 (04:50 -0300)]
upstream: [media] media: davinci: vpbe_venc: convert to devm_* api

Replace existing resource handling in the driver with managed
device resource, this ensures more consistent error values and
simplifies error paths.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: davinci: vpif: display: add V4L2-async support
Lad, Prabhakar [Tue, 25 Jun 2013 14:17:35 +0000 (11:17 -0300)]
upstream: [media] media: davinci: vpif: display: add V4L2-async support

Add support for asynchronous subdevice probing, using the v4l2-async API.
The legacy synchronous mode is still supported too, which allows to
gradually update drivers and platforms.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: davinci: vpif: capture: add V4L2-async support
Lad, Prabhakar [Tue, 25 Jun 2013 14:17:34 +0000 (11:17 -0300)]
upstream: [media] media: davinci: vpif: capture: add V4L2-async support

Add support for asynchronous subdevice probing, using the v4l2-async API.
The legacy synchronous mode is still supported too, which allows to
gradually update drivers and platforms.

Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: i2c: tvp514x: add support for asynchronous probing
Lad, Prabhakar [Mon, 24 Jun 2013 14:51:39 +0000 (11:51 -0300)]
upstream: [media] media: i2c: tvp514x: add support for asynchronous probing

Both synchronous and asynchronous tvp514x subdevice probing
is supported by this patch.
This patch also fixes the error path by calling
media_entity_cleanup() on failure in probe when
CONFIG_MEDIA_CONTROLLER is enabled.

Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: i2c: tvp7002: add support for asynchronous probing
Lad, Prabhakar [Sat, 22 Jun 2013 16:44:14 +0000 (13:44 -0300)]
upstream: [media] media: i2c: tvp7002: add support for asynchronous probing

Both synchronous and asynchronous tvp7002 subdevice probing
is supported by this patch.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: i2c: adv7343: add support for asynchronous probing
Lad, Prabhakar [Sat, 22 Jun 2013 09:07:37 +0000 (06:07 -0300)]
upstream: [media] media: i2c: adv7343: add support for asynchronous probing

Both synchronous and asynchronous adv7343 subdevice probing is supported by
this patch.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: i2c: ths8200: add OF support
Lad, Prabhakar [Sat, 22 Jun 2013 08:46:35 +0000 (05:46 -0300)]
upstream: [media] media: i2c: ths8200: add OF support

add OF support for the ths8200 driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] coda: add bitstream ringbuffer handling for decoder
Philipp Zabel [Fri, 21 Jun 2013 06:55:31 +0000 (03:55 -0300)]
upstream: [media] coda: add bitstream ringbuffer handling for decoder

Add a bitstream ringbuffer using kfifo. Queued source buffers are to be copied
into the bitstream ringbuffer immediately and marked as done, if possible.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] coda: update CODA7541 to firmware 1.4.50
Philipp Zabel [Fri, 21 Jun 2013 06:55:30 +0000 (03:55 -0300)]
upstream: [media] coda: update CODA7541 to firmware 1.4.50

This patch splits the global workbuf into a global tempbuf and a per-context
workbuf, adds the codec mode aux register, and restores the work buffer
pointer on commands. With the new firmware, there is only a single set of
read/write pointers which need to be restored between context switches.
This allows more than four active contexts at the same time.
All auxiliary buffers are now allocated through a helper function to avoid
code duplication.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] coda: do not allocate maximum number of framebuffers for encoder
Philipp Zabel [Fri, 21 Jun 2013 06:55:29 +0000 (03:55 -0300)]
upstream: [media] coda: do not allocate maximum number of framebuffers for encoder

The encoder only ever needs two buffers, but we'll have to increase
CODA_MAX_FRAMEBUFFERS for the decoder.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] coda: dynamic IRAM setup for encoder
Philipp Zabel [Fri, 21 Jun 2013 06:55:28 +0000 (03:55 -0300)]
upstream: [media] coda: dynamic IRAM setup for encoder

This sets up IRAM areas used as temporary memory for the different
hardware units depending on the frame size.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] ml86v7667: fix compile warning: 'ret' set but not used
Hans Verkuil [Sun, 30 Jun 2013 07:40:32 +0000 (04:40 -0300)]
upstream: [media] ml86v7667: fix compile warning: 'ret' set but not used

media_build/v4l/ml86v7667.c: In function 'ml86v7667_s_ctrl':
media_build/v4l/ml86v7667.c:120:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret;
      ^
And indeed, ret is set but not used. Let's actually return the error
code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] dvb-usb-v2: fix Kconfig dependency when RC_CORE=m
Antti Palosaari [Tue, 23 Jul 2013 12:15:31 +0000 (09:15 -0300)]
upstream: [media] dvb-usb-v2: fix Kconfig dependency when RC_CORE=m

It is not allowed to build driver as a build-in when RC_CORE
(remote controller support) is build as a module.
randconfig build error with next-20130719, in drivers/media/usb
drivers/built-in.o: In function `dvb_usbv2_disconnect':
(.text+0x154b39): undefined reference to `rc_unregister_device'
drivers/built-in.o: In function `dvb_usbv2_init_work':
dvb_usb_core.c:(.text+0x155b2d): undefined reference to `rc_allocate_device'
dvb_usb_core.c:(.text+0x155c38): undefined reference to `rc_register_device'
dvb_usb_core.c:(.text+0x155c5b): undefined reference to `rc_free_device'
drivers/built-in.o: In function `anysee_rc_query':
anysee.c:(.text+0x157795): undefined reference to `rc_keydown'

Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] mem2mem: add support for hardware buffered queue
Philipp Zabel [Mon, 3 Jun 2013 07:23:48 +0000 (04:23 -0300)]
upstream: [media] mem2mem: add support for hardware buffered queue

On mem2mem decoders with a hardware bitstream ringbuffer, to drain the
buffer at the end of the stream, remaining frames might need to be decoded
from the bitstream buffer without additional input buffers being provided.
To achieve this, allow a queue to be marked as buffered by the driver, and
allow scheduling of device_runs when buffered ready queues are empty.
This also allows a driver to copy input buffers into their bitstream
ringbuffer and immediately mark them as done to be dequeued.
The motivation for this patch is hardware assisted h.264 reordering support
in the coda driver. For high profile streams, the coda can hold back
out-of-order frames, causing a few mem2mem device runs in the beginning, that
don't produce any decompressed buffer at the v4l2 capture side. At the same
time, the last few frames can be decoded from the bitstream with mem2mem device
runs that don't need a new input buffer at the v4l2 output side. The decoder
command ioctl can be used to put the decoder into the ringbuffer draining
end-of-stream mode.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] dib0700: add support for PCTV 2002e & PCTV 2002e SE
Michael Krufky [Sun, 30 Jun 2013 15:43:58 +0000 (12:43 -0300)]
upstream: [media] dib0700: add support for PCTV 2002e & PCTV 2002e SE

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] stb0899: restore minimal rate to 5Mbauds
Mauro Carvalho Chehab [Fri, 5 Jul 2013 13:31:43 +0000 (10:31 -0300)]
upstream: [media] stb0899: restore minimal rate to 5Mbauds

According with Manu Abraham, stb0899 seek algorithm is broken
for symbol rates bellow to 5Mbauds. So, revert those patches:

55b3318 [media] stb0899: allow minimum symbol rate of 2000000
2eeed77 [media] stb0899: allow minimum symbol rate of 1000000

Requested-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: drivers: avoid parsing names as kthread_run() format strings
Kees Cook [Wed, 3 Jul 2013 22:04:58 +0000 (15:04 -0700)]
upstream: drivers: avoid parsing names as kthread_run() format strings

Calling kthread_run with a single name parameter causes it to be handled
as a format string. Many callers are passing potentially dynamic string
content, so use "%s" in those cases to avoid any potential accidents.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoupstream: drivers: avoid format strings in names passed to alloc_workqueue()
Kees Cook [Wed, 3 Jul 2013 22:04:57 +0000 (15:04 -0700)]
upstream: drivers: avoid format strings in names passed to alloc_workqueue()

For the workqueue creation interfaces that do not expect format strings,
make sure they cannot accidently be parsed that way.  Additionally, clean
up calls made with a single parameter that would be handled as a format
string.  Many callers are passing potentially dynamic string content, so
use "%s" in those cases to avoid any potential accidents.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoupstream: [media] media: i2c: tvp514x: remove manual setting of subdev name
Lad, Prabhakar [Mon, 24 Jun 2013 14:47:26 +0000 (11:47 -0300)]
upstream: [media] media: i2c: tvp514x: remove manual setting of subdev name

This patch removes manual setting of subdev name in the
probe, ideally subdev names must be unique.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: i2c: tvp7002: remove manual setting of subdev name
Lad, Prabhakar [Mon, 24 Jun 2013 14:47:25 +0000 (11:47 -0300)]
upstream: [media] media: i2c: tvp7002: remove manual setting of subdev name

This patch removes manual setting of subdev name in the
probe, ideally subdev names must be unique.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] mem2mem: set missing v4l2_dev pointer
Hans Verkuil [Thu, 27 Jun 2013 05:44:04 +0000 (02:44 -0300)]
upstream: [media] mem2mem: set missing v4l2_dev pointer

The m2m-deinterlace, mem2mem_testdev and mx2_emmaprp drivers didn't set
the v4l2_dev pointer in struct video_device, even though a v4l2_device was
registered correctly. These days this v4l2_dev pointer must be set correctly,
so this patch adds that for these three drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] wl128x: add missing struct v4l2_device
Hans Verkuil [Sat, 22 Jun 2013 05:38:37 +0000 (02:38 -0300)]
upstream: [media] wl128x: add missing struct v4l2_device

This struct is now required for all video device nodes, but it was missing
in this driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] tvp514x: Fix init seqeunce
Lars-Peter Clausen [Sun, 23 Jun 2013 13:01:35 +0000 (10:01 -0300)]
upstream: [media] tvp514x: Fix init seqeunce

client->driver->id_table will always point to the first entry in the device id
table. So all devices will use the same init sequence. Use the id table entry
that gets passed to the driver's probe() function to get the right init
sequence.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] saa7134: Fix sparse warnings by adding __user annotation
Emil Goode [Sat, 22 Jun 2013 11:02:52 +0000 (08:02 -0300)]
upstream: [media] saa7134: Fix sparse warnings by adding __user annotation

Adding a __user annotation fixes the following sparse warnings.
drivers/media/pci/saa7134/saa7134-video.c:1578:45: warning:
        incorrect type in initializer (different address spaces)
        drivers/media/pci/saa7134/saa7134-video.c:1578:45:
        expected struct v4l2_clip *clips
        drivers/media/pci/saa7134/saa7134-video.c:1578:45:
        got struct v4l2_clip [noderef] <asn:1>*clips
drivers/media/pci/saa7134/saa7134-video.c:1589:26: warning:
        incorrect type in assignment (different address spaces)
        drivers/media/pci/saa7134/saa7134-video.c:1589:26:
        expected struct v4l2_clip [noderef] <asn:1>*clips
        drivers/media/pci/saa7134/saa7134-video.c:1589:26:
        got struct v4l2_clip *clips

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] saa7164: fix compiler warning
Hans Verkuil [Fri, 21 Jun 2013 19:16:47 +0000 (16:16 -0300)]
upstream: [media] saa7164: fix compiler warning

build/media_build/v4l/saa7164-core.c: In function 'saa7164_initdev':
build/media_build/v4l/saa7164-core.c:1192:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int err, i;
        ^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] v4l2-controls.h: fix copy-and-paste error in comment
Hans Verkuil [Fri, 21 Jun 2013 05:05:34 +0000 (02:05 -0300)]
upstream: [media] v4l2-controls.h: fix copy-and-paste error in comment

The comment for the FM_RX class was copied from the DV class unchanged.
Fixed.
Also made the FM_TX comment consistent with the others.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] omap_vout: fix compiler warning
Hans Verkuil [Thu, 20 Jun 2013 19:28:16 +0000 (16:28 -0300)]
upstream: [media] omap_vout: fix compiler warning

media-git/drivers/media/platform/omap/omap_vout.c: In function â€˜omapvid_init’:
media-git/drivers/media/platform/omap/omap_vout.c:382:17: warning: â€˜mode’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  vout->dss_mode = video_mode_to_dss_mode(vout);
                 ^
media-git/drivers/media/platform/omap/omap_vout.c:332:23: note: â€˜mode’ was declared here
  enum omap_color_mode mode;
                       ^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Prabhakar Lad <prabhakar.lad@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] bfin_capture: fix compiler warning
Hans Verkuil [Thu, 20 Jun 2013 19:28:15 +0000 (16:28 -0300)]
upstream: [media] bfin_capture: fix compiler warning

media-git/drivers/media/platform/blackfin/bfin_capture.c: In function â€˜bcap_probe’:
media-git/drivers/media/platform/blackfin/bfin_capture.c:1007:16: warning: ignoring return value of â€˜vb2_queue_init’, declared with attribute warn_unused_result [-Wunused-result]
  vb2_queue_init(q);
                  ^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] ml86v7667: fix compiler warning
Hans Verkuil [Thu, 20 Jun 2013 19:28:14 +0000 (16:28 -0300)]
upstream: [media] ml86v7667: fix compiler warning

build/media_build/v4l/ml86v7667.c: In function 'ml86v7667_s_ctrl':
build/media_build/v4l/ml86v7667.c:120:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret = 0;
        ^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Vladimir Barinov <source@cogentembedded.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] V4L2: soc-camera: remove several CEU references in the generic...
Guennadi Liakhovetski [Tue, 25 Jun 2013 08:59:23 +0000 (05:59 -0300)]
upstream: [media] V4L2: soc-camera: remove several CEU references in the generic scaler

The scaling / cropping library, that has been extracted from the CEU
driver still contained a couple of references to the original hardware.
Clean them up.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] V4L2: soc-camera: move generic functions into a separate file
Guennadi Liakhovetski [Thu, 25 Apr 2013 11:18:45 +0000 (08:18 -0300)]
upstream: [media] V4L2: soc-camera: move generic functions into a separate file

The sh_mobile_ceu_camera driver implements a generic algorithm for setting
up an optimal client and host scaling and cropping configuration. This
patch makes those functions available for all drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] V4L2: sh_mobile_ceu_camera: remove CEU specific data from generic...
Guennadi Liakhovetski [Wed, 24 Apr 2013 14:15:30 +0000 (11:15 -0300)]
upstream: [media] V4L2: sh_mobile_ceu_camera: remove CEU specific data from generic functions

Several functions in the sh_mobile_ceu_camera driver implement generic
algorithms and can be re-used by other V4L2 camera host drivers too. These
functions attempt to optimise scaling and cropping functions of the
subdevice, e.g. a camera sensor. This patch makes those functions generic
for future re-use by other camera host drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] V4L2: sh_vou: add I2C build dependency
Guennadi Liakhovetski [Mon, 24 Jun 2013 08:08:05 +0000 (05:08 -0300)]
upstream: [media] V4L2: sh_vou: add I2C build dependency

The sh_vou driver needs CONFIG_I2C or CONFIG_I2C_MODULE to build, add the
respective dependency.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: treewide: relase -> release
Geert Uytterhoeven [Fri, 28 Jun 2013 09:27:31 +0000 (11:27 +0200)]
upstream: treewide: relase -> release

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
9 years agoupstream: [media] sh-mobile-ceu-driver: support max width and height in DT
Guennadi Liakhovetski [Mon, 17 Sep 2012 10:48:33 +0000 (07:48 -0300)]
upstream: [media] sh-mobile-ceu-driver: support max width and height in DT

Some CEU implementations have non-standard (larger) maximum supported
width and height values. Add two OF properties to specify them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] sh-mobile-ceu-camera: add primitive OF support
Guennadi Liakhovetski [Mon, 17 Sep 2012 10:42:55 +0000 (07:42 -0300)]
upstream: [media] sh-mobile-ceu-camera: add primitive OF support

Add an OF hook to sh_mobile_ceu_camera.c, no properties so far. Booting
with DT also requires platform data to be optional.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc-camera: don't attach the client to the host during probing
Guennadi Liakhovetski [Thu, 4 Apr 2013 17:21:54 +0000 (14:21 -0300)]
upstream: [media] soc-camera: don't attach the client to the host during probing

During client probing we only have to turn on the host's clock, no need to
actually attach the client to the host.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc-camera: make .clock_{start,stop} compulsory, .add / .remove...
Guennadi Liakhovetski [Thu, 4 Apr 2013 16:19:58 +0000 (13:19 -0300)]
upstream: [media] soc-camera: make .clock_{start,stop} compulsory, .add / .remove optional

All existing soc-camera host drivers use .clock_start() and .clock_stop()
callbacks to activate and deactivate their camera interfaces, whereas
.add() and .remove() callbacks are usually dummy. Make the former two
compulsory and the latter two optional.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] sh-mobile-ceu-camera: move interface activation and deactivation...
Guennadi Liakhovetski [Thu, 4 Apr 2013 15:54:20 +0000 (12:54 -0300)]
upstream: [media] sh-mobile-ceu-camera: move interface activation and deactivation to clock callbacks

When adding and removing a client, the sh-mobile-ceu-camera driver activates
and, respectively, deactivates its camera interface and, if necessary, the
CSI2 controller. Only handling of the CSI2 interface is client-specific and
is only needed, when a data-exchange with the client is taking place. Move
the rest to .clock_start() and .clock_stop() callbacks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] mx1-camera: move interface activation and deactivation to clock...
Guennadi Liakhovetski [Thu, 4 Apr 2013 15:06:32 +0000 (12:06 -0300)]
upstream: [media] mx1-camera: move interface activation and deactivation to clock callbacks

When adding and removing a client, the mx1-camera driver only activates
and deactivates its camera interface respectively, which doesn't include
any client-specific actions. Move this functionality into .clock_start()
and .clock_stop() callbacks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] mx2-camera: move interface activation and deactivation to clock...
Guennadi Liakhovetski [Thu, 4 Apr 2013 14:49:13 +0000 (11:49 -0300)]
upstream: [media] mx2-camera: move interface activation and deactivation to clock callbacks

When adding and removing a client, the mx2-camera driver only activates
and deactivates its camera interface respectively, which doesn't include
any client-specific actions. Move this functionality into .clock_start()
and .clock_stop() callbacks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] mx3-camera: move interface activation and deactivation to clock...
Guennadi Liakhovetski [Thu, 4 Apr 2013 14:24:43 +0000 (11:24 -0300)]
upstream: [media] mx3-camera: move interface activation and deactivation to clock callbacks

When adding and removing a client, the mx3-camera driver only activates
and deactivates its camera interface respectively, which doesn't include
any client-specific actions. Move this functionality into .clock_start()
and .clock_stop() callbacks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] atmel-isi: move interface activation and deactivation to clock...
Guennadi Liakhovetski [Thu, 4 Apr 2013 12:56:09 +0000 (09:56 -0300)]
upstream: [media] atmel-isi: move interface activation and deactivation to clock callbacks

When adding and removing a client, the atmel-isi camera host driver only
activates and deactivates its camera interface respectively, which doesn't
include any client-specific actions. Move this functionality into
.clock_start() and .clock_stop() callbacks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] omap1-camera: move interface activation and deactivation to clock...
Guennadi Liakhovetski [Thu, 4 Apr 2013 12:38:00 +0000 (09:38 -0300)]
upstream: [media] omap1-camera: move interface activation and deactivation to clock callbacks

When adding and removing a client, the omap1-camera driver only activates
and deactivates its camera interface respectively, which doesn't include
any client-specific actions. Move this functionality into .clock_start()
and .clock_stop() callbacks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] pxa-camera: move interface activation and deactivation to clock...
Guennadi Liakhovetski [Thu, 4 Apr 2013 11:56:00 +0000 (08:56 -0300)]
upstream: [media] pxa-camera: move interface activation and deactivation to clock callbacks

When adding and removing a client, the pxa-camera driver only activates
and deactivates its camera interface respectively, which doesn't include
any client-specific actions. Move this functionality into .clock_start()
and .clock_stop() callbacks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc-camera: add host clock callbacks to start and stop the master...
Guennadi Liakhovetski [Thu, 4 Apr 2013 11:51:36 +0000 (08:51 -0300)]
upstream: [media] soc-camera: add host clock callbacks to start and stop the master clock

Currently soc-camera uses a single camera host callback to activate the
interface master clock and to configure the interface for a specific
client. However, during probing we might not have the information about
a client, we just need to activate the clock. Add new camera host driver
callbacks to only start and stop the clock without and client-specific
configuration.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc-camera: move common code to soc_camera.c
Guennadi Liakhovetski [Thu, 4 Apr 2013 11:21:12 +0000 (08:21 -0300)]
upstream: [media] soc-camera: move common code to soc_camera.c

All soc-camera host drivers include a pointer to an soc-camera device in
their host private struct to check, that only one client is connected.
Move this common code to soc_camera.c.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] ttusb-budget: fix memory leak in ttusb_probe()
Alexey Khoroshilov [Mon, 10 Jun 2013 19:00:54 +0000 (16:00 -0300)]
upstream: [media] ttusb-budget: fix memory leak in ttusb_probe()

If something goes wrong starting from i2c_add_adapter(),
ttusb->iso_urb[] and ttusb itself are not deallocated.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] V4L2: soc-camera: remove unneeded include path
Guennadi Liakhovetski [Thu, 25 Apr 2013 11:05:15 +0000 (08:05 -0300)]
upstream: [media] V4L2: soc-camera: remove unneeded include path

soc-camera isn't sufficiently broken to include any files from the
drivers/media/i2c/soc_camera directory in its core or host driver files:-)

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: Cocci spatch "ptr_ret.spatch"
Thomas Meyer [Sat, 1 Jun 2013 09:56:26 +0000 (06:56 -0300)]
upstream: [media] media: Cocci spatch "ptr_ret.spatch"

Use the PTR_RET() macro to simplify error processing.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc_camera: tw9910: Remove empty function
Sachin Kamat [Fri, 24 May 2013 11:25:07 +0000 (08:25 -0300)]
upstream: [media] soc_camera: tw9910: Remove empty function

After the switch to devm_* functions, the 'remove' function does
not do anything. Delete it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc_camera: mt9t112: Remove empty function
Sachin Kamat [Fri, 24 May 2013 11:25:06 +0000 (08:25 -0300)]
upstream: [media] soc_camera: mt9t112: Remove empty function

After the switch to devm_* functions, the 'remove' function does
not do anything. Delete it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc_camera_platform: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 09:19:21 +0000 (06:19 -0300)]
upstream: [media] soc_camera_platform: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
[g.liakhovetski@gmx.de: further simplified return statement]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc_camera/sh_mobile_csi2: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 09:19:20 +0000 (06:19 -0300)]
upstream: [media] soc_camera/sh_mobile_csi2: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc_camera: Fix checkpatch warning in ov9640.c
Sachin Kamat [Tue, 30 Apr 2013 09:29:09 +0000 (06:29 -0300)]
upstream: [media] soc_camera: Fix checkpatch warning in ov9640.c

Silences the following warning:
WARNING: please, no space before tabs

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc_camera: Constify dev_pm_ops in mt9t031.c
Sachin Kamat [Tue, 30 Apr 2013 09:29:08 +0000 (06:29 -0300)]
upstream: [media] soc_camera: Constify dev_pm_ops in mt9t031.c

Silences the following warning:
WARNING: struct dev_pm_ops should normally be const

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] soc-camera: remove two unused configs
Paul Bolle [Tue, 9 Apr 2013 09:15:58 +0000 (06:15 -0300)]
upstream: [media] soc-camera: remove two unused configs

The last users of Kconfig symbols MX3_VIDEO and VIDEO_MX2_HOSTSUPPORT
were removed in v3.2. Their Kconfig entries can be removed now.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] go7007: fix return 0 for unsupported devices in go7007_usb_probe()
Alexey Khoroshilov [Wed, 19 Jun 2013 19:57:40 +0000 (16:57 -0300)]
upstream: [media] go7007: fix return 0 for unsupported devices in go7007_usb_probe()

probe() should not return 0 for unsupported devices, but go7007_usb_probe() does.
The patch fixes it to return -ENODEV.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] usbtv: Add driver for Fushicai USBTV007 video frame grabber
Lubomir Rintel [Mon, 17 Jun 2013 13:29:06 +0000 (10:29 -0300)]
upstream: [media] usbtv: Add driver for Fushicai USBTV007 video frame grabber

Reverse-engineered driver for cheapo video digitizer, made from observations of
Windows XP driver. The protocol is not yet completely understood, so far we
don't provide any controls, only support a single format out of three and don't
support the audio device.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: i2c: ths7303: remove unused member driver_data
Lad, Prabhakar [Sat, 15 Jun 2013 15:34:10 +0000 (12:34 -0300)]
upstream: [media] media: i2c: ths7303: remove unused member driver_data

This patch removes the driver_data member from ths7303_state structure.
The driver_data member was intended to differentiate between ths7303 and
ths7353 chip and get the g_chip_ident, But as of now g_chip_ident is
obsolete, so there is no need of driver_data.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] radio-sf16fmi: Set frequency during init
Ondrej Zary [Fri, 14 Jun 2013 20:01:39 +0000 (17:01 -0300)]
upstream: [media] radio-sf16fmi: Set frequency during init

Set freqency during initialization to fix v4l2-compliance error.
This also fixes VIDIOC_G_FREQUENCY always returning zero (broken by me during LM7000 conversion).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] radio-sf16fmi: Add module name to bus_info
Ondrej Zary [Fri, 14 Jun 2013 20:01:38 +0000 (17:01 -0300)]
upstream: [media] radio-sf16fmi: Add module name to bus_info

Fix v4l2-compliance in VIDIOC_QUERYCAP by changing "ISA" to "ISA:radio-sf16fmi".

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] usbvision-video: fix memory leak of alt_max_pkt_size
Alexey Khoroshilov [Mon, 10 Jun 2013 20:32:29 +0000 (17:32 -0300)]
upstream: [media] usbvision-video: fix memory leak of alt_max_pkt_size

1. usbvision->alt_max_pkt_size is not deallocated anywhere.
2. if allocation of usbvision->alt_max_pkt_size fails,
there is no proper deallocation of already acquired resources.
The patch adds kfree(usbvision->alt_max_pkt_size) to
usbvision_release() as soon as other deallocations happen there.
It calls usbvision_release() if allocation of
usbvision->alt_max_pkt_size fails as soon as usbvision_release()
is safe to work with incompletely initialized usbvision structure.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: i2c: tvp514x: add OF support
Lad, Prabhakar [Tue, 4 Jun 2013 15:26:23 +0000 (12:26 -0300)]
upstream: [media] media: i2c: tvp514x: add OF support

add OF support for the tvp514x driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Rob Landley <rob@landley.net>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: davinci-linux-open-source@linux.davincidsp.com
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: davinci: vpif_display: remove unnecessary loop for IRQ resource
Lad, Prabhakar [Mon, 17 Jun 2013 14:20:51 +0000 (11:20 -0300)]
upstream: [media] media: davinci: vpif_display: remove unnecessary loop for IRQ resource

For vpif display driver each IRQ resource contains a single IRQ
so drop the second loop.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: davinci: vpif_display: Convert to devm_* api
Lad, Prabhakar [Mon, 17 Jun 2013 14:20:50 +0000 (11:20 -0300)]
upstream: [media] media: davinci: vpif_display: Convert to devm_* api

use devm_request_irq() instead of request_irq(). This ensures
more consistent error values and simplifies error paths.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: davinci: vpif_display: use module_platform_driver()
Lad, Prabhakar [Mon, 17 Jun 2013 14:20:49 +0000 (11:20 -0300)]
upstream: [media] media: davinci: vpif_display: use module_platform_driver()

This patch uses module_platform_driver() to simplify the code.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: davinci: vpif_display: move the freeing of irq and global...
Lad, Prabhakar [Mon, 17 Jun 2013 14:20:48 +0000 (11:20 -0300)]
upstream: [media] media: davinci: vpif_display: move the freeing of irq and global variables to remove()

Ideally the freeing of irq's and the global variables needs to be
done in the remove() rather than module_exit(), this patch moves
the freeing up of irq's and freeing the memory allocated to channel
objects to remove() callback of struct platform_driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: davinci: vpif_capture: remove unnecessary loop for IRQ resource
Lad, Prabhakar [Mon, 17 Jun 2013 14:20:47 +0000 (11:20 -0300)]
upstream: [media] media: davinci: vpif_capture: remove unnecessary loop for IRQ resource

For vpif capture driver each IRQ resource contains a single IRQ
so drop the second loop.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: davinci: vpif_capture: Convert to devm_* api
Lad, Prabhakar [Mon, 17 Jun 2013 14:20:46 +0000 (11:20 -0300)]
upstream: [media] media: davinci: vpif_capture: Convert to devm_* api

use devm_request_irq() instead of request_irq(). This ensures
more consistent error values and simplifies error paths.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: davinci: vpif_capture: use module_platform_driver()
Lad, Prabhakar [Mon, 17 Jun 2013 14:20:45 +0000 (11:20 -0300)]
upstream: [media] media: davinci: vpif_capture: use module_platform_driver()

This patch uses module_platform_driver() to simplify the code.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>