Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76379
b: refs/heads/master
c: a818e1c
h: refs/heads/master
i:
  76377: 77bc1c3
  76375: d2ca7d9
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent c2ae6b9 commit 7fbf563
Show file tree
Hide file tree
Showing 2 changed files with 17 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: 1f3a4e328549cb85aa032c4ee5dfda7886754154
refs/heads/master: a818e1c8f7fcb42866a8630c508caddaa8edb331
16 changes: 16 additions & 0 deletions trunk/drivers/media/video/tda8290.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,22 @@ int tda829x_probe(struct tuner *t)
unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 };
unsigned char addr_dto_lsb = 0x07;
unsigned char data;
#define PROBE_BUFFER_SIZE 8
unsigned char buf[PROBE_BUFFER_SIZE];
int i;

/* rule out tda9887, which would return the same byte repeatedly */
tuner_i2c_xfer_send(&i2c_props, soft_reset, 1);
tuner_i2c_xfer_recv(&i2c_props, buf, PROBE_BUFFER_SIZE);
for (i = 1; i < PROBE_BUFFER_SIZE; i++) {
if (buf[i] == buf[0])
continue;
break;
}

/* all bytes are equal, not a tda829x - probably a tda9887 */
if (i == PROBE_BUFFER_SIZE)
return -ENODEV;

if ((tda8290_probe(&i2c_props) == 0) ||
(tda8295_probe(&i2c_props) == 0))
Expand Down

0 comments on commit 7fbf563

Please sign in to comment.