summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stv090x_priv.h
diff options
context:
space:
mode:
authorAndreas Regel2010-01-05 23:19:43 +0100
committerMauro Carvalho Chehab2010-02-26 19:10:36 +0100
commit97f7a2ae1a8a1e44a481456375efced75210e5eb (patch)
tree0acc51538d65350219254dc06af3e2dc66f82520 /drivers/media/dvb/frontends/stv090x_priv.h
parentV4L/DVB (13974): [STV090x] Fix locking reliabilty issues in automatic mode. (diff)
downloadkernel-qcow2-linux-97f7a2ae1a8a1e44a481456375efced75210e5eb.tar.gz
kernel-qcow2-linux-97f7a2ae1a8a1e44a481456375efced75210e5eb.tar.xz
kernel-qcow2-linux-97f7a2ae1a8a1e44a481456375efced75210e5eb.zip
V4L/DVB (13975): [STV090x] Added internal structure with shared settings and data.
As the STV0900 features two demodulation paths in one chip there is some information used by both instances of the driver when used in dual mode. This information is now shared in an internal structure referenced by I2C adapter and address. Do initialisation of the demodulator only once when used in dual mode. Moved global mutex demod_lock to internal structure. Moved dev_ver and mclk to internal structure. Removed unused tuner_refclk from stv090x_state. Signed-off-by: Andreas Regel <andreas.regel@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/stv090x_priv.h')
-rw-r--r--drivers/media/dvb/frontends/stv090x_priv.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/stv090x_priv.h b/drivers/media/dvb/frontends/stv090x_priv.h
index 5921a8d6c89f..d38542665b0a 100644
--- a/drivers/media/dvb/frontends/stv090x_priv.h
+++ b/drivers/media/dvb/frontends/stv090x_priv.h
@@ -230,11 +230,22 @@ struct stv090x_tab {
s32 read;
};
+struct stv090x_internal {
+ struct i2c_adapter *i2c_adap;
+ u8 i2c_addr;
+
+ struct mutex demod_lock; /* Lock access to shared register */
+ s32 mclk; /* Masterclock Divider factor */
+ u32 dev_ver;
+
+ int num_used;
+};
+
struct stv090x_state {
enum stv090x_device device;
enum stv090x_demodulator demod;
enum stv090x_mode demod_mode;
- u32 dev_ver;
+ struct stv090x_internal *internal;
struct i2c_adapter *i2c;
const struct stv090x_config *config;
@@ -256,11 +267,8 @@ struct stv090x_state {
u32 frequency;
u32 srate;
- s32 mclk; /* Masterclock Divider factor */
s32 tuner_bw;
- u32 tuner_refclk;
-
s32 search_range;
s32 DemodTimeout;