V4L/DVB: tm6000: add different tuner reset for terratec
authorStefan Ringel <stefan.ringel@arcor.de>
Mon, 15 Feb 2010 17:37:17 +0000 (14:37 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 18 May 2010 03:44:01 +0000 (00:44 -0300)
[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-cards.c

index 268a7de20d6d62ffa88fb61b34cb1fe48881a8d0..0db31bc178133228911514a0f4e10ce3eefcbc10 100644 (file)
@@ -269,12 +269,28 @@ int tm6000_tuner_callback(void *ptr, int component, int command, int arg)
                /* Reset codes during load firmware */
                switch (arg) {
                case 0:
-                       tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
-                                       dev->tuner_reset_gpio, 0x00);
-                       msleep(130);
-                       tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
-                                       dev->tuner_reset_gpio, 0x01);
-                       msleep(130);
+                       /* newer tuner can faster reset */
+                       switch (dev->model) {
+                       case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE:
+                               tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
+                                              dev->tuner_reset_gpio, 0x01);
+                               msleep(60);
+                               tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
+                                              dev->tuner_reset_gpio, 0x00);
+                               msleep(75);
+                               tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
+                                              dev->tuner_reset_gpio, 0x01);
+                               msleep(60);
+                               break;
+                       default:
+                               tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
+                                              dev->tuner_reset_gpio, 0x00);
+                               msleep(130);
+                               tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN,
+                                              dev->tuner_reset_gpio, 0x01);
+                               msleep(130);
+                               break;
+                       }
                        break;
                case 1:
                        tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT,