aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/stv090x_priv.h
diff options
context:
space:
mode:
authorAndreas Regel <andreas.regel@gmx.de>2010-01-05 19:19:43 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 15:10:36 -0300
commit97f7a2ae1a8a1e44a481456375efced75210e5eb (patch)
tree0acc51538d65350219254dc06af3e2dc66f82520 /drivers/media/dvb/frontends/stv090x_priv.h
parentb79c6df705e02b5dcb0e9360a15b28373813fec1 (diff)
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 5921a8d6c89..d38542665b0 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;