]> err.no Git - linux-2.6/commitdiff
V4L/DVB (7601): em28xx-dvb: add support for the HVR-900
authorAidan Thornton <makosoft@googlemail.com>
Fri, 18 Apr 2008 00:40:03 +0000 (21:40 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:09:41 +0000 (14:09 -0300)
Adds the correct GPIOs and demod attach code for the HVR-900

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/em28xx/Kconfig
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-dvb.c

index 4818cda389137acc05a4660762ea889e999984ee..c57420e263ff00c74524dcb503bd9aedb03f605f 100644 (file)
@@ -32,6 +32,7 @@ config VIDEO_EM28XX_DVB
        tristate "DVB/ATSC Support for em28xx based TV cards"
        depends on VIDEO_EM28XX && DVB_CORE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
+       select DVB_ZL10353 if !DVB_FE_CUSTOMISE
        select VIDEOBUF_DVB
        select FW_LOADER
        ---help---
index 2e7fd19111545eaad960d5ff4a4282dd150bfb33..2a44d2adeb0959d9bfd89fa8fc00a20cf62d329e 100644 (file)
@@ -171,6 +171,26 @@ struct em28xx_board em28xx_boards[] = {
                        .vmux     = TVP5150_SVIDEO,
                        .amux     = 1,
                } },
+               .analog_gpio = {
+                       {               /* xc3028 reset seq */
+                               .reg = 0x08,
+                               .val = 0x2d,
+                               .rst = 0x3d,
+                               .t1 = 5,
+                               .t2 = 10,
+                               .t3 = 5,
+                       },
+               },
+               .digital_gpio = {
+                       {               /* xc3028 reset seq */
+                               .reg = 0x08,
+                               .val = 0x2e,
+                               .rst = 0x3e,
+                               .t1 = 6,
+                               .t2 = 6,
+                               .t3 = 6,
+                       }
+               },
        },
        [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
                .name           = "Hauppauge WinTV HVR 950",
index d3d52972cd84661bf6eb91a7afb458739a781942..65e0ab65fbe131ade7262eb86107632827832474 100644 (file)
@@ -23,6 +23,7 @@
 #include <media/videobuf-vmalloc.h>
 
 #include "lgdt330x.h"
+#include "zl10353.h"
 
 MODULE_DESCRIPTION("driver for em28xx based DVB cards");
 MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
@@ -65,6 +66,13 @@ static struct lgdt330x_config em2880_lgdt3303_dev = {
        .demod_chip = LGDT3303,
 };
 
+static struct zl10353_config em28xx_zl10353_with_xc3028 = {
+       .demod_address = (0x1e >> 1),
+       .no_tuner = 1,
+       .parallel_ts = 1,
+       .if2 = 45600,
+};
+
 /* ------------------------------------------------------------------ */
 
 static int attach_xc3028(u8 addr, struct em28xx *dev)
@@ -134,6 +142,16 @@ static int dvb_init(struct em28xx *dev)
                if (attach_xc3028(0x61, dev) < 0)
                        return -EINVAL;
                break;
+       case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
+               /* Enable zl10353 */
+               dev->mode = EM28XX_DIGITAL_MODE;
+               em28xx_tuner_callback(dev, XC2028_TUNER_RESET, 0);
+               dev->dvb.frontend = dvb_attach(zl10353_attach,
+                                              &em28xx_zl10353_with_xc3028,
+                                              &dev->i2c_adap);
+               if (attach_xc3028(0x61, dev) < 0)
+                       return -EINVAL;
+               break;
        default:
                printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card"
                                " isn't supported yet\n",