Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92506
b: refs/heads/master
c: e827931
h: refs/heads/master
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 7fa3ed7 commit 8b2c78c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cac2b0eb18e140e2f63146d0f97691e9238570b6
refs/heads/master: e827931e37295329be0bc0e6c0283bfa4807b8f9
22 changes: 22 additions & 0 deletions trunk/drivers/media/video/tuner-simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,28 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
return NULL;
}

/* If i2c_adap is set, check that the tuner is at the correct address.
* Otherwise, if i2c_adap is NULL, the tuner will be programmed directly
* by the digital demod via calc_regs.
*/
if (i2c_adap != NULL) {
u8 b[1];
struct i2c_msg msg = {
.addr = i2c_addr, .flags = I2C_M_RD,
.buf = b, .len = 1,
};

if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);

if (1 != i2c_transfer(i2c_adap, &msg, 1))
tuner_warn("unable to probe %s, proceeding anyway.",
tuners[type].name);

if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
}

mutex_lock(&tuner_simple_list_mutex);

instance = hybrid_tuner_request_state(struct tuner_simple_priv, priv,
Expand Down

0 comments on commit 8b2c78c

Please sign in to comment.