Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[pandora-kernel.git] / drivers / media / video / em28xx / em28xx-dvb.c
index d57f758..d603575 100644 (file)
@@ -245,7 +245,7 @@ static struct s5h1409_config em28xx_s5h1409_with_xc3028 = {
        .mpeg_timing   = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK
 };
 
-static struct zl10353_config em28xx_terratec_xs_zl10353_xc3028 = {
+static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = {
        .demod_address = (0x1e >> 1),
        .no_tuner = 1,
        .disable_i2c_gate_ctrl = 1,
@@ -272,7 +272,7 @@ static int mt352_terratec_xs_init(struct dvb_frontend *fe)
        static u8 capt_range_cfg[] = { CAPT_RANGE, 0x32 };
        static u8 trl_nom_cfg[]    = { TRL_NOMINAL_RATE_1, 0x64, 0x00 };
        static u8 tps_given_cfg[]  = { TPS_GIVEN_1, 0x40, 0x80, 0x50 };
-       static u8 tuner_go[]       = { TUNER_GO, 0x5d};
+       static u8 tuner_go[]       = { TUNER_GO, 0x01};
 
        mt352_write(fe, clock_config,   sizeof(clock_config));
        udelay(200);
@@ -477,9 +477,7 @@ static int dvb_init(struct em28xx *dev)
                        goto out_free;
                }
                break;
-       case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
        case EM2880_BOARD_KWORLD_DVB_310U:
-       case EM2880_BOARD_EMPIRE_DUAL_TV:
                dvb->frontend = dvb_attach(zl10353_attach,
                                           &em28xx_zl10353_with_xc3028,
                                           &dev->i2c_adap);
@@ -488,9 +486,20 @@ static int dvb_init(struct em28xx *dev)
                        goto out_free;
                }
                break;
+       case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
+       case EM2880_BOARD_EMPIRE_DUAL_TV:
+               dvb->frontend = dvb_attach(zl10353_attach,
+                                          &em28xx_zl10353_xc3028_no_i2c_gate,
+                                          &dev->i2c_adap);
+               if (attach_xc3028(0x61, dev) < 0) {
+                       result = -EINVAL;
+                       goto out_free;
+               }
+               break;
        case EM2880_BOARD_TERRATEC_HYBRID_XS:
+       case EM2881_BOARD_PINNACLE_HYBRID_PRO:
                dvb->frontend = dvb_attach(zl10353_attach,
-                                          &em28xx_terratec_xs_zl10353_xc3028,
+                                          &em28xx_zl10353_xc3028_no_i2c_gate,
                                           &dev->i2c_adap);
                if (dvb->frontend == NULL) {
                        /* This board could have either a zl10353 or a mt352.