Skip to content

Commit

Permalink
V4L/DVB (3378): Restore power on defaults of tda9887 after tda8290 probe
Browse files Browse the repository at this point in the history
The probing code for tda8290 changes the state of the tda9887 GP ports.
The patch assumes that if probing for tda8290 failed, this must be a 
tda9887 and restores its power on defaults.
This should solve the module load order issue with some pinnacle cards.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Hartmut Hackmann authored and Mauro Carvalho Chehab committed Feb 27, 2006
1 parent 36f4f33 commit 44fd06f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -2213,7 +2213,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = 0x61,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT,
.tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_tv,
Expand All @@ -2237,7 +2237,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = 0x61,
.radio_addr = ADDR_UNSET,
.tda9887_conf = TDA9887_PRESENT,
.tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_tv,
Expand Down
8 changes: 5 additions & 3 deletions drivers/media/video/tda8290.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,10 @@ int tda8290_init(struct i2c_client *c)

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 soft_reset[] = { 0x00, 0x00 };
unsigned char easy_mode_b[] = { 0x01, 0x02 };
unsigned char easy_mode_g[] = { 0x01, 0x04 };
unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 };
unsigned char addr_dto_lsb = 0x07;
unsigned char data;

Expand All @@ -603,6 +604,7 @@ int tda8290_probe(struct i2c_client *c)
return 0;
}
}
i2c_master_send(c, restore_9886, 3);
return -1;
}

Expand Down

0 comments on commit 44fd06f

Please sign in to comment.