Commit graph

674 commits

Author SHA1 Message Date
Martin Kepplinger 2948c01c2b [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>
2015-02-03 18:16:18 -02:00
Olli Salonen 17d4d6ae09 [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>
2015-02-03 18:13:12 -02:00
Olli Salonen 683e98b602 [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>
2015-02-03 18:12:46 -02:00
Akihiro Tsukada e601044212 [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>
2015-02-03 17:16:52 -02:00
Mauro Carvalho Chehab bda977b731 [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>
2015-02-03 16:38:43 -02:00
Mauro Carvalho Chehab d858b0e787 [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>
2015-02-03 16:38:29 -02:00
Antti Palosaari cecc589620 [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>
2015-02-03 16:31:01 -02:00
Antti Palosaari 2f74b7c2f8 [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>
2015-02-03 16:30:47 -02:00
Antti Palosaari 61c309ffcd [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>
2015-02-03 16:30:26 -02:00
Antti Palosaari b410dae43c [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>
2015-02-03 16:28:12 -02:00
Antti Palosaari 0d117901b6 [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>
2015-02-03 16:23:09 -02:00
Antti Palosaari d5eec231be [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>
2015-02-03 16:22:24 -02:00
Antti Palosaari a08c378119 [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>
2015-02-03 16:20:02 -02:00
Antti Palosaari 75c24005ee [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>
2015-02-03 16:19:24 -02:00
Antti Palosaari cd559e0b13 [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>
2015-02-03 16:18:51 -02:00
Antti Palosaari 3bda2bf1f8 [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>
2015-02-03 16:18:03 -02:00
Antti Palosaari e4e78693a1 [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>
2015-02-03 16:17:24 -02:00
Antti Palosaari 63bdab5d31 [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>
2015-02-03 16:15:43 -02:00
Antti Palosaari 725b7f3046 [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>
2015-02-03 16:13:17 -02:00
Antti Palosaari 0aa32ef9b3 [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>
2015-02-03 16:12:34 -02:00
Antti Palosaari eec21beb35 [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>
2015-02-03 16:12:07 -02:00
Antti Palosaari 5e5d52a00f [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>
2015-02-03 16:11:17 -02:00
Antti Palosaari dcadb82a7a [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>
2015-02-03 16:10:54 -02:00
Antti Palosaari 4b01e01a81 [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>
2015-02-03 16:09:56 -02:00
Antti Palosaari 1c7da405c6 [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>
2015-02-03 16:09:19 -02:00
Antti Palosaari c65dbf652d [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>
2015-02-03 16:08:37 -02:00
Antti Palosaari 25ef9f5547 [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>
2015-02-03 16:07:43 -02:00
Antti Palosaari 084330b746 [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>
2015-02-03 16:07:22 -02:00
Antti Palosaari f7caf93fb8 [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>
2015-02-03 16:07:01 -02:00
Antti Palosaari 6b4fd01804 [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>
2015-02-03 16:06:30 -02:00
Antti Palosaari 19d273d635 [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>
2015-02-03 16:06:07 -02:00
Antti Palosaari d10165815b [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>
2015-02-03 16:05:33 -02:00
Antti Palosaari e1174d788a [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>
2015-02-03 16:03:41 -02:00
Antti Palosaari 6e6aac6525 [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>
2015-02-03 16:03:04 -02:00
Antti Palosaari 038c6f240e [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>
2015-02-03 16:02:19 -02:00
Antti Palosaari ac32ee42cc [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>
2015-02-03 16:01:25 -02:00
Antti Palosaari 6f5f6ee24e [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>
2015-02-03 16:00:05 -02:00
Antti Palosaari 15d37f3824 [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>
2015-02-03 15:59:19 -02:00
Antti Palosaari fd4cfa8bb1 [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>
2015-02-03 15:54:59 -02:00
Antti Palosaari df70ddad81 [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>
2015-02-02 17:56:50 -02:00
Antti Palosaari 6dcfe3cc2e [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>
2015-02-02 17:56:14 -02:00
Antti Palosaari f491391cc3 [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>
2015-02-02 17:55:51 -02:00
Antti Palosaari d512e28651 [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>
2015-02-02 17:55:28 -02:00
Antti Palosaari 5bb11ca586 [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>
2015-02-02 17:55:08 -02:00
Antti Palosaari 871f70252b [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>
2015-02-02 17:54:35 -02:00
Antti Palosaari 47b4dbfff1 [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>
2015-02-02 17:53:53 -02:00
Antti Palosaari 947debb4f2 [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>
2015-02-02 17:53:06 -02:00
Antti Palosaari b8cb50d237 [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>
2015-02-02 17:52:25 -02:00
Antti Palosaari 7cc3932889 [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>
2015-02-02 17:51:39 -02:00
Antti Palosaari 1f153c4d88 [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>
2015-02-02 17:51:08 -02:00