platform/kernel/linux-3.10.git
9 years agoupstream: [media] stb0899: use autodetected inversion instead of configured inversion
Reinhard Nißl [Sun, 2 Jun 2013 18:02:05 +0000 (15:02 -0300)]
upstream: [media] stb0899: use autodetected inversion instead of configured inversion

For consistency, it is necessary to use the autodetected inversion
instead of the configured one.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] stb0899: store autodetected inversion while tuning in non S2 mode
Reinhard Nißl [Sun, 2 Jun 2013 18:01:18 +0000 (15:01 -0300)]
upstream: [media] stb0899: store autodetected inversion while tuning in non S2 mode

In non S2 mode, the device is able to autodetect inversion. So
let's store it for tuning to S2 transponders.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] stb0899: store successful inversion for next run
Reinhard Nißl [Sun, 2 Jun 2013 17:59:00 +0000 (14:59 -0300)]
upstream: [media] stb0899: store successful inversion for next run

Usually, inversion doesn't change in a system. Storing the last
successful inversion value speeds up tuning of DVB-S2 transponders.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] stb0899: allow minimum symbol rate of 2000000
Zoran Turalija [Sun, 2 Jun 2013 17:56:33 +0000 (14:56 -0300)]
upstream: [media] stb0899: allow minimum symbol rate of 2000000

Looks like product datasheets for tuners containing STB0899 are
suggesting specification for min. symbol rate of 2MS/s.
Some specs found here, all suggesting 2MS/s for min. symbol rate:
    Comtech DVBS2-6899
      http://comtech.sg1002.myweb.hinet.net/pdf/dvbs2-6899.pdf
    TechniSat SkyStar HD2
      http://www.scaistar.com/skystar2/skystarhd2.htm
    Azurewave AD-SP400
      http://www.pulsat.com/products/AzureWave-AD%252dSP400-High-Definition-PC-Card.html
New patch:
This makes minimum symbol rate driver capabilities on par with some
accessible datasheet specifications*, and allows tuning on linux to
transponders that have symbol rate between 2000000-5000000, too.
Patch was tested successfully on Eutelsat 16A transponders that
became reachable with it (2000000 < symbol rate < 5000000):
      * DVB/S  12507050 V  2532000 3/4
      * DVB/S2 12574000 V  4355000 3/4 8PSK
      * DVB/S  12593000 V  2500000 2/3
      * DVB/S  12596940 V  2848000 2/3
      * DVB/S  12600750 V  2500000 1/2
      * DVB/S  12675590 H  4248000 3/4
(*) Datasheet: http://comtech.sg1002.myweb.hinet.net/pdf/dvbs2-6899.pdf
        Maximum Symbol Rate
        QPSK/LDPC/PCH: 20-30Mbps
        8PSK/LDPC/BCH: 10-30Mbps
        DVB: 2-45Mbps
             ^--------- min. symbol rate

Signed-off-by: Zoran Turalija <zoran.turalija@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] stb0899: fix inversion enum values to match usage with CFR
Reinhard Nißl [Sun, 2 Jun 2013 17:52:43 +0000 (14:52 -0300)]
upstream: [media] stb0899: fix inversion enum values to match usage with CFR

Throughout the zig-zag-implementations, inversion is taken into
account when reading and writing the CFR register, which contains
the derotator frequency. As swapping IQ signals changes the sign
of that register for example, the idea is to compensate that sign
change by multiplying the register value with the inversion enum
value.
The current enum values 0 and 1 for IQ_SWAP_OFF and IQ_SWAP_ON
don't work in the case IQ_SWAP_OFF, due to the multiplication by
zero (I've only found a single device which actually uses
IQ_SWAP_OFF in it's config).
I've changed the enum values to +1 and -1 to accommodate to the
intended usage.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] stb0899: enable auto inversion handling unconditionally
Reinhard Nißl [Sun, 2 Jun 2013 17:52:02 +0000 (14:52 -0300)]
upstream: [media] stb0899: enable auto inversion handling unconditionally

It seems that current inversion handling addresses only the signal
routing on the PCB, i. e. IQ signals are either swapped or not.
But when the device is operated in a Satellite Channel Router (SCR)
environment, an additional inversion is required due to the way how
the SCR works. Therefore it makes sense to me to always enable auto
inversion handling and drop the enum value IQ_SWAP_AUTO.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] stb0899: allow minimum symbol rate of 1000000
Zoran Turalija [Sun, 2 Jun 2013 17:40:51 +0000 (14:40 -0300)]
upstream: [media] stb0899: allow minimum symbol rate of 1000000

This makes minimum symbol rate driver capabilities on par with
windows driver, and allows tuning on linux to transponders that
have symbol rate below 5000000, too.
Patch was tested successfully on Eutelsat 16A transponders that
became reachable with it (1000000 < symbol rate < 5000000):
      * DVB/S  12507050 V  2532000 3/4
      * DVB/S2 12574000 V  4355000 3/4 8PSK
      * DVB/S  12593000 V  2500000 2/3
      * DVB/S  12596940 V  2848000 2/3
      * DVB/S  12600750 V  2500000 1/2
      * DVB/S  12675590 H  4248000 3/4

Signed-off-by: Zoran Turalija <zoran.turalija@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] stb0899: sign extend raw CRL_FREQ value
Reinhard Nißl [Sun, 2 Jun 2013 17:37:06 +0000 (14:37 -0300)]
upstream: [media] stb0899: sign extend raw CRL_FREQ value

Contrary to the chip's specs, the register's value is signed, so we
need to sign extend the value before using it in calculations like
when determining the offset frequency.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] r820t: do not double-free fe->tuner_priv in r820t_release()
Gianluca Gennari [Sun, 2 Jun 2013 17:26:15 +0000 (14:26 -0300)]
upstream: [media] r820t: do not double-free fe->tuner_priv in r820t_release()

fe->tuner_priv is already freed by hybrid_tuner_release_state().

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] dib8000: Fix dib8000_set_frontend() never setting ret
Geert Uytterhoeven [Sun, 2 Jun 2013 16:52:17 +0000 (13:52 -0300)]
upstream: [media] dib8000: Fix dib8000_set_frontend() never setting ret

drivers/media/dvb-frontends/dib8000.c: In function ‘dib8000_set_frontend’:
drivers/media/dvb-frontends/dib8000.c:3556: warning: ‘ret’ is used uninitialized in this function
Remove the variable and return zero instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] uvcvideo: Fix open/close race condition
Laurent Pinchart [Fri, 26 Apr 2013 01:28:51 +0000 (22:28 -0300)]
upstream: [media] uvcvideo: Fix open/close race condition

Maintaining the users count using an atomic variable makes sure that
access to the counter won't be racy, but doesn't serialize access to the
operations protected by the counter. This creates a race condition that
could result in the status URB being submitted multiple times.
Use a mutex to protect the users count and serialize access to the
status start and stop operations.

Reported-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] uvcvideo: quirk PROBE_DEF for Alienware X51 OmniVision webcam
Joseph Salisbury [Wed, 15 May 2013 20:38:48 +0000 (17:38 -0300)]
upstream: [media] uvcvideo: quirk PROBE_DEF for Alienware X51 OmniVision webcam

BugLink: http://bugs.launchpad.net/bugs/1180409
OminiVision webcam 0x05a9:0x2643 needs the same UVC_QUIRK_PROBE_DEF
as other OmniVision models to work properly.

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] uvcvideo: quirk PROBE_DEF for Dell Studio / OmniVision webcam
Kamal Mostafa [Mon, 15 Apr 2013 19:01:51 +0000 (16:01 -0300)]
upstream: [media] uvcvideo: quirk PROBE_DEF for Dell Studio / OmniVision webcam

BugLink: https://bugs.launchpad.net/bugs/1168430
OminiVision webcam 0x05a9:0x264a (in Dell Studio Hybrid 140g) needs the
same UVC_QUIRK_PROBE_DEF as other OmniVision model to be recognized
consistently.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: do not call v4l2_m2m_job_finish from .job_abort
Philipp Zabel [Thu, 23 May 2013 13:43:01 +0000 (10:43 -0300)]
upstream: [media] coda: do not call v4l2_m2m_job_finish from .job_abort

If we just declare the job finished here while the CODA is still
running, the call to v4l2_m2m_ctx_release in coda_release, which
is supposed to wait for a running job to finish, will return
immediately and free memory that the CODA is still using.
Just set the 'aborting' flag and let coda_irq_handler deal with it.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: replace completion with mutex
Philipp Zabel [Thu, 23 May 2013 13:43:00 +0000 (10:43 -0300)]
upstream: [media] coda: replace completion with mutex

Not only do we need to wait for job completion when we want to
call a command on the CODA in start/stop_streaming, we also need
to make sure that a new job doesn't start before the command
finished.
Use a mutex to lock the coda command handling. On timeout, the
device_run job must be marked as finished and the mutex released,
as otherwise coda_release will block.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: add coda_encode_header helper function
Philipp Zabel [Thu, 23 May 2013 13:42:59 +0000 (10:42 -0300)]
upstream: [media] coda: add coda_encode_header helper function

In preparation for CODA7541 and CODA960 multi-stream support and for
replacement of the completion with a mutex lock, consolidate the
header encoding in a helper function.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: per-product list of codecs instead of list of formats
Philipp Zabel [Thu, 23 May 2013 13:42:58 +0000 (10:42 -0300)]
upstream: [media] coda: per-product list of codecs instead of list of formats

This patch adds a list of supported codecs per device type which is used to
determine the allowed pixel formats and maximum frame sizes depending on the
possible codecs. It allows frame sizes larger than 720 x 576 on CODA7 and adds
support for the YVU420 (planar YUV 4:2:0 with switched Cb and Cr) format.
Other uncompressed formats that could be added in the future are the chroma
interleaved NV12 and NV21 formats and the multiplanar variants YUV420M,
YVU420M, NV12M, and NV21M.
Further, rawstreamon is renamed to streamon_out and compstreamon is renamed
to streamon_cap in preparation for decoding support. The maximum encoded
frame buffer size is increased to 1 MiB.
Instead of tracking inst_type and codec across S_FMT calls, set the codec
and inst_type in start_streaming.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: simplify parameter buffer setup code
Philipp Zabel [Thu, 23 May 2013 13:42:57 +0000 (10:42 -0300)]
upstream: [media] coda: simplify parameter buffer setup code

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: Documentation/DocBook/media/v4l fix a typo
Stefan Huber [Wed, 5 Jun 2013 10:24:35 +0000 (12:24 +0200)]
upstream: Documentation/DocBook/media/v4l fix a typo

Corrected the word adjactent to adjacent.

Signed-off-by: Stefan Huber <steffhip@googlemail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
9 years agoupstream: Finally eradicate CONFIG_HOTPLUG
Stephen Rothwell [Tue, 21 May 2013 03:49:35 +0000 (13:49 +1000)]
upstream: Finally eradicate CONFIG_HOTPLUG

Ever since commit 45f035ab9b8f ("CONFIG_HOTPLUG should be always on"),
it has been basically impossible to build a kernel with CONFIG_HOTPLUG
turned off.  Remove all the remaining references to it.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Doug Thompson <dougthompson@xmission.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: [media] coda: clear registers in coda_hw_init
Philipp Zabel [Thu, 23 May 2013 13:42:56 +0000 (10:42 -0300)]
upstream: [media] coda: clear registers in coda_hw_init

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: stop setting bytesused in buf_prepare
Philipp Zabel [Thu, 23 May 2013 13:42:55 +0000 (10:42 -0300)]
upstream: [media] coda: stop setting bytesused in buf_prepare

The application must have filled the bytesused field,
don't overwrite it here.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: frame stride must be a multiple of 8
Philipp Zabel [Thu, 23 May 2013 13:42:54 +0000 (10:42 -0300)]
upstream: [media] coda: frame stride must be a multiple of 8

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: fix ENC_SEQ_OPTION for CODA7
Philipp Zabel [Thu, 23 May 2013 13:42:53 +0000 (10:42 -0300)]
upstream: [media] coda: fix ENC_SEQ_OPTION for CODA7

GAMMA_OFFSET is different between CodaDx6 and CODA7.
Also, this is a bitfield.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: doc: fix misspellings with 'codespell' tool
Anatol Pomozov [Wed, 8 May 2013 23:56:16 +0000 (16:56 -0700)]
upstream: doc: fix misspellings with 'codespell' tool

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
9 years agoupstream: [media] media: pci: remove duplicate checks for EPERM
Lad, Prabhakar [Tue, 14 May 2013 04:45:17 +0000 (01:45 -0300)]
upstream: [media] media: pci: remove duplicate checks for EPERM

This patch removes check for EPERM in dbg_g/s_register and
vidioc_g/s_register as this check is already performed by core.

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] media: usb: remove duplicate checks for EPERM in vidioc_g/s_register
Lad, Prabhakar [Tue, 14 May 2013 04:45:16 +0000 (01:45 -0300)]
upstream: [media] media: usb: remove duplicate checks for EPERM in vidioc_g/s_register

This patch removes check for EPERM in vidioc_g/s_register
as this check is already performed by core.

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] media: dvb-frontends: remove duplicate checks for EPERM in dbg_g...
Lad, Prabhakar [Tue, 14 May 2013 04:45:15 +0000 (01:45 -0300)]
upstream: [media] media: dvb-frontends: remove duplicate checks for EPERM in dbg_g/s_register

This patch removes check for EPERM in dbg_g/s_register
as this check is already performed by core.

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] media: i2c: remove duplicate checks for EPERM in dbg_g/s_register
Lad, Prabhakar [Tue, 14 May 2013 04:45:14 +0000 (01:45 -0300)]
upstream: [media] media: i2c: remove duplicate checks for EPERM in dbg_g/s_register

This patch removes check for EPERM in dbg_g/s_register of subdevice
drivers as this check is already performed by core.

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] coda: do not use v4l2_dev in coda_timeout
Philipp Zabel [Tue, 21 May 2013 13:32:42 +0000 (10:32 -0300)]
upstream: [media] coda: do not use v4l2_dev in coda_timeout

The timeout delayed work might be scheduled even after the v4l2 device is
released.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: fix error return value if v4l2_m2m_ctx_init fails
Philipp Zabel [Tue, 21 May 2013 13:31:25 +0000 (10:31 -0300)]
upstream: [media] coda: fix error return value if v4l2_m2m_ctx_init fails

Use ret from the outer scope, instead of redefining it in the
conditional clause. That way the error value reaches the end of
the function as intended.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: set umask 0644 on debug module param
Philipp Zabel [Tue, 21 May 2013 07:24:16 +0000 (04:24 -0300)]
upstream: [media] coda: set umask 0644 on debug module param

Otherwise module/coda/parameters/coda_debug won't show up in sysfs.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: enable dmabuf support
Philipp Zabel [Thu, 23 May 2013 10:06:30 +0000 (07:06 -0300)]
upstream: [media] coda: enable dmabuf support

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: use devm_ioremap_resource
Philipp Zabel [Tue, 21 May 2013 07:19:27 +0000 (04:19 -0300)]
upstream: [media] coda: use devm_ioremap_resource

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] coda: v4l2-compliance fix: add bus_info prefix 'platform'
Philipp Zabel [Tue, 21 May 2013 07:18:22 +0000 (04:18 -0300)]
upstream: [media] coda: v4l2-compliance fix: add bus_info prefix 'platform'

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] rc: gpio-ir-recv: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 08:24:08 +0000 (05:24 -0300)]
upstream: [media] rc: gpio-ir-recv: 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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] timblogiw: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 08:24:07 +0000 (05:24 -0300)]
upstream: [media] timblogiw: 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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] bw-qcam: fix timestamp handling
Hans Verkuil [Fri, 10 May 2013 11:06:50 +0000 (08:06 -0300)]
upstream: [media] bw-qcam: fix timestamp handling

bw-qcam didn't set the timestamp and it didn't set q->timestamp_type.

Tested-by: Borislav Petkov <bp@suse.de>
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: rearrange description of structure members
Lad, Prabhakar [Tue, 14 May 2013 09:45:31 +0000 (06:45 -0300)]
upstream: [media] media: i2c: tvp7002: rearrange description of structure members

This patch rearranges the description of field members of
struct tvp7002_config. Also as the all the fields where accepting
a value either 0/1, made the members as bool.

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] media: i2c: tvp7002: remove duplicate define
Lad, Prabhakar [Tue, 14 May 2013 09:45:30 +0000 (06:45 -0300)]
upstream: [media] media: i2c: tvp7002: remove duplicate define

this patch removes duplicate #define TVP7002_MODULE_NAME
form the driver file, which was also defined in media/tvp7002.h

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] hdpvr: Removed unnecessary use of kzalloc() in get_video_info()
Leonid Kegulskiy [Mon, 13 May 2013 10:10:42 +0000 (07:10 -0300)]
upstream: [media] hdpvr: Removed unnecessary use of kzalloc() in get_video_info()

[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Leonid Kegulskiy <leo@lumanate.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] videodev2.h: fix typos
Lad, Prabhakar [Mon, 20 May 2013 09:02:40 +0000 (06:02 -0300)]
upstream: [media] videodev2.h: fix typos

This patch fixes several typos in videodev2.h file

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] sony-btf-mpx: Drop needless newline in param description
Jean Delvare [Wed, 15 May 2013 20:56:11 +0000 (17:56 -0300)]
upstream: [media] sony-btf-mpx: Drop needless newline in param description

Module parameter descriptions need not be terminated with a newline.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()
Wei Yongjun [Mon, 13 May 2013 13:00:01 +0000 (10:00 -0300)]
upstream: [media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()

The orig code will release all the resources if v4l2_device_register()
failed and return 0. But what we need in this case is to return an
negative error code to let the caller known we are failed.
So the patch save the return value of v4l2_device_register() to 'ret'
and return it when error.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] blackfin: fix error return code in bcap_probe()
Wei Yongjun [Mon, 13 May 2013 07:52:16 +0000 (04:52 -0300)]
upstream: [media] blackfin: fix error return code in bcap_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] ad9389b: fix error return code in ad9389b_probe()
Wei Yongjun [Mon, 13 May 2013 05:00:10 +0000 (02:00 -0300)]
upstream: [media] ad9389b: fix error return code in ad9389b_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] vpif_capture: fix error return code in vpif_probe()
Wei Yongjun [Mon, 13 May 2013 04:57:37 +0000 (01:57 -0300)]
upstream: [media] vpif_capture: fix error return code in vpif_probe()

Fix to return -ENODEV in the subdevice register error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-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] vpif_display: fix error return code in vpif_probe()
Wei Yongjun [Mon, 13 May 2013 04:57:23 +0000 (01:57 -0300)]
upstream: [media] vpif_display: fix error return code in vpif_probe()

Fix to return -ENODEV in the subdevice register error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-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] v4l: vb2: fix error return code in __vb2_init_fileio()
Wei Yongjun [Mon, 13 May 2013 04:48:45 +0000 (01:48 -0300)]
upstream: [media] v4l: vb2: fix error return code in __vb2_init_fileio()

Fix to return -EINVAL in the get kernel address error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] media: fix hdpvr kconfig/build errors
Randy Dunlap [Mon, 20 May 2013 15:32:39 +0000 (12:32 -0300)]
upstream: [media] media: fix hdpvr kconfig/build errors

Fix hdpvr build errors when CONFIG_I2C=m and VIDEO_V4L2=m and
VIDEO_HDPVR=y.
drivers/built-in.o: In function `hdpvr_disconnect':
hdpvr-core.c:(.text+0xef542): undefined reference to `v4l2_device_disconnect'
hdpvr-core.c:(.text+0xef57e): undefined reference to `i2c_del_adapter'
hdpvr-core.c:(.text+0xef58a): undefined reference to `video_unregister_device'
drivers/built-in.o: In function `hdpvr_delete':
(.text+0xef5b9): undefined reference to `video_device_release'
drivers/built-in.o: In function `hdpvr_probe':
hdpvr-core.c:(.text+0xef63a): undefined reference to `v4l2_device_register'
hdpvr-core.c:(.text+0xefd97): undefined reference to `i2c_del_adapter'
drivers/built-in.o: In function `hdpvr_s_ctrl':
hdpvr-video.c:(.text+0xf03c0): undefined reference to `v4l2_ctrl_activate'
drivers/built-in.o: In function `hdpvr_device_release':
hdpvr-video.c:(.text+0xf0470): undefined reference to `v4l2_device_unregister'
hdpvr-video.c:(.text+0xf0479): undefined reference to `v4l2_ctrl_handler_free'
hdpvr-video.c:(.text+0xf048f): undefined reference to `i2c_del_adapter'
drivers/built-in.o: In function `hdpvr_open':
hdpvr-video.c:(.text+0xf0570): undefined reference to `video_devdata'
hdpvr-video.c:(.text+0xf057b): undefined reference to `v4l2_fh_init'
hdpvr-video.c:(.text+0xf0583): undefined reference to `v4l2_fh_add'
drivers/built-in.o: In function `video_drvdata':
hdpvr-video.c:(.text+0xf08a0): undefined reference to `video_devdata'
drivers/built-in.o: In function `vidioc_s_dv_timings':
hdpvr-video.c:(.text+0xf0d34): undefined reference to `v4l_match_dv_timings'
drivers/built-in.o: In function `hdpvr_poll':
hdpvr-video.c:(.text+0xf1455): undefined reference to `v4l2_ctrl_poll'
drivers/built-in.o: In function `hdpvr_release':
hdpvr-video.c:(.text+0xf18f6): undefined reference to `v4l2_fh_release'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1be3): undefined reference to `v4l2_ctrl_handler_init_class'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1c19): undefined reference to `v4l2_ctrl_new_std'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1c42): undefined reference to `v4l2_ctrl_new_std'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1c6b): undefined reference to `v4l2_ctrl_new_std'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1cac): undefined reference to `v4l2_ctrl_new_std'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1cd5): undefined reference to `v4l2_ctrl_new_std'
drivers/built-in.o:(.text+0xf1cfe): more undefined references to `v4l2_ctrl_new_std' follow
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1d75): undefined reference to `v4l2_ctrl_new_std_menu'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1d9e): undefined reference to `v4l2_ctrl_new_std_menu'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1dc3): undefined reference to `v4l2_ctrl_new_std_menu'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1de5): undefined reference to `v4l2_ctrl_new_std_menu'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1e18): undefined reference to `v4l2_ctrl_new_std'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1e4b): undefined reference to `v4l2_ctrl_new_std'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1e90): undefined reference to `v4l2_ctrl_cluster'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1e98): undefined reference to `v4l2_ctrl_handler_setup'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1ec1): undefined reference to `video_device_alloc'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1f85): undefined reference to `__video_register_device'
drivers/built-in.o: In function `hdpvr_register_videodev':
(.text+0xf1fac): undefined reference to `v4l2_ctrl_handler_free'
drivers/built-in.o: In function `hdpvr_register_ir_tx_i2c':
(.text+0xf238f): undefined reference to `i2c_new_device'
drivers/built-in.o: In function `hdpvr_register_ir_rx_i2c':
(.text+0xf2434): undefined reference to `i2c_new_device'
drivers/built-in.o: In function `hdpvr_register_i2c_adapter':
(.text+0xf2514): undefined reference to `i2c_add_adapter'
drivers/built-in.o:(.rodata+0x1b368): undefined reference to `video_ioctl2'
drivers/built-in.o:(.rodata+0x1b690): undefined reference to `v4l2_ctrl_log_status'
drivers/built-in.o:(.rodata+0x1b6f8): undefined reference to `v4l2_ctrl_subscribe_event'
drivers/built-in.o:(.rodata+0x1b700): undefined reference to `v4l2_event_unsubscribe'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] Missing break statement added in smsdvb-main.c
Jakob Normark [Sun, 19 May 2013 12:30:23 +0000 (09:30 -0300)]
upstream: [media] Missing break statement added in smsdvb-main.c

Fix missing break that so that n_layers are not accidentally incorrect
Kernel version: v3.10-rc1

Signed-off-by: Jakob Normark <jakobnormark@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] saa7115: Don't use a dynamic array
Mauro Carvalho Chehab [Tue, 21 May 2013 14:36:30 +0000 (11:36 -0300)]
upstream: [media] saa7115: Don't use a dynamic array

At least on s390, gcc complains about that:
    drivers/media/i2c/saa7115.c: In function 'saa711x_detect_chip.constprop.2':
    drivers/media/i2c/saa7115.c:1647:1: warning: 'saa711x_detect_chip.constprop.2' uses dynamic stack allocation [enabled by default]

While for me the above report seems utterly bogus, as the
compiler should be optimizing saa711x_detect_chip, merging
it with saa711x_detect_chip and changing:
char chip_ver[size - 1];
to
char chip_ver[16];

because this function is only called on this code snippet:
char name[17];
...
ident = saa711x_detect_chip(client, id, name, sizeof(name));

It seems that gcc is not optimizing it, at least on s390.

As getting rid of it is easy, let's do it.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] videobuf-dma-contig: use vm_iomap_memory()
Mauro Carvalho Chehab [Wed, 17 Apr 2013 11:22:16 +0000 (08:22 -0300)]
upstream: [media] videobuf-dma-contig: use vm_iomap_memory()

vm_iomap_memory() provides a better end user interface than
remap_pfn_range(), as it does the needed tests before doing
mmap.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] smscoreapi: Make Siano firmware load more verbose
Roberto Alcântara [Sat, 11 May 2013 14:53:29 +0000 (11:53 -0300)]
upstream: [media] smscoreapi: Make Siano firmware load more verbose

If firmware load fails, report it as an error.

Signed-off-by: Roberto Alcantara <roberto@eletronica.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] videobuf_vm_{open,close} race fixes
Al Viro [Thu, 9 May 2013 18:03:33 +0000 (15:03 -0300)]
upstream: [media] videobuf_vm_{open,close} race fixes

just use videobuf_queue_lock(map->q) to protect map->count; vm_area_operations
->open() and ->close() are called just under vma->vm_mm->mmap_sem, which
doesn't help the drivers at all, since clonal VMAs are normally in different
address spaces...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] saa7115: Add register setup and config for gm7113c
Jon Arne Jørgensen [Fri, 10 May 2013 06:52:28 +0000 (03:52 -0300)]
upstream: [media] saa7115: Add register setup and config for gm7113c

The gm7113c chip is similar to the original saa7113 chip, so I try to
re-use most of the saa7113 specific setup-/configuration registers.
According to the datasheet, the gm7113c chip has not implemented
any register-addresses after 0x1f, so I add a new entry to for the chip
to the saa711x_has_reg function.
The devices I've seen using this chip will fail to get stable video-sync
if these registers are not zeroed:
R_14_ANAL_ADC_COMPAT_CNTL
R_15_VGATE_START_FID_CHG
R_16_VGATE_STOP
R_17_MISC_VGATE_CONF_AND_MSB
The saa711x_set_v4lstd is updated to send a simpler configuration-table
to avoid setting these registers.

Signed-off-by: Jon Arne Jørgensen <jonarne@jonarne.no>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] saa7115: add detection code for gm7113c
Mauro Carvalho Chehab [Fri, 26 Apr 2013 13:22:48 +0000 (10:22 -0300)]
upstream: [media] saa7115: add detection code for gm7113c

Adds a code that (auto)detects gm7113c clones. The auto-detection
here is not perfect, as, on contrary to what it would be expected
by looking into its datasheets some devices would return, instead:
saa7115 0-0025: chip 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 @ 0x4a is unknown
(found on a device labeled as GM7113C 1145 by Ezequiel Garcia)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Jon Arne Jørgensen <jonarne@jonarne.no>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] saa7115: move the autodetection code out of the probe function
Mauro Carvalho Chehab [Fri, 26 Apr 2013 13:22:47 +0000 (10:22 -0300)]
upstream: [media] saa7115: move the autodetection code out of the probe function

As we're now seeing other variants from chinese clones, like
gm1113c, we'll need to add more bits at the detection code.
So, move it into a separate function.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Jon Arne Jørgensen <jonarne@jonarne.no>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] wl128x: do not call copy_to_user() while holding spinlocks
Alexey Khoroshilov [Tue, 7 May 2013 20:57:08 +0000 (17:57 -0300)]
upstream: [media] wl128x: do not call copy_to_user() while holding spinlocks

copy_to_user() must not be called with spinlocks held, but it is in
fmc_transfer_rds_from_internal_buff().
The patch copies data to tmpbuf, releases spinlock and then passes it to userspace.
By the way there is a small unification: replace a couple of hardcoded constants by a macro.
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] solo6x10: Approximate frame intervals with non-standard denominator
Ismael Luceno [Fri, 3 May 2013 18:54:57 +0000 (15:54 -0300)]
upstream: [media] solo6x10: Approximate frame intervals with non-standard denominator

Instead of falling back to 1/25 (PAL) or 1/30 (NTSC).

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
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: enable TVP7002 decoder for media controller...
Lad, Prabhakar [Fri, 3 May 2013 07:17:19 +0000 (04:17 -0300)]
upstream: [media] media: i2c: tvp7002: enable TVP7002 decoder for media controller based usage

This patch enables tvp7002 decoder driver for media controller
based usage by adding v4l2_subdev_pad_ops  operations support
for enum_mbus_code, set_pad_format, get_pad_format and media_entity_init()
on probe and media_entity_cleanup() on remove.

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] hdpvr: Added some error handling in hdpvr_start_streaming()
Leonid Kegulskiy [Thu, 25 Apr 2013 08:59:56 +0000 (05:59 -0300)]
upstream: [media] hdpvr: Added some error handling in hdpvr_start_streaming()

Signed-off-by: Leonid Kegulskiy <leo@lumanate.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] hdpvr: Removed unnecessary get_video_info() call from hdpvr_device_...
Leonid Kegulskiy [Thu, 25 Apr 2013 08:59:54 +0000 (05:59 -0300)]
upstream: [media] hdpvr: Removed unnecessary get_video_info() call from hdpvr_device_init()

Signed-off-by: Leonid Kegulskiy <leo@lumanate.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: vpbe: fix checkpatch warning for CamelCase
Lad, Prabhakar [Fri, 3 May 2013 11:39:25 +0000 (08:39 -0300)]
upstream: [media] media: davinci: vpbe: fix checkpatch warning for CamelCase

This patch fixes checkpatch warning to avoid CamelCase.

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] em28xx: Add support for 1b80:e1cc Delock 61959
Jakob Haufe [Sat, 13 Apr 2013 14:03:37 +0000 (11:03 -0300)]
upstream: [media] em28xx: Add support for 1b80:e1cc Delock 61959

Hardware is the same as MaxMedia UB425-TC but ships with a different
remote.

Signed-off-by: Jakob Haufe <sur5r@sur5r.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] rc: Add rc-delock-61959
Jakob Haufe [Sat, 13 Apr 2013 14:03:36 +0000 (11:03 -0300)]
upstream: [media] rc: Add rc-delock-61959

This adds the keytable for the remote that comes with the Delock 61959.
NEC protocol with address 0x866b.

Signed-off-by: Jakob Haufe <sur5r@sur5r.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] CARDLIST.bttv: add new cards
Hans Verkuil [Sat, 20 Apr 2013 11:57:41 +0000 (08:57 -0300)]
upstream: [media] CARDLIST.bttv: add new cards

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 displaying of error to approppra...
Lad, Prabhakar [Fri, 19 Apr 2013 08:53:30 +0000 (05:53 -0300)]
upstream: [media] media: davinci: vpif_display: move displaying of error to approppraite place

this patch moves the displaying out error case  "VPIF IRQ request failed\n"
when there is actual request_irq() fail.

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] media: davinci: vpif: remove unwanted header file inclusion
Lad, Prabhakar [Fri, 19 Apr 2013 08:53:29 +0000 (05:53 -0300)]
upstream: [media] media: davinci: vpif: remove unwanted header file inclusion

this patch removes unwanted header file inclusion and sorts
header alphabetically.

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] bttv: Add noname Bt848 capture card with 14MHz xtal
Ondrej Zary [Sun, 14 Apr 2013 15:39:09 +0000 (12:39 -0300)]
upstream: [media] bttv: Add noname Bt848 capture card with 14MHz xtal

Add support for noname Bt848 capture-only card (3x composite, 1x S-VHS)
with 14MHz crystal:
http://www.rainbow-software.org/images/hardware/bt848_.jpg
14MHz PLL was not supported by bttv driver until now.

[mchehab@redhat.com: CodingStyle fixes]
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] media:adv7180: Use dev_pm_ops
Lars-Peter Clausen [Sat, 13 Apr 2013 08:25:59 +0000 (05:25 -0300)]
upstream: [media] media:adv7180: Use dev_pm_ops

Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] blackfin: add display support in ppi driver
Scott Jiang [Fri, 12 Apr 2013 22:52:57 +0000 (19:52 -0300)]
upstream: [media] blackfin: add display support in ppi driver

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] bttv: Add Adlink MPG24 entry to the bttv cardlist
Hans Verkuil [Fri, 12 Apr 2013 12:30:29 +0000 (09:30 -0300)]
upstream: [media] bttv: Add Adlink MPG24 entry to the bttv cardlist

Add a proper card entry for this device, rather than abusing entries that are
not-quite-right.
Regards,
Hans

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] s5k6aa: Convert to devm_gpio_request_one()
Laurent Pinchart [Thu, 2 May 2013 11:29:43 +0000 (08:29 -0300)]
upstream: [media] s5k6aa: Convert to devm_gpio_request_one()

Use the devm_gpio_request_one() managed function to simplify cleanup
code paths.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] tvp514x: Fix double free
Laurent Pinchart [Thu, 2 May 2013 13:09:07 +0000 (10:09 -0300)]
upstream: [media] tvp514x: Fix double free

The tvp514x data structure is allocated using devm_kzalloc(). Freeing it
explictly would result in a double free. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] mt9v032: Free control handler in cleanup paths
Laurent Pinchart [Thu, 2 May 2013 11:34:30 +0000 (08:34 -0300)]
upstream: [media] mt9v032: Free control handler in cleanup paths

The control handler must be freed in the probe error path and in the
remove handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] mt9p031: Use gpio_is_valid()
Laurent Pinchart [Thu, 2 May 2013 10:57:51 +0000 (07:57 -0300)]
upstream: [media] mt9p031: Use gpio_is_valid()

Replace the manual validity checks for the reset GPIO with the
gpio_is_valid() function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoupstream: [media] mt9p031: Power down the sensor if no supported device has been...
Guennadi Liakhovetski [Thu, 18 Apr 2013 21:35:39 +0000 (18:35 -0300)]
upstream: [media] mt9p031: Power down the sensor if no supported device has been detected

The mt9p031 driver first accesses the I2C device in its .registered()
method. While doing that it first powers the device up, but if probing
fails, it doesn't power the chip back down. This patch fixes that bug.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoASoC: Samsung: standardize machine driver names
Inha Song [Fri, 2 May 2014 02:11:37 +0000 (11:11 +0900)]
ASoC: Samsung: standardize machine driver names

The machine driver name of the existing "exynos4-wm1811" is Inappropriate.
Codec is dependent on board, not SoC.

So, Change machine dirver name from "exynos4-wm1811" to "trats2-wm1811"
to be used in trats2.

Change-Id: I06149430562514485a10eb580ab722857662aa22
Signed-off-by: Inha Song <ideal.song@samsung.com>
9 years agodts: arm: exynos4412-trats2: define address/size-cells
Chanho Park [Wed, 21 May 2014 05:40:53 +0000 (14:40 +0900)]
dts: arm: exynos4412-trats2: define address/size-cells

This patch fixes compile warning when building a exynos4412-trats2.dtb.
The two field should be defined in the parent node.

Change-Id: I8cfab92992e8ebd3fb010c6bca73575c3d189f7f
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
9 years agodrm/panel/s6e8aa0: add backlight support
Andrzej Hajda [Thu, 29 May 2014 14:30:21 +0000 (16:30 +0200)]
drm/panel/s6e8aa0: add backlight support

The patch adds backlight support to s6e8aa0 panel.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Change-Id: I8cf8717c84da1619ceb8a0d841935255f917030d

9 years agoDVB : frontend: enable no_poweroff to avoid firmware reloaded in xc5000 tuner
Liu Peiwen [Mon, 19 May 2014 03:40:35 +0000 (11:40 +0800)]
DVB : frontend: enable no_poweroff to avoid firmware reloaded in xc5000 tuner

If open and close frontend cyclicly, firmware will be loaded repeatly without
no_poweroff setting, and TV service can not tolorate the waste of time of
loading firmware.

Change-Id: I8a2276424a283a9d52e512e61a055c5375e6c15c
Signed-off-by: Liu Peiwen <peiwen.liu@samsung.com>
9 years agoSound: Odroid: add DT binding document for Odroid
Chen Zhen [Mon, 26 May 2014 05:53:17 +0000 (13:53 +0800)]
Sound: Odroid: add DT binding document for Odroid

This patch adds binding document for the Samsung OdroidX2/U3.

Change-Id: Ifd4cb398e939c14deb717bcb34d0ebb5a4cbb70e
Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
9 years agoau0828: Cancel stream-restart operation if frontend is disconnected
Changbing Xiong [Fri, 9 May 2014 04:54:11 +0000 (01:54 -0300)]
au0828: Cancel stream-restart operation if frontend is disconnected

If the tuner is already disconnected, It is meaningless to go on doing the
stream-restart operation, It is better to cancel this operation.

Change-Id: Ie63854352383cd300eb3626e63143e6a73d519d8
Signed-off-by: Changbing Xiong <cb.xiong@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoASoC: max98090: add DT binding document for MAX98090 CODEC
Stephen Warren [Wed, 4 Dec 2013 22:19:26 +0000 (15:19 -0700)]
ASoC: max98090: add DT binding document for MAX98090 CODEC

This binding mainly serves to document the list of input and output pins
that may be used in a sound card's audio routing table.

Change-Id: I95e020b542edd908627f60f4fac9d11c2ab6d2b7
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
9 years agoASoC: samsung: set clk_id to 0 to avoid misunderstanding
Chen Zhen [Fri, 23 May 2014 09:59:45 +0000 (17:59 +0800)]
ASoC: samsung: set clk_id to 0 to avoid misunderstanding

it's obviously that codec driver has no routing handle for clk_id,
so just supply 0 for it.

Change-Id: I29b14ef8110b580a52502497728c049284b050a1
Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
9 years agoebtables: ebtables support enable in Tizen linux-3.10.
Jacek Pielaszkiewicz [Fri, 16 May 2014 10:35:54 +0000 (12:35 +0200)]
ebtables: ebtables support enable in Tizen linux-3.10.

Change-Id: Ib9650cf5fca7139a68af88edbcfb2f90777d8227
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
9 years agoASoC: samsung: set format constant in the dai_link
Chen Zhen [Fri, 23 May 2014 09:03:31 +0000 (17:03 +0800)]
ASoC: samsung: set format constant in the dai_link

Change-Id: I93731b6d92954be19f752a2b4283a611e7a793de
Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
9 years agosii9234: Power on sii9234 only when MHL cable is connected.
Jonghwa Lee [Fri, 9 May 2014 08:00:16 +0000 (17:00 +0900)]
sii9234: Power on sii9234 only when MHL cable is connected.

Change-Id: I9a1719f3e1f366bb9328fff48b6ada73022286e2
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoRevert "regulator: Handle suspend and resume of regulators"
Jonghwa Lee [Wed, 14 May 2014 01:36:00 +0000 (10:36 +0900)]
Revert "regulator: Handle suspend and resume of regulators"

This reverts commit bdc1383dd59ea144e4acdb97c6077c09f371df78.

I revert the commit because it is not merged to ML.

Change-Id: I8c616af1429a4c53d263c99baa05d35e379635e5
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoPM / devfreq : Make exynos4 busfreq driver to use PPMU not DMC internal one.
Jonghwa Lee [Thu, 15 May 2014 09:42:34 +0000 (18:42 +0900)]
PM / devfreq : Make exynos4 busfreq driver to use PPMU not DMC internal one.

This patch modifies exynos4 busfreq driver to use global PPMU not DMC block's
internal PMU. The PPMU has different event set with DMC's and it'll be more
adaquate to profile bus utilization.

Change-Id: Ia5f6801cf6081edf5c76cad2af86978843bdf91a
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
9 years agoASoC: samsung: use codec as master instead of I2S(slave)
Chen Zhen [Mon, 12 May 2014 06:17:37 +0000 (14:17 +0800)]
ASoC: samsung: use codec as master instead of I2S(slave)

In order to don't change the EPLL, the reasonable way is to make the
codec as master instead of i2s.

Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
Change-Id: Ia457d7625c9a87ac6c854176c0fe03f500923825
Signed-off-by: Chen Zhen <zhen1.chen@samsung.com>
9 years agoclk: samsung: exynos4: Add ppmu clock's identical number
Chanwoo choi [Wed, 14 May 2014 16:34:40 +0000 (01:34 +0900)]
clk: samsung: exynos4: Add ppmu clock's identical number

This patch add ppmu clock's identical number to get clock pointer on other
device driver through DT binding.

Change-Id: Ic55036e9c90409c8385dd365e75b4fbeefc0829c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
9 years agoPM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs
Saravana Kannan [Fri, 28 Feb 2014 03:38:57 +0000 (19:38 -0800)]
PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs

The current devfreq_update_status() has the following bugs:
- If previous frequency doesn't have a valid level, it does an out of bounds
  access into the trans_table and causes memory corruption.
- When the new frequency doesn't have a valid level, the time spent in the
  new frequency is counted towards the next valid frequency switch instead of
  being ignored.
- The time spent on the previous frequency is added to the new frequency's
  stats instead of the previous frequency's stats.

This patch fixes all of this.

Change-Id: I9e3bb6ac6490d8f2e4bca2fd0d082f2fbd4a5b2e
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
9 years agoPM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
Dan Carpenter [Wed, 14 May 2014 11:50:56 +0000 (20:50 +0900)]
PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR

The create_freezable_workqueue() function returns a NULL on error and
not an ERR_PTR.

Change-Id: If805c1068d00d3a2e6897c890475e35c780ef8c7
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
9 years agoPM / devfreq: fix typo "CPU_EXYNOS4.12" twice
Paul Bolle [Wed, 13 Mar 2013 21:10:02 +0000 (21:10 +0000)]
PM / devfreq: fix typo "CPU_EXYNOS4.12" twice

Dependencies on CPU_EXYNOS4212 and CPU_EXYNOS4412 for the "ARM
Exynos4210/4212/4412 Memory Bus DEVFREQ Driver" were added in commit
7b4050381127ae11fcfc74a106d715a5fbbf888a ("PM/Devfreq: Add Exynos4-bus
device DVFS driver for Exynos4210/4212/4412."). The tree (at that time,
v3.3, and currently) makes clear that this should have been dependencies
on SOC_EXYNOS4212 and SOC_EXYNOS4412.

Change-Id: Ica470368f1e609199a5454d0de9d0448de2bccd2
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
9 years agoPM / devfreq: fix missing unlock on error in exynos4_busfreq_pm_notifier_event()
Wei Yongjun [Fri, 22 Feb 2013 04:33:50 +0000 (04:33 +0000)]
PM / devfreq: fix missing unlock on error in exynos4_busfreq_pm_notifier_event()

Add the missing unlock before return from function
exynos4_busfreq_pm_notifier_event() in the error
handling case.

This issue introduced by commit 8fa938
(PM / devfreq: exynos4_bus: honor RCU lock usage)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
[Resolved path conflicts by MyungJoo Ham]
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Change-Id: I6fed109f21b18b458d7f0311961a85f5b2ba4756

9 years agoPM / devfreq: add comments and Documentation
MyungJoo Ham [Tue, 5 Feb 2013 09:40:17 +0000 (09:40 +0000)]
PM / devfreq: add comments and Documentation

- Added missing ABI documents
- Added comments to clarify the objectives of functions

Change-Id: Ic2206ad6671156eedb28d450046e8e2ea876b18c
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
9 years agoPM / devfreq: account suspend/resume for stats
Rajagopal Venkat [Tue, 8 Jan 2013 05:50:39 +0000 (05:50 +0000)]
PM / devfreq: account suspend/resume for stats

devfreq stats is not taking device suspend and resume into
account. Fix it.

Change-Id: I224e046c15b40a384e6c548c6bd569e90a877945
Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
9 years agoPM / devfreq: Add Exynos5-bus devfreq driver for Exynos5250
Abhilash Kesavan [Mon, 4 Feb 2013 12:14:48 +0000 (12:14 +0000)]
PM / devfreq: Add Exynos5-bus devfreq driver for Exynos5250

Exynos5-bus device devfreq driver monitors PPMU counters and
adjusts operating frequencies and voltages with OPP. ASV should
be used to provide appropriate voltages as per the speed group
of the SoC rather than using a constant 1.025V.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
[myungjoo.ham@samsung.com: minor style update]
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Jonghwan Choi <jhbird.choi@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Change-Id: I9cfb1f88fc61623425f34013d7c0f3a9bb474c55