aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2007-04-27 11:31:15 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:43:36 -0400
commit06be3035f96d73cf64dc20a8ee37c902d7a2ff2d (patch)
tree2b3612a21c083b033559ba87d054bbebd92c2a49 /drivers/media/video/saa7134
parent8ce47dad8e2b9fcb899a67e6537337fa9c18c1f5 (diff)
V4L/DVB (5318): Fix tda8290 code for tda827x module
During tuner attach, the pointers to host dev structure are not set yet, so the I2c adapter needs to be accessed differently. This patch also does some minor cleanup in the saa7134-dvb module. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 7985d9e860e9..bbb1a1e55af2 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -634,7 +634,6 @@ static void philips_tda827x_lna_gain(struct dvb_frontend *fe, int high)
634 634
635static int tda8290_i2c_gate_ctrl( struct dvb_frontend* fe, int enable) 635static int tda8290_i2c_gate_ctrl( struct dvb_frontend* fe, int enable)
636{ 636{
637 struct saa7134_dev *dev = fe->dvb->priv;
638 struct tda1004x_state *state = fe->demodulator_priv; 637 struct tda1004x_state *state = fe->demodulator_priv;
639 638
640 u8 addr = state->config->i2c_gate; 639 u8 addr = state->config->i2c_gate;
@@ -646,8 +645,8 @@ static int tda8290_i2c_gate_ctrl( struct dvb_frontend* fe, int enable)
646 } else { 645 } else {
647 tda8290_msg.buf = tda8290_open; 646 tda8290_msg.buf = tda8290_open;
648 } 647 }
649 if (i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1) != 1) { 648 if (i2c_transfer(state->i2c, &tda8290_msg, 1) != 1) {
650 printk("%s/dvb: could not access tda8290 I2C gate\n",dev->name); 649 printk("saa7134/dvb: could not access tda8290 I2C gate\n");
651 return -EIO; 650 return -EIO;
652 } 651 }
653 msleep(20); 652 msleep(20);
@@ -869,7 +868,7 @@ static int ads_duo_tuner_init(struct dvb_frontend *fe)
869 struct saa7134_dev *dev = fe->dvb->priv; 868 struct saa7134_dev *dev = fe->dvb->priv;
870 philips_tda827x_tuner_init(fe); 869 philips_tda827x_tuner_init(fe);
871 /* route TDA8275a AGC input to the channel decoder */ 870 /* route TDA8275a AGC input to the channel decoder */
872 saa_setl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0400000); 871 saa7134_set_gpio(dev, 22, 1);
873 return 0; 872 return 0;
874} 873}
875 874
@@ -877,7 +876,7 @@ static int ads_duo_tuner_sleep(struct dvb_frontend *fe)
877{ 876{
878 struct saa7134_dev *dev = fe->dvb->priv; 877 struct saa7134_dev *dev = fe->dvb->priv;
879 /* route TDA8275a AGC input to the analog IF chip*/ 878 /* route TDA8275a AGC input to the analog IF chip*/
880 saa_clearl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0400000); 879 saa7134_set_gpio(dev, 22, 0);
881 philips_tda827x_tuner_sleep(fe); 880 philips_tda827x_tuner_sleep(fe);
882 return 0; 881 return 0;
883} 882}
@@ -1030,7 +1029,7 @@ static int dvb_init(struct saa7134_dev *dev)
1030 configure_tda827x_fe(dev, &hauppauge_hvr_1110_config, "DVB-T Hauppauge HVR 1110"); 1029 configure_tda827x_fe(dev, &hauppauge_hvr_1110_config, "DVB-T Hauppauge HVR 1110");
1031 break; 1030 break;
1032 case SAA7134_BOARD_ASUSTeK_P7131_DUAL: 1031 case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
1033 configure_tda827x_fe(dev, &asus_p7131_dual_config, "DVB-T Asus P7137 Dual"); 1032 configure_tda827x_fe(dev, &asus_p7131_dual_config, "DVB-T Asus P7131 Dual");
1034 break; 1033 break;
1035 case SAA7134_BOARD_FLYDVBT_LR301: 1034 case SAA7134_BOARD_FLYDVBT_LR301:
1036 configure_tda827x_fe(dev, &tda827x_lifeview_config, "DVB-T Lifeview FlyDVBT LR301"); 1035 configure_tda827x_fe(dev, &tda827x_lifeview_config, "DVB-T Lifeview FlyDVBT LR301");