summaryrefslogtreecommitdiffstats
path: root/drivers/media
Commit message (Collapse)AuthorAgeFilesLines
...
* | [media] cx231xx: enable tuner->decoder link at videobuf startMauro Carvalho Chehab2015-02-131-0/+71
| | | | | | | | | | | | | | The tuner->decoder needs to be enabled when we're about to start streaming. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dvb-frontend: enable tuner link when the FE thread startsMauro Carvalho Chehab2015-02-131-0/+94
| | | | | | | | | | | | | | | | If the dvb frontend thread starts, the tuner should be switched to the frontend. Add a code that ensures that this will happen, using the media controller. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dvbdev: enable DVB-specific linksMauro Carvalho Chehab2015-02-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | For now, let's keep the DVB-specific media controller links enabled by default. On most devices, this is fixed anyway, so no big issue. Ok, the demux actually have dynamic links based on the filters, but we don't represent them yet, as the media controller currently lacks the capability of dynamically create/delete entities. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] cx231xx: create DVB graphMauro Carvalho Chehab2015-02-131-0/+1
| | | | | | | | | | | | | | | | cx231xx is simple with regards to DVB: all boards have just one DVB adapter. So, we can use the default DVB helper function to create the DVB media graph. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dvbdev: add a function to create DVB media graphMauro Carvalho Chehab2015-02-132-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to create a DVB graph, linking the several DVB devnodes. Add such function. Please notice that this helper function doesn't take into account devices with multiple DVB adapters and frontends. For devices with multiple adapters, they should either create two different media controller instances or to improve this function to take the adapter ID into account. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dvbdev: represent frontend with two padsMauro Carvalho Chehab2015-02-131-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While on some devices the tuner is bound inside the frontend, other devices use a separate subdevice for it. So, in order to be more generic, better to map it with two pads. That will allows to use the media controller to lock the tuner between the DVB and the V4L2 sub-drivers, on hybrid devices. While here, change the logic to use pad 0 as sink for devices with both sink and source pads. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] cx231xx: create media links for analog modeMauro Carvalho Chehab2015-02-131-0/+38
| | | | | | | | | | | | | | | | | | | | Now that we have entities and pads, let's create media links between them, for analog setup. We may not have all the links for digital yet, as the dvb extention may not be loaded yet. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] cx231xx: initialize video/vbi padsMauro Carvalho Chehab2015-02-132-1/+13
| | | | | | | | | | | | Both video and vbi are sink pads. Initialize them as such. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] cx25840: fill the media controller entityMauro Carvalho Chehab2015-02-132-0/+21
| | | | | | | | | | | | | | Instead of keeping the media controller entity not initialized, fill it and create the pads for cx25840. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] tuner-core: properly initialize media controller subdevMauro Carvalho Chehab2015-02-131-0/+20
| | | | | | | | | | | | | | | | Properly initialize tuner core subdev at the media controller. That requires a new subtype at the media controller API. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dvbdev: add pad for the DVB devnodesMauro Carvalho Chehab2015-02-132-4/+38
| | | | | | | | | | | | | | | | | | | | | | We want to represent the links between the several DVB devnodes, so let's create PADs for them. The DVB net devnode is a different matter, as it is not related to the media stream, but with network. So, at least for now, let's not add any pad for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dvb_net: add support for DVB net node at the media controllerMauro Carvalho Chehab2015-02-131-2/+4
| | | | | | | | | | | | | | Make the dvb core network support aware of the media controller and register the corresponding devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dvb_ca_en50221: add support for CA node at the media controllerMauro Carvalho Chehab2015-02-131-2/+4
| | | | | | | | | | | | | | Make the dvb core CA support aware of the media controller and register the corresponding devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* | [media] dmxdev: add support for demux/dvr nodes at media controllerMauro Carvalho Chehab2015-02-131-3/+8
| | | | | | | | | | | | | | 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>
* | [media] dvb_frontend: add media controller support for DVB frontendMauro Carvalho Chehab2015-02-131-1/+4
| | | | | | | | | | | | | | 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>
* | [media] cx231xx: add media controller supportMauro Carvalho Chehab2015-02-133-6/+62
| | | | | | | | | | | | | | | | | | | | | | 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>
* | [media] dvbdev: add support for media controllerMauro Carvalho Chehab2015-02-133-2/+84
| | | | | | | | | | | | | | | | | | | | 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>
* | [media] media: Fix DVB devnode representation at media controllerMauro Carvalho Chehab2015-02-132-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [media] ir-hix5hd2: remove writel/readl_relaxed defineZhangfei Gao2015-02-111-8/+0
| | | | | | | | | | | | | | | | | | 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>
* | [media] gpsca: remove the risk of a division by zeroLuis de Bethencourt2015-02-101-1/+3
|/ | | | | | | | | | | | 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>
* [media] dvb_net: Convert local hex dump to print_hex_dump_debugJoe Perches2015-02-031-26/+2
| | | | | | | 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>
* [media] dvb_net: Use standard debugging facilitiesJoe Perches2015-02-031-33/+24
| | | | | | | | | 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>
* [media] dvb_net: Use vsprintf %pM extension to print Ethernet addressesJoe Perches2015-02-031-5/+2
| | | | | | | 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>
* [media] stb0899: use sign_extend32() for sign extensionMartin Kepplinger2015-02-031-3/+2
| | | | | | | 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>
* [media] si2168: add support for 1.7MHz bandwidthOlli Salonen2015-02-031-1/+3
| | | | | | | | | | | | 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>
* [media] si2168: return error if set_frontend is called with invalid parametersOlli Salonen2015-02-031-1/+4
| | | | | | | | | | | | 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>
* [media] lirc_dev: avoid potential null-dereferenceAndy Shevchenko2015-02-031-3/+3
| | | | | | | 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>
* [media] dvb: tc90522: re-add symbol-rate reportAkihiro Tsukada2015-02-031-0/+1
| | | | | | | 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>
* [media] lmedm04: add read snr, signal strength and ber call backsMalcolm Priestley2015-02-031-0/+24
| | | | | | | 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>
* [media] lmedm04: Create frontend call back for read statusMalcolm Priestley2015-02-031-145/+60
| | | | | | | | | | | | | | | | | | | | | | | 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>
* [media] lmedm04: create frontend callbacks for signal/snr/ber/ucblocksMalcolm Priestley2015-02-031-60/+33
| | | | | | | | | | 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>
* [media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in ↵Malcolm Priestley2015-02-031-0/+7
| | | | | | | | | | | | | 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>
* [media] lmedm04: Increase Interupt due time to 200 msecMalcolm Priestley2015-02-031-3/+4
| | | | | | | | | | | 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>
* [media] cx88-dvb: whitespace cleanupMauro Carvalho Chehab2015-02-031-2/+2
| | | | | | | | 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>
* [media] rtl28xxu: properly initialize pdataMauro Carvalho Chehab2015-02-031-3/+3
| | | | | | | | 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>
* [media] rtl2832: declare functions as staticMauro Carvalho Chehab2015-02-031-6/+6
| | | | | | | | | | | | | | 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>
* [media] rtl2830: declare functions as staticMauro Carvalho Chehab2015-02-031-6/+6
| | | | | | | | | | | | | | | 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>
* [media] rtl2832_sdr: add kernel-doc comments for platform_dataAntti Palosaari2015-02-031-7/+13
| | | | | | | 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>
* [media] rtl2832: add kernel-doc comments for platform_dataAntti Palosaari2015-02-031-11/+12
| | | | | | | 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>
* [media] rtl2830: add kernel-doc comments for platform_dataAntti Palosaari2015-02-031-20/+13
| | | | | | | 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>
* [media] rtl2832: implement own lock for regmapAntti Palosaari2015-02-032-10/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [media] rtl28xxu: correct reg access routine name prefixesAntti Palosaari2015-02-031-50/+50
| | | | | | | 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>
* [media] rtl28xxu: merge rtl2831u and rtl2832u propertiesAntti Palosaari2015-02-031-62/+31
| | | | | | | | 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>
* [media] rtl28xxu: merge chip type specific all callbacksAntti Palosaari2015-02-031-46/+94
| | | | | | | | | | | 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>
* [media] rtl28xxu: add heuristic to detect chip typeAntti Palosaari2015-02-031-0/+31
| | | | | | | | | 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>
* [media] rtl28xxu: move usb buffers to stateAntti Palosaari2015-02-032-22/+10
| | | | | | | | 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>
* [media] rtl28xxu: fix loggingAntti Palosaari2015-02-031-48/+42
| | | | | | | | 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>
* [media] rtl28xxu: rename state variable 'priv' to 'dev'Antti Palosaari2015-02-032-120/+120
| | | | | | | | 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>
* [media] rtl2832: remove internal mux I2C adapterAntti Palosaari2015-02-032-21/+4
| | | | | | | | | | | | | | | | 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>
* [media] rtl2832_sdr: refcount to rtl28xxuAntti Palosaari2015-02-031-2/+15
| | | | | | | | | | 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>
OpenPOWER on IntegriCloud