Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76319
b: refs/heads/master
c: a72dd30
h: refs/heads/master
i:
  76317: 34ed382
  76315: 53abc9f
  76311: 95b56ac
  76303: bca349f
  76287: 9c66f64
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent df4b9e7 commit 6cd36a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2be1b48fd27a3b6878db034288ed571b03df3a5c
refs/heads/master: a72dd305f99f6c6e4eff01478ae53fc80ce98fb1
14 changes: 11 additions & 3 deletions trunk/drivers/media/video/tda8290.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ struct tda8290_priv {

/*---------------------------------------------------------------------*/

static void tda8290_i2c_bridge(struct dvb_frontend *fe, int close)
static int tda8290_i2c_bridge(struct dvb_frontend *fe, int close)
{
struct tda8290_priv *priv = fe->analog_demod_priv;

unsigned char enable[2] = { 0x21, 0xC0 };
unsigned char disable[2] = { 0x21, 0x00 };
unsigned char *msg;
if(close) {

if (close) {
msg = enable;
tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
/* let the bridge stabilize */
Expand All @@ -66,16 +67,19 @@ static void tda8290_i2c_bridge(struct dvb_frontend *fe, int close)
msg = disable;
tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
}

return 0;
}

static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
static int tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
{
struct tda8290_priv *priv = fe->analog_demod_priv;

unsigned char enable[2] = { 0x45, 0xc1 };
unsigned char disable[2] = { 0x46, 0x00 };
unsigned char buf[3] = { 0x45, 0x01, 0x00 };
unsigned char *msg;

if (close) {
msg = enable;
tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
Expand All @@ -94,6 +98,8 @@ static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
msg[1] |= 0x04;
tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
}

return 0;
}

/*---------------------------------------------------------------------*/
Expand Down Expand Up @@ -517,6 +523,7 @@ static struct analog_tuner_ops tda8290_tuner_ops = {
.has_signal = tda8290_has_signal,
.standby = tda8290_standby,
.release = tda829x_release,
.i2c_gate_ctrl = tda8290_i2c_bridge,
};

static struct analog_tuner_ops tda8295_tuner_ops = {
Expand All @@ -525,6 +532,7 @@ static struct analog_tuner_ops tda8295_tuner_ops = {
.has_signal = tda8295_has_signal,
.standby = tda8295_standby,
.release = tda829x_release,
.i2c_gate_ctrl = tda8295_i2c_bridge,
};

int tda8290_attach(struct tuner *t)
Expand Down

0 comments on commit 6cd36a1

Please sign in to comment.