Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13389
b: refs/heads/master
c: 9573603
h: refs/heads/master
i:
  13387: 0c9053d
v: v3
  • Loading branch information
Hartmut Hackmann authored and Linus Torvalds committed Nov 9, 2005
1 parent 13ad597 commit 72880be
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 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: 48c425965ecbd3472133adb857c2fe0608c053a0
refs/heads/master: 95736034df751631657140aebe677e67d7522867
30 changes: 27 additions & 3 deletions trunk/drivers/media/video/tda8290.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static void tda827x_tune(struct i2c_client *c, u16 ifc, unsigned int freq)
i2c_transfer(c->adapter, &msg, 1);

reg2[0] = 0x60;
reg2[1] = 0x7f;
reg2[1] = 0x3f;
i2c_transfer(c->adapter, &msg, 1);

reg2[0] = 0x80;
Expand Down Expand Up @@ -534,8 +534,8 @@ int tda8290_init(struct i2c_client *c)
}
if (tuner_addrs == 0) {
tuner_addrs = 0x61;
tuner_info ("Could not clearly identify tda8290/8275 tuner address.\n");
return -1;
tuner_info ("could not clearly identify tuner address, defaulting to %x\n",
tuner_addrs);
} else {
tuner_addrs = tuner_addrs & 0xff;
tuner_info ("setting tuner address to %x\n", tuner_addrs);
Expand Down Expand Up @@ -567,6 +567,30 @@ int tda8290_init(struct i2c_client *c)
return 0;
}

int tda8290_probe(struct i2c_client *c)
{
unsigned char soft_reset[] = { 0x00, 0x00 };
unsigned char easy_mode_b[] = { 0x01, 0x02 };
unsigned char easy_mode_g[] = { 0x01, 0x04 };
unsigned char addr_dto_lsb = 0x07;
unsigned char data;

i2c_master_send(c, easy_mode_b, 2);
i2c_master_send(c, soft_reset, 2);
i2c_master_send(c, &addr_dto_lsb, 1);
i2c_master_recv(c, &data, 1);
if (data == 0) {
i2c_master_send(c, easy_mode_g, 2);
i2c_master_send(c, soft_reset, 2);
i2c_master_send(c, &addr_dto_lsb, 1);
i2c_master_recv(c, &data, 1);
if (data == 0x7b) {
return 0;
}
}
return -1;
}

/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* ---------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
case 0x42:
case 0x43:
case 0x4a:
case 0x44:
if (tda8290_init(&t->i2c)<0) {
case 0x4b:
if (tda8290_probe(&t->i2c) != 0) {
kfree(t);
return 0;
}
Expand Down

0 comments on commit 72880be

Please sign in to comment.