V4L/DVB (3378): Restore power on defaults of tda9887 after tda8290 probe

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>

authored by Hartmut Hackmann and committed by Mauro Carvalho Chehab 14c255b2 2175771e

+7 -5
+2 -2
drivers/media/video/saa7134/saa7134-cards.c
··· 2187 2187 .radio_type = UNSET, 2188 2188 .tuner_addr = 0x61, 2189 2189 .radio_addr = ADDR_UNSET, 2190 - .tda9887_conf = TDA9887_PRESENT, 2190 + .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE, 2191 2191 .mpeg = SAA7134_MPEG_DVB, 2192 2192 .inputs = {{ 2193 2193 .name = name_tv, ··· 2211 2211 .radio_type = UNSET, 2212 2212 .tuner_addr = 0x61, 2213 2213 .radio_addr = ADDR_UNSET, 2214 - .tda9887_conf = TDA9887_PRESENT, 2214 + .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE, 2215 2215 .mpeg = SAA7134_MPEG_DVB, 2216 2216 .inputs = {{ 2217 2217 .name = name_tv,
+5 -3
drivers/media/video/tda8290.c
··· 580 580 581 581 int tda8290_probe(struct i2c_client *c) 582 582 { 583 - unsigned char soft_reset[] = { 0x00, 0x00 }; 584 - unsigned char easy_mode_b[] = { 0x01, 0x02 }; 585 - unsigned char easy_mode_g[] = { 0x01, 0x04 }; 583 + unsigned char soft_reset[] = { 0x00, 0x00 }; 584 + unsigned char easy_mode_b[] = { 0x01, 0x02 }; 585 + unsigned char easy_mode_g[] = { 0x01, 0x04 }; 586 + unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 }; 586 587 unsigned char addr_dto_lsb = 0x07; 587 588 unsigned char data; 588 589 ··· 600 599 return 0; 601 600 } 602 601 } 602 + i2c_master_send(c, restore_9886, 3); 603 603 return -1; 604 604 } 605 605