firefly-linux-kernel-4.4.55.git
9 years ago[media] dmxdev: add support for demux/dvr nodes at media controller
Mauro Carvalho Chehab [Sat, 3 Jan 2015 01:28:53 +0000 (22:28 -0300)]
[media] dmxdev: add support for demux/dvr nodes at media controller

Make the dvb core demux support aware of the media controller and
register the corresponding devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb_frontend: add media controller support for DVB frontend
Mauro Carvalho Chehab [Fri, 2 Jan 2015 14:00:17 +0000 (11:00 -0300)]
[media] dvb_frontend: add media controller support for DVB frontend

Now that the dvb core is capable of registering devices via the
media controller, add support for the DVB frontend devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx231xx: add media controller support
Mauro Carvalho Chehab [Thu, 1 Jan 2015 14:37:17 +0000 (11:37 -0300)]
[media] cx231xx: add media controller support

Let's add media controller support for this driver and register it
for both V4L and DVB.

The media controller on this driver is not mandatory, as it can fully
work without it. So, if the media controller register fails, just print
an error message, but proceed with device registering.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvbdev: add support for media controller
Mauro Carvalho Chehab [Fri, 2 Jan 2015 15:19:51 +0000 (12:19 -0300)]
[media] dvbdev: add support for media controller

Provide a way to register media controller device nodes
at the DVB core.

Please notice that the dvbdev callers also require changes
for the devices to be registered via the media controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Add tuner subdev at documentation
Mauro Carvalho Chehab [Mon, 26 Jan 2015 13:08:50 +0000 (10:08 -0300)]
[media] DocBook: Add tuner subdev at documentation

Now that we've added MEDIA_ENT_T_V4L2_SUBDEV_TUNER at the API,
document it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: add a subdev type for tuner
Mauro Carvalho Chehab [Mon, 26 Jan 2015 11:53:18 +0000 (08:53 -0300)]
[media] media: add a subdev type for tuner

Add MEDIA_ENT_T_V4L2_SUBDEV_TUNER to represent the V4L2
(and dvb) tuner subdevices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Document the DVB API devnodes at the media controller
Mauro Carvalho Chehab [Fri, 13 Feb 2015 22:10:05 +0000 (20:10 -0200)]
[media] DocBook: Document the DVB API devnodes at the media controller

The DVB API is actually several different APIs bundled together, each
using its own device node.

Fix the media controller DVB API to actually reflect what's there at the
DVB subsystem.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: add new types for DVB devnodes
Mauro Carvalho Chehab [Sat, 3 Jan 2015 14:09:39 +0000 (11:09 -0300)]
[media] media: add new types for DVB devnodes

Most of the DVB subdevs have already their own devnode.

Add support for them at the media controller API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Docbook: Fix documentation for media controller devnodes
Mauro Carvalho Chehab [Fri, 13 Feb 2015 21:59:40 +0000 (19:59 -0200)]
[media] Docbook: Fix documentation for media controller devnodes

The media-ctl userspace application assumes that all device nodes
are uniquelly defined via major,minor, just like v4l and fb.

That's ok for those types of devices, but, as we're adding support
for DVB at the API, what's written there at the DocBook is wrong.

So, fix it.

While here, fix the size of the reserved space inside the union,
with is 184, and not 180.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: Fix DVB devnode representation at media controller
Mauro Carvalho Chehab [Fri, 2 Jan 2015 15:18:23 +0000 (12:18 -0300)]
[media] media: Fix DVB devnode representation at media controller

The previous provision for DVB media controller support were to
define an ID (likely meaning the adapter number) for the DVB
devnodes.

This is just plain wrong. Just like V4L, DVB devices (and any other
device node)) are uniquely identified via a (major, minor) tuple.

This is enough to uniquely identify a devnode, no matter what
API it implements.

So, before we go too far, let's mark the old v4l, fb, dvb and alsa
"devnode" info as deprecated, and just call it as "dev".

We can latter add fields specific to each API if needed.

As we don't want to break compilation on already existing apps,
let's just keep the old definitions as-is, adding a note that
those are deprecated at media-entity.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ir-hix5hd2: remove writel/readl_relaxed define
Zhangfei Gao [Sat, 31 Jan 2015 09:29:46 +0000 (06:29 -0300)]
[media] ir-hix5hd2: remove writel/readl_relaxed define

Commit 9439eb3ab9d1ec ("asm-generic: io: implement relaxed
accessor macros as conditional wrappers") has added
{read,write}{b,w,l,q}_relaxed to include/asm-generic/io.h

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] gpsca: remove the risk of a division by zero
Luis de Bethencourt [Mon, 9 Feb 2015 10:16:25 +0000 (07:16 -0300)]
[media] gpsca: remove the risk of a division by zero

As reported by Peter Kovar, there's a potential risk of a division by
zero on calls to jpeg_set_qual() when quality is zero.

As quality can't be 0 or lower than that, add an extra clause to cover
this special case.

Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb_net: Convert local hex dump to print_hex_dump_debug
Joe Perches [Wed, 28 Jan 2015 18:05:52 +0000 (15:05 -0300)]
[media] dvb_net: Convert local hex dump to print_hex_dump_debug

Use the generic facility instead of a home-grown one.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb_net: Use standard debugging facilities
Joe Perches [Wed, 28 Jan 2015 18:05:51 +0000 (15:05 -0300)]
[media] dvb_net: Use standard debugging facilities

Convert dprintk to netdev_dbg where appropriate.
Remove dvb_net_debug module_param.
Remove __func__ from output as that can be added by dynamic_debug.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb_net: Use vsprintf %pM extension to print Ethernet addresses
Joe Perches [Wed, 28 Jan 2015 18:05:50 +0000 (15:05 -0300)]
[media] dvb_net: Use vsprintf %pM extension to print Ethernet addresses

No need for more macros, so remove them and use the kernel extension.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] staging: lirc_serial: adjust boolean assignments
Heba Aamer [Mon, 26 Jan 2015 13:21:09 +0000 (10:21 -0300)]
[media] staging: lirc_serial: adjust boolean assignments

Adjusts boolean assignments from 0/1 to false/true.

And accordingly, it also adjusts the if conditions.

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] stb0899: use sign_extend32() for sign extension
Martin Kepplinger [Sun, 25 Jan 2015 14:51:35 +0000 (11:51 -0300)]
[media] stb0899: use sign_extend32() for sign extension

Instead of implement its own logic, use the already-defined one.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: add support for 1.7MHz bandwidth
Olli Salonen [Fri, 16 Jan 2015 12:35:20 +0000 (09:35 -0300)]
[media] si2168: add support for 1.7MHz bandwidth

This patch is based on Antti's silabs branch.

Add support for 1.7 MHz bandwidth. Supported in all versions of Si2168 according to short data sheets.

[mchehab@osg.samsung.com: Fix CodingStyle]
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] si2168: return error if set_frontend is called with invalid parameters
Olli Salonen [Fri, 16 Jan 2015 12:35:19 +0000 (09:35 -0300)]
[media] si2168: return error if set_frontend is called with invalid parameters

This patch should is based on Antti's silabs branch.

According to dvb-frontend.h set_frontend may be called with bandwidth_hz set to 0 if automatic bandwidth is required. Si2168 does not support automatic bandwidth and does not declare FE_CAN_BANDWIDTH_AUTO in caps.

This patch will change the behaviour in a way that EINVAL is returned if bandwidth_hz is 0.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lirc_dev: avoid potential null-dereference
Andy Shevchenko [Wed, 7 Jan 2015 01:53:37 +0000 (22:53 -0300)]
[media] lirc_dev: avoid potential null-dereference

We have to check pointer for NULL and then dereference it.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] mn88472: simplify bandwidth registers setting code
Benjamin Larsson [Sat, 3 Jan 2015 00:50:44 +0000 (21:50 -0300)]
[media] mn88472: simplify bandwidth registers setting code

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb: tc90522: re-add symbol-rate report
Akihiro Tsukada [Fri, 26 Dec 2014 10:42:52 +0000 (07:42 -0300)]
[media] dvb: tc90522: re-add symbol-rate report

symbol-rate report was wrongly removed off by the commit:906aaf5a .

Signed-off-by: Akihiro Tsukada <tskd08@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lmedm04: add read snr, signal strength and ber call backs
Malcolm Priestley [Fri, 2 Jan 2015 13:56:31 +0000 (10:56 -0300)]
[media] lmedm04: add read snr, signal strength and ber call backs

This allows calling the original functions providing the streaming is off.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lmedm04: Create frontend call back for read status
Malcolm Priestley [Fri, 2 Jan 2015 13:56:30 +0000 (10:56 -0300)]
[media] lmedm04: Create frontend call back for read status

Create dm04_read_status to check lock through either interrupt values
or directly by the call back.

When the device is not streaming the frontends original call back is
used. When streaming has started it turns off I2C messaging by
setting st->i2c_talk_onoff to zero. I2C can only be turn on again
by one of the other allowed frontend calls.

All old code is removed from lme2510_msg and this function only needs
to set st->i2c_talk_onoff to 1.

The lock status is saved and when the frondend is locked is maintained
by lme2510_int_response who will now just kill the lock.

The call back for rs2000 tuner is nologer required.

All frontend types have been tested.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lmedm04: create frontend callbacks for signal/snr/ber/ucblocks
Malcolm Priestley [Fri, 2 Jan 2015 13:56:29 +0000 (10:56 -0300)]
[media] lmedm04: create frontend callbacks for signal/snr/ber/ucblocks

Create call backs dm04_read_signal_strength, dm04_read_snr and
move dm04_read_ber and dm04_read_ucblocks for all frontends

Removing the I2C filtering from lme2510_msg and the old rs2000 callbacks.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb
Malcolm Priestley [Fri, 2 Jan 2015 13:56:28 +0000 (10:56 -0300)]
[media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb

A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK
but the endpoint otheriwse functions as interrupt.

Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lmedm04: Increase Interupt due time to 200 msec
Malcolm Priestley [Fri, 2 Jan 2015 13:56:27 +0000 (10:56 -0300)]
[media] lmedm04: Increase Interupt due time to 200 msec

Ocassionally the device fails to report back an interrupt urb status which
results in false no lock trigger on the RS2000 demodulator.

Increase time from 60 msecs to 200 msecs.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx88-dvb: whitespace cleanup
Mauro Carvalho Chehab [Tue, 23 Dec 2014 16:47:47 +0000 (13:47 -0300)]
[media] cx88-dvb: whitespace cleanup

X-Patchwork-Delegate: m.chehab@samsung.com
Fix the following smatch warning:
drivers/media/pci/cx88//cx88-dvb.c:1508 dvb_register() warn: if statement not indented

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: properly initialize pdata
Mauro Carvalho Chehab [Tue, 3 Feb 2015 18:36:28 +0000 (16:36 -0200)]
[media] rtl28xxu: properly initialize pdata

As complained by smatch:
drivers/media/usb/dvb-usb-v2/rtl28xxu.c:1159 rtl2832u_tuner_attach() info: 'pdata' is not actually initialized (unreached code).

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: declare functions as static
Mauro Carvalho Chehab [Tue, 3 Feb 2015 18:34:29 +0000 (16:34 -0200)]
[media] rtl2832: declare functions as static

drivers/media/dvb-frontends/rtl2832.c:157:5: warning: no previous prototype for ‘rtl2832_bulk_write’ [-Wmissing-prototypes]
 int rtl2832_bulk_write(struct i2c_client *client, unsigned int reg,
     ^
drivers/media/dvb-frontends/rtl2832.c:169:5: warning: no previous prototype for ‘rtl2832_update_bits’ [-Wmissing-prototypes]
 int rtl2832_update_bits(struct i2c_client *client, unsigned int reg,
     ^
drivers/media/dvb-frontends/rtl2832.c:181:5: warning: no previous prototype for ‘rtl2832_bulk_read’ [-Wmissing-prototypes]
 int rtl2832_bulk_read(struct i2c_client *client, unsigned int reg, void *val,

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: declare functions as static
Mauro Carvalho Chehab [Tue, 3 Feb 2015 18:32:34 +0000 (16:32 -0200)]
[media] rtl2830: declare functions as static

drivers/media/dvb-frontends/rtl2830.c:21:5: warning: no previous prototype for ‘rtl2830_bulk_write’ [-Wmissing-prototypes]
 int rtl2830_bulk_write(struct i2c_client *client, unsigned int reg,
     ^
drivers/media/dvb-frontends/rtl2830.c:33:5: warning: no previous prototype for ‘rtl2830_update_bits’ [-Wmissing-prototypes]
 int rtl2830_update_bits(struct i2c_client *client, unsigned int reg,
     ^
drivers/media/dvb-frontends/rtl2830.c:45:5: warning: no previous prototype for ‘rtl2830_bulk_read’ [-Wmissing-prototypes]
 int rtl2830_bulk_read(struct i2c_client *client, unsigned int reg, void *val,
     ^

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832_sdr: add kernel-doc comments for platform_data
Antti Palosaari [Mon, 2 Feb 2015 17:35:48 +0000 (14:35 -0300)]
[media] rtl2832_sdr: add kernel-doc comments for platform_data

Add kernel-doc comments for platform_data configuration structure.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: add kernel-doc comments for platform_data
Antti Palosaari [Mon, 2 Feb 2015 17:20:01 +0000 (14:20 -0300)]
[media] rtl2832: add kernel-doc comments for platform_data

Add kernel-doc comments for platform_data configuration structure.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: add kernel-doc comments for platform_data
Antti Palosaari [Mon, 2 Feb 2015 16:53:38 +0000 (13:53 -0300)]
[media] rtl2830: add kernel-doc comments for platform_data

Add kernel-doc comments for platform_data configuration structure.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: implement own lock for regmap
Antti Palosaari [Thu, 18 Dec 2014 10:22:46 +0000 (07:22 -0300)]
[media] rtl2832: implement own lock for regmap

Introduce own lock to silence lockdep warning. lockdep validator
makes wrong decision when two similar (&map->mutex) locks were taken
recursively, even those are different mutexes in a two different
drivers. After that patch, functionality remains same, but mutex names
are different. That is a temporary hack, proper solution is make
regmap aware of locked nested locking rules.

=============================================
[ INFO: possible recursive locking detected ]
3.18.0-rc4+ #4 Tainted: G           O
---------------------------------------------
kdvb-ad-0-fe-0/2814 is trying to acquire lock:
 (&map->mutex){+.+.+.}, at: [<ffffffff814ec90f>] regmap_lock_mutex+0x2f/0x40

but task is already holding lock:
 (&map->mutex){+.+.+.}, at: [<ffffffff814ec90f>] regmap_lock_mutex+0x2f/0x40

other info that might help us debug this:
 Possible unsafe locking scenario:
       CPU0
       ----
  lock(&map->mutex);
  lock(&map->mutex);

 *** DEADLOCK ***
 May be due to missing lock nesting notation
1 lock held by kdvb-ad-0-fe-0/2814:
 #0:  (&map->mutex){+.+.+.}, at: [<ffffffff814ec90f>] regmap_lock_mutex+0x2f/0x40

stack backtrace:
CPU: 3 PID: 2814 Comm: kdvb-ad-0-fe-0 Tainted: G           O 3.18.0-rc4+ #4
Hardware name: System manufacturer System Product Name/M5A78L-M/USB3, BIOS 2001    09/11/2014
 0000000000000000 00000000410c8772 ffff880293af3868 ffffffff817a6f82
 0000000000000000 ffff8800b3462be0 ffff880293af3968 ffffffff810e7f94
 ffff880293af3888 00000000410c8772 ffffffff82dfee60 ffffffff81ab8f89
Call Trace:
 [<ffffffff817a6f82>] dump_stack+0x4e/0x68
 [<ffffffff810e7f94>] __lock_acquire+0x1ea4/0x1f50
 [<ffffffff810e2a7d>] ? trace_hardirqs_off+0xd/0x10
 [<ffffffff817b01f3>] ? _raw_spin_lock_irqsave+0x83/0xa0
 [<ffffffff810e13e6>] ? up+0x16/0x50
 [<ffffffff810e2a7d>] ? trace_hardirqs_off+0xd/0x10
 [<ffffffff817af8bf>] ? _raw_spin_unlock_irqrestore+0x5f/0x70
 [<ffffffff810e9069>] lock_acquire+0xc9/0x170
 [<ffffffff814ec90f>] ? regmap_lock_mutex+0x2f/0x40
 [<ffffffff817ab50e>] mutex_lock_nested+0x7e/0x430
 [<ffffffff814ec90f>] ? regmap_lock_mutex+0x2f/0x40
 [<ffffffff814ec90f>] ? regmap_lock_mutex+0x2f/0x40
 [<ffffffff817a530b>] ? printk+0x70/0x86
 [<ffffffff8110d9e8>] ? mod_timer+0x168/0x240
 [<ffffffff814ec90f>] regmap_lock_mutex+0x2f/0x40
 [<ffffffff814f08d9>] regmap_update_bits+0x29/0x60
 [<ffffffffa03e9778>] rtl2832_select+0x38/0x70 [rtl2832]
 [<ffffffffa039b03d>] i2c_mux_master_xfer+0x3d/0x90 [i2c_mux]
 [<ffffffff815da493>] __i2c_transfer+0x73/0x2e0
 [<ffffffff815dbaba>] i2c_transfer+0x5a/0xc0
 [<ffffffff815dbb6e>] i2c_master_send+0x4e/0x70
 [<ffffffffa03ff25a>] regmap_i2c_write+0x1a/0x50 [regmap_i2c]
 [<ffffffff817ab713>] ? mutex_lock_nested+0x283/0x430
 [<ffffffff814f06b2>] _regmap_raw_write+0x862/0x880
 [<ffffffff814ec90f>] ? regmap_lock_mutex+0x2f/0x40
 [<ffffffff814f0744>] _regmap_bus_raw_write+0x74/0xa0
 [<ffffffff814ef3d2>] _regmap_write+0x92/0x140
 [<ffffffff814f0b7b>] regmap_write+0x4b/0x70
 [<ffffffffa032b090>] ? dvb_frontend_release+0x110/0x110 [dvb_core]
 [<ffffffffa05141d4>] e4000_init+0x34/0x210 [e4000]
 [<ffffffffa032a029>] dvb_frontend_init+0x59/0xc0 [dvb_core]
 [<ffffffff810bde30>] ? finish_task_switch+0x80/0x180
 [<ffffffff810bddf2>] ? finish_task_switch+0x42/0x180
 [<ffffffffa032b116>] dvb_frontend_thread+0x86/0x7b0 [dvb_core]
 [<ffffffff817a9203>] ? __schedule+0x343/0x930
 [<ffffffffa032b090>] ? dvb_frontend_release+0x110/0x110 [dvb_core]
 [<ffffffff810b826b>] kthread+0x10b/0x130
 [<ffffffff81020099>] ? sched_clock+0x9/0x10
 [<ffffffff810b8160>] ? kthread_create_on_node+0x250/0x250
 [<ffffffff817b063c>] ret_from_fork+0x7c/0xb0
 [<ffffffff810b8160>] ? kthread_create_on_node+0x250/0x250

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: correct reg access routine name prefixes
Antti Palosaari [Tue, 23 Dec 2014 17:32:35 +0000 (14:32 -0300)]
[media] rtl28xxu: correct reg access routine name prefixes

Use rtl28xxu_ prefix for all register access routine names.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: merge rtl2831u and rtl2832u properties
Antti Palosaari [Tue, 23 Dec 2014 17:21:10 +0000 (14:21 -0300)]
[media] rtl28xxu: merge rtl2831u and rtl2832u properties

As all the callbacks are already same we could merge device
properties struct too and save space.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: merge chip type specific all callbacks
Antti Palosaari [Tue, 23 Dec 2014 17:09:13 +0000 (14:09 -0300)]
[media] rtl28xxu: merge chip type specific all callbacks

Merge all chip type specific prefixed (rtl2831u_ and rtl2832u_)
callback to top level callback prefixed as rtl28xxu_.

rtl2831u_foo() => rtl28xxu_foo()
rtl2832u_foo() => rtl28xxu_foo()

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: add heuristic to detect chip type
Antti Palosaari [Tue, 23 Dec 2014 16:14:36 +0000 (13:14 -0300)]
[media] rtl28xxu: add heuristic to detect chip type

Detect automatically whether chip is old RTL2831U or newer
RTL2832U/RTL2832P. Detection is based I2C command that is found only
from newer RTL2832U models.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: move usb buffers to state
Antti Palosaari [Sun, 21 Dec 2014 21:33:14 +0000 (18:33 -0300)]
[media] rtl28xxu: move usb buffers to state

Buffer needed for USB control message is small so move it to state
and get rid of alloc/free used for each control message.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: fix logging
Antti Palosaari [Sun, 21 Dec 2014 14:25:57 +0000 (11:25 -0300)]
[media] rtl28xxu: fix logging

Pass correct device pointer to dev_* logging in order to print
module name and bus id correctly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: rename state variable 'priv' to 'dev'
Antti Palosaari [Thu, 18 Dec 2014 11:05:23 +0000 (08:05 -0300)]
[media] rtl28xxu: rename state variable 'priv' to 'dev'

I prefer dev over priv and I want keep all my drivers in line with
that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: remove internal mux I2C adapter
Antti Palosaari [Thu, 18 Dec 2014 09:30:32 +0000 (06:30 -0300)]
[media] rtl2832: remove internal mux I2C adapter

There was 2 muxed I2C adapters, one for demod tuner bus and one for
internal use. Idea of internal I2C adapter was to force I2C repeater
close when demod access its registers. Driver has also delayed work
queue based method to close I2C repeater.

After regmap conversion internal I2C adapter based repeater close
left unused - only work queue method was in use. We could not use
internal mux adapter method with regmap as it makes recursive regmap
call, which causes deadlock as regmap has own locking. Due to that
remove whole method totally.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832_sdr: refcount to rtl28xxu
Antti Palosaari [Wed, 17 Dec 2014 11:25:03 +0000 (08:25 -0300)]
[media] rtl2832_sdr: refcount to rtl28xxu

We are consumer of DVB frontend provided by rtl28xxu module. Due to
that we must use refcount to ensure none could remove rtl28xxu when
we are alive (or when we are streaming, if more fine-grained
refcounting is wanted).

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: do not refcount rtl2832_sdr module
Antti Palosaari [Wed, 17 Dec 2014 11:16:10 +0000 (08:16 -0300)]
[media] rtl28xxu: do not refcount rtl2832_sdr module

This driver, rtl28xxu, offers frontend service for rtl2832_sdr
module, thus we are producer and rtl2832_sdr module is consumer.
Due to that, reference counting should be done in way rtl2832_sdr
takes refrence to rtl28xxu. Remove wrong refcount.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: simplify FE callback handling
Antti Palosaari [Wed, 17 Dec 2014 06:09:32 +0000 (03:09 -0300)]
[media] rtl28xxu: simplify FE callback handling

Logic is so simple that there is no idea to separate tuner selection to
own function, instead do it in a callback and get rid of one function.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: fix DVB FE callback
Antti Palosaari [Wed, 17 Dec 2014 05:55:41 +0000 (02:55 -0300)]
[media] rtl28xxu: fix DVB FE callback

DVB FE callback functionality went broken after I moved tuners to
demod muxed I2C adapter. That happens because driver state was
carried by I2C adapter and when mux is used there is one adapter
more in a chain.
USB adapter <-> I2C adapter <-> muxed I2C adapter

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: implement sleep
Antti Palosaari [Tue, 16 Dec 2014 17:51:33 +0000 (14:51 -0300)]
[media] rtl2832: implement sleep

Put demod to soft reset in order to save power when sleep. That drops
power usage ~30mA @5V on USB dongle I tested. In real life it does
not matter much as USB IF powers off demod too, but now it is done
twice - demod and USB IF.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: claim copyright and module author
Antti Palosaari [Tue, 16 Dec 2014 16:54:23 +0000 (13:54 -0300)]
[media] rtl2832: claim copyright and module author

I have implemented tons of things for that driver, more than anyone
else, so lets claim copyright and module authorship.

Cc: Thomas Mair <thomas.mair86@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: cleanups and minor changes
Antti Palosaari [Tue, 16 Dec 2014 16:37:18 +0000 (13:37 -0300)]
[media] rtl2832: cleanups and minor changes

Remove all the stuff that is not needed anymore. Rename variable.
Remove extra new lines.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832_sdr: cleanups
Antti Palosaari [Tue, 16 Dec 2014 15:49:14 +0000 (12:49 -0300)]
[media] rtl2832_sdr: cleanups

Small cleanups. Remove unneeded variables. Some checkpatch issues.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832_sdr: fix logging
Antti Palosaari [Tue, 16 Dec 2014 15:18:01 +0000 (12:18 -0300)]
[media] rtl2832_sdr: fix logging

Pass correct device, platform device, for logging system in order
to format printouts correctly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: use master I2C adapter for slave demods
Antti Palosaari [Tue, 16 Dec 2014 14:05:08 +0000 (11:05 -0300)]
[media] rtl28xxu: use master I2C adapter for slave demods

Both mn88472 and mn88473 slave demods are connected to master I2C
bus, not the bus behind master demod I2C gate like tuners. Use
correct bus.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: switch SDR module to platform driver
Antti Palosaari [Tue, 16 Dec 2014 13:50:54 +0000 (10:50 -0300)]
[media] rtl28xxu: switch SDR module to platform driver

RTL2832 SDR module implements kernel platform driver. Change old
binding to that one.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832_sdr: convert to platform driver
Antti Palosaari [Tue, 16 Dec 2014 13:09:20 +0000 (10:09 -0300)]
[media] rtl2832_sdr: convert to platform driver

That SDR driver module was abusing DVB frontend SEC (satellite
equipment controller) device and due to that it was also using
legacy DVB binding. Platform bus is pseudo-bus provided by kernel
driver model and it fits cases like that, where any other busses
are not suitable.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832_sdr: rename state variable from 's' to 'dev'
Antti Palosaari [Mon, 15 Dec 2014 17:30:02 +0000 (14:30 -0300)]
[media] rtl2832_sdr: rename state variable from 's' to 'dev'

'dev' sounds better than 's' for such variable.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: provide register IO callbacks
Antti Palosaari [Mon, 15 Dec 2014 16:34:13 +0000 (13:34 -0300)]
[media] rtl2832: provide register IO callbacks

Provide register read and write callbacks for SDR module.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: merge reg page as a part of reg address
Antti Palosaari [Mon, 15 Dec 2014 04:17:25 +0000 (01:17 -0300)]
[media] rtl2832: merge reg page as a part of reg address

Chips uses 8-bit register addresses with 5 pages. Extend register
address by using register page as a first byte of address, defining
virtual register addresses. That is common method of handling
register pages and regmap also uses it. Remove page + address
conversion glue which was there for regmap.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: remove unneeded software reset from init()
Antti Palosaari [Sun, 14 Dec 2014 19:39:37 +0000 (16:39 -0300)]
[media] rtl2832: remove unneeded software reset from init()

There is no need to do software reset on init() as it is done a bit
later on end of set_frontend(). Software reset usually means
restarting (resetting to starting point) chip internal state machine
(FSM). Naturally it is done after all parameters are programmed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: use regmap reg cache
Antti Palosaari [Sun, 14 Dec 2014 19:23:28 +0000 (16:23 -0300)]
[media] rtl2832: use regmap reg cache

Enable regmap register cache in order to reduce IO.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: add support for RTL2832U/RTL2832 PID filter
Antti Palosaari [Sun, 14 Dec 2014 17:10:47 +0000 (14:10 -0300)]
[media] rtl28xxu: add support for RTL2832U/RTL2832 PID filter

RTL2832 demod integrated into RTL2832U has PID filter. PID filtering
is provided by rtl2832 demod driver. Add support for it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: implement PID filter
Antti Palosaari [Sun, 14 Dec 2014 17:07:35 +0000 (14:07 -0300)]
[media] rtl2832: implement PID filter

Implement PID filter. This demod has PID filter size of 32 PIDs.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: define more demod lock statuses
Antti Palosaari [Sun, 14 Dec 2014 15:15:55 +0000 (12:15 -0300)]
[media] rtl2832: define more demod lock statuses

Demod lock flags are derived from demod state machine states. States
are running from 1 to 11, where highest state 11 means demod is
fully locked and streaming. Naturally smaller state numbers means
there is some partial locks.

Define now state 10 as missing synch and lock.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: drop FE i2c gate control support
Antti Palosaari [Sun, 14 Dec 2014 14:56:08 +0000 (11:56 -0300)]
[media] rtl2832: drop FE i2c gate control support

We don't need it anymore as all users are using muxed I2C adapter.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: use demod mux I2C adapter for every tuner
Antti Palosaari [Sun, 14 Dec 2014 14:45:55 +0000 (11:45 -0300)]
[media] rtl28xxu: use demod mux I2C adapter for every tuner

Tuners are connected to demod I2C adapter. Use that muxed adapter
for each tuner. That allows us to get rid of hackish FE gate control
solution.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: implement DVBv5 signal strength statistics
Antti Palosaari [Sun, 14 Dec 2014 14:00:50 +0000 (11:00 -0300)]
[media] rtl2832: implement DVBv5 signal strength statistics

Estimate signal strength from IF digital AGC.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: wrap DVBv5 BER to DVBv3
Antti Palosaari [Sun, 14 Dec 2014 13:10:22 +0000 (10:10 -0300)]
[media] rtl2832: wrap DVBv5 BER to DVBv3

Change legacy DVBv3 read BER to return values calculated by DVBv5
statistics.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: wrap DVBv5 CNR to DVBv3 SNR
Antti Palosaari [Sun, 14 Dec 2014 13:05:49 +0000 (10:05 -0300)]
[media] rtl2832: wrap DVBv5 CNR to DVBv3 SNR

Change legacy DVBv3 read SNR to return values calculated by DVBv5
statistics.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: implement DVBv5 BER statistic
Antti Palosaari [Sun, 14 Dec 2014 12:59:20 +0000 (09:59 -0300)]
[media] rtl2832: implement DVBv5 BER statistic

DVBv5 BER.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: implement DVBv5 CNR statistic
Antti Palosaari [Sun, 14 Dec 2014 09:55:43 +0000 (06:55 -0300)]
[media] rtl2832: implement DVBv5 CNR statistic

DVBv5 CNR.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: convert to regmap API
Antti Palosaari [Sun, 14 Dec 2014 07:45:57 +0000 (04:45 -0300)]
[media] rtl2832: convert to regmap API

Use regmap to cover register access routines.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: use platform data config for rtl2832 demod
Antti Palosaari [Sat, 13 Dec 2014 08:44:05 +0000 (05:44 -0300)]
[media] rtl28xxu: use platform data config for rtl2832 demod

Use platform data configuration for rtl2832 demod driver. Old
configuration are still left as it is used for rtl2832_sdr driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: move all configuration to platform data struct
Antti Palosaari [Sat, 13 Dec 2014 08:26:27 +0000 (05:26 -0300)]
[media] rtl2832: move all configuration to platform data struct

Move all needed configuration values to platform data structure
and remove old configuration code where possible.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: enhance / fix logging
Antti Palosaari [Sat, 13 Dec 2014 05:28:33 +0000 (02:28 -0300)]
[media] rtl2832: enhance / fix logging

Pass correct device pointer to dev_* logging functions in order
print logs correctly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: rename driver state variable from 'priv' to 'dev'
Antti Palosaari [Sat, 13 Dec 2014 03:37:43 +0000 (00:37 -0300)]
[media] rtl2832: rename driver state variable from 'priv' to 'dev'

Rename it device state variable to dev. Both priv and dev are very
common terms for such variable in kernel, but I like use dev in
order to keep drivers consistent.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: remove exported resources
Antti Palosaari [Sat, 13 Dec 2014 03:21:04 +0000 (00:21 -0300)]
[media] rtl2832: remove exported resources

Exported resources are not needed anymore as all users are using
callbacks carried via platform data. Due to that we will remove
those.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: use rtl2832 demod callbacks accessing its resources
Antti Palosaari [Sat, 13 Dec 2014 03:09:57 +0000 (00:09 -0300)]
[media] rtl28xxu: use rtl2832 demod callbacks accessing its resources

Switch demod resource use from exported symbols to callbacks its
provides.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2832: add platform data callbacks for exported resources
Antti Palosaari [Sat, 13 Dec 2014 02:16:19 +0000 (23:16 -0300)]
[media] rtl2832: add platform data callbacks for exported resources

Add callback for all of those functions which are currently
exported using EXPORT_SYMBOL. That allows us convert every user to
callbacks and eventually all exported symbols could be removed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: convert to regmap API
Antti Palosaari [Fri, 12 Dec 2014 04:03:51 +0000 (01:03 -0300)]
[media] rtl2830: convert to regmap API

Use regmap to cover register access routines.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: implement own I2C locking
Antti Palosaari [Tue, 9 Dec 2014 19:14:41 +0000 (16:14 -0300)]
[media] rtl2830: implement own I2C locking

Own I2C locking is needed due to two special reasons:
1) Chips uses multiple register pages/banks on single I2C slave.
Page is changed via I2C register access.
2) Chip offers muxed/gated I2C adapter for tuner. Gate/mux is
controlled by I2C register access.

Due to these reasons, I2C locking did not fit very well.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: add support for RTL2831U/RTL2830 PID filter
Antti Palosaari [Tue, 9 Dec 2014 19:10:14 +0000 (16:10 -0300)]
[media] rtl28xxu: add support for RTL2831U/RTL2830 PID filter

RTL2830 demod integrated to RTL2831U has PID filter. PID filtering
is provided by rtl2830 demod driver. Add support for it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: implement PID filter
Antti Palosaari [Tue, 9 Dec 2014 19:08:44 +0000 (16:08 -0300)]
[media] rtl2830: implement PID filter

Implement PID filter.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: wrap DVBv5 CNR to DVBv3 SNR
Antti Palosaari [Tue, 9 Dec 2014 13:48:10 +0000 (10:48 -0300)]
[media] rtl2830: wrap DVBv5 CNR to DVBv3 SNR

Change legacy DVBv3 read SNR to return values calculated by DVBv5
statistics.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: wrap DVBv5 BER to DVBv3
Antti Palosaari [Tue, 9 Dec 2014 13:27:32 +0000 (10:27 -0300)]
[media] rtl2830: wrap DVBv5 BER to DVBv3

Change legacy DVBv3 read BER to return values calculated by DVBv5
statistics.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: wrap DVBv5 signal strength to DVBv3
Antti Palosaari [Tue, 9 Dec 2014 13:20:01 +0000 (10:20 -0300)]
[media] rtl2830: wrap DVBv5 signal strength to DVBv3

Change legacy DVBv3 signal strength to return values calculated by
DVBv5 statistics.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: implement DVBv5 BER statistic
Antti Palosaari [Tue, 9 Dec 2014 12:45:16 +0000 (09:45 -0300)]
[media] rtl2830: implement DVBv5 BER statistic

DVBv5 BER.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: implement DVBv5 signal strength statistics
Antti Palosaari [Tue, 9 Dec 2014 11:49:44 +0000 (08:49 -0300)]
[media] rtl2830: implement DVBv5 signal strength statistics

Estimate signal strength from IF AGC.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: implement DVBv5 CNR statistic
Antti Palosaari [Tue, 9 Dec 2014 09:14:36 +0000 (06:14 -0300)]
[media] rtl2830: implement DVBv5 CNR statistic

DVBv5 CNR.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: style related changes
Antti Palosaari [Tue, 9 Dec 2014 05:31:53 +0000 (02:31 -0300)]
[media] rtl2830: style related changes

Trivial changes proposed by checkpatch.pl and some more.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: get rid of internal config data
Antti Palosaari [Tue, 9 Dec 2014 03:24:13 +0000 (00:24 -0300)]
[media] rtl2830: get rid of internal config data

Remove internal config and use configuration values directly from
the platform data.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: fix logging
Antti Palosaari [Tue, 9 Dec 2014 02:32:19 +0000 (23:32 -0300)]
[media] rtl2830: fix logging

Pass correct device for dev_foo() logging in order to print logs
correctly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: carry pointer to I2C client for every function
Antti Palosaari [Tue, 9 Dec 2014 01:47:21 +0000 (22:47 -0300)]
[media] rtl2830: carry pointer to I2C client for every function

As a I2C driver struct i2c_client is top level structure representing
the driver. Use it as parameter to carry all needed information for
each function in order to simplify things.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: rename 'priv' to 'dev'
Antti Palosaari [Tue, 9 Dec 2014 01:31:28 +0000 (22:31 -0300)]
[media] rtl2830: rename 'priv' to 'dev'

Use name 'dev' for device state instance as it is more common and
also one letter shorter.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: get rid of legacy DVB driver binding
Antti Palosaari [Tue, 9 Dec 2014 01:20:55 +0000 (22:20 -0300)]
[media] rtl2830: get rid of legacy DVB driver binding

Remove legacy DVB binding as all users are using I2C binding.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl28xxu: use I2C binding for RTL2830 demod driver
Antti Palosaari [Mon, 8 Dec 2014 01:02:23 +0000 (22:02 -0300)]
[media] rtl28xxu: use I2C binding for RTL2830 demod driver

rtl2830 driver supports now I2C model too. Start using it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rtl2830: convert driver to kernel I2C model
Antti Palosaari [Sun, 7 Dec 2014 07:07:29 +0000 (04:07 -0300)]
[media] rtl2830: convert driver to kernel I2C model

Convert driver to kernel I2C model. Old DVB proprietary model is
still left there also.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb-usb-v2: add pointer to 'struct usb_interface' for driver usage
Antti Palosaari [Wed, 17 Dec 2014 11:10:49 +0000 (08:10 -0300)]
[media] dvb-usb-v2: add pointer to 'struct usb_interface' for driver usage

Top level pointer on USB probe is struct usb_interface *. Add that
pointer to struct dvb_usb_device that drivers could use it, for
dev_* logging and more.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] smipcie: return more proper value in interrupt handler
Nibble Max [Thu, 25 Dec 2014 08:18:31 +0000 (05:18 -0300)]
[media] smipcie: return more proper value in interrupt handler

Although IRQ_HANDLED is "safe" value to return,
it is better to let the kernel know whether the driver handle the interrupt or not.

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] media: platform: fix platform_no_drv_owner.cocci warnings
Fengguang Wu [Fri, 30 Jan 2015 02:26:10 +0000 (23:26 -0300)]
[media] media: platform: fix platform_no_drv_owner.cocci warnings

drivers/media/platform/am437x/am437x-vpfe.c:2767:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] marvell-ccic: MMP_CAMERA no longer builds
Arnd Bergmann [Wed, 28 Jan 2015 22:11:20 +0000 (19:11 -0300)]
[media] marvell-ccic: MMP_CAMERA no longer builds

The mmp ccic driver expects a platform_data structure that does not exist
in the mainline kernel and presumably was changed in a kernel fork, which
leads to build errors now:

media/platform/marvell-ccic/mmp-driver.c: In function 'mmpcam_calc_dphy':
media/platform/marvell-ccic/mmp-driver.c:252:15: error: 'struct mmp_camera_platform_data' has no member named 'dphy3_algo'
  switch (pdata->dphy3_algo) {
               ^
media/platform/marvell-ccic/mmp-driver.c:253:7: error: 'DPHY3_ALGO_PXA910' undeclared (first use in this function)
  case DPHY3_ALGO_PXA910:
       ^
media/platform/marvell-ccic/mmp-driver.c:253:7: note: each undeclared identifier is reported only once for each function it appears in
media/platform/marvell-ccic/mmp-driver.c:257:8: error: 'struct mmp_camera_platform_data' has no member named 'dphy'

This marks the driver as 'BROKEN' but keeps the code around.
Alternatively it could be removed entirely.

Fixes: 05fed81625bf75 ("[media] marvell-ccic: add MIPI support for marvell-ccic driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Cc: Libin Yang <lbyang@marvell.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>