aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/frontends/tda1004x.c2
-rw-r--r--drivers/media/dvb/frontends/tda827x.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c
index dbfc94a9c3f7..3de729b3b4bf 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -503,6 +503,7 @@ static int tda10046_fwupload(struct dvb_frontend* fe)
503 503
504 /* The PLLs need to be reprogrammed after sleep */ 504 /* The PLLs need to be reprogrammed after sleep */
505 tda10046_init_plls(fe); 505 tda10046_init_plls(fe);
506 tda1004x_write_mask(state, TDA1004X_CONFADC2, 0xc0, 0);
506 507
507 /* don't re-upload unless necessary */ 508 /* don't re-upload unless necessary */
508 if (tda1004x_check_upload_ok(state) == 0) 509 if (tda1004x_check_upload_ok(state) == 0)
@@ -1170,6 +1171,7 @@ static int tda1004x_sleep(struct dvb_frontend* fe)
1170 tda1004x_write_mask(state, TDA10046H_CONF_POLARITY, 0x0f, 1171 tda1004x_write_mask(state, TDA10046H_CONF_POLARITY, 0x0f,
1171 (gpio_conf & 0x0f) ^ 0x0a); 1172 (gpio_conf & 0x0f) ^ 0x0a);
1172 1173
1174 tda1004x_write_mask(state, TDA1004X_CONFADC2, 0xc0, 0xc0);
1173 tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1); 1175 tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1);
1174 break; 1176 break;
1175 } 1177 }
diff --git a/drivers/media/dvb/frontends/tda827x.c b/drivers/media/dvb/frontends/tda827x.c
index cff2d1fa4094..1fa58c5dac0f 100644
--- a/drivers/media/dvb/frontends/tda827x.c
+++ b/drivers/media/dvb/frontends/tda827x.c
@@ -426,6 +426,7 @@ struct dvb_frontend *tda827x_attach(struct dvb_frontend *fe, int addr,
426{ 426{
427 struct tda827x_priv *priv = NULL; 427 struct tda827x_priv *priv = NULL;
428 u8 data; 428 u8 data;
429 u8 sb_msg[] = { 0x30, 0xd0 };
429 struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD, 430 struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD,
430 .buf = &data, .len = 1 }; 431 .buf = &data, .len = 1 };
431 dprintk("%s:\n", __FUNCTION__); 432 dprintk("%s:\n", __FUNCTION__);
@@ -446,15 +447,21 @@ struct dvb_frontend *tda827x_attach(struct dvb_frontend *fe, int addr,
446 priv->i2c_addr = addr; 447 priv->i2c_addr = addr;
447 priv->i2c_adap = i2c; 448 priv->i2c_adap = i2c;
448 priv->cfg = cfg; 449 priv->cfg = cfg;
450
451 msg.flags = 0;
452 msg.buf = sb_msg;
453 msg.len = sizeof(sb_msg);
454
449 if ((data & 0x3c) == 0) { 455 if ((data & 0x3c) == 0) {
450 dprintk("tda827x tuner found\n"); 456 dprintk("tda827x tuner found\n");
451 memcpy(&fe->ops.tuner_ops, &tda827xo_tuner_ops, sizeof(struct dvb_tuner_ops)); 457 memcpy(&fe->ops.tuner_ops, &tda827xo_tuner_ops, sizeof(struct dvb_tuner_ops));
452 } else { 458 } else {
453 dprintk("tda827xa tuner found\n"); 459 dprintk("tda827xa tuner found\n");
454 memcpy(&fe->ops.tuner_ops, &tda827xa_tuner_ops, sizeof(struct dvb_tuner_ops)); 460 memcpy(&fe->ops.tuner_ops, &tda827xa_tuner_ops, sizeof(struct dvb_tuner_ops));
461 sb_msg[1] = 0x90;
455 } 462 }
456 fe->tuner_priv = priv; 463 fe->tuner_priv = priv;
457 464 i2c_transfer(i2c, &msg, 1);
458 return fe; 465 return fe;
459} 466}
460EXPORT_SYMBOL(tda827x_attach); 467EXPORT_SYMBOL(tda827x_attach);