]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/dvb-usb/dw2102.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / dvb-usb / dw2102.c
index ca53df61caa8fbc9d7e3b84c2a27c2b1bace533e..c65f273ff313cda9d874f3183f343949da953169 100644 (file)
@@ -9,7 +9,6 @@
 *
 * see Documentation/dvb/README.dvb-usb for more information
 */
-#include <linux/version.h>
 #include "dw2102.h"
 #include "si21xx.h"
 #include "stv0299.h"
 #define USB_PID_DW2104 0x2104
 #endif
 
+#ifndef USB_PID_CINERGY_S
+#define USB_PID_CINERGY_S 0x0064
+#endif
+
 #define DW210X_READ_MSG 0
 #define DW210X_WRITE_MSG 1
 
@@ -422,6 +425,18 @@ static int dw210x_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
        return 0;
 }
 
+static struct stv0299_config sharp_z0194a_config = {
+       .demod_address = 0x68,
+       .inittab = sharp_z0194a_inittab,
+       .mclk = 88000000UL,
+       .invert = 1,
+       .skip_reinit = 0,
+       .lock_output = STV0299_LOCKOUTPUT_1,
+       .volt13_op0_op1 = STV0299_VOLT13_OP1,
+       .min_delay_ms = 100,
+       .set_symbol_rate = sharp_z0194a_set_symbol_rate,
+};
+
 static struct cx24116_config dw2104_config = {
        .demod_address = 0x55,
        .mpg_clk_pos_pol = 0x01,
@@ -566,6 +581,7 @@ static struct usb_device_id dw2102_table[] = {
        {USB_DEVICE(USB_VID_CYPRESS, 0x2101)},
        {USB_DEVICE(USB_VID_CYPRESS, 0x2104)},
        {USB_DEVICE(0x9022, 0xd650)},
+       {USB_DEVICE(USB_VID_TERRATEC, USB_PID_CINERGY_S)},
        { }
 };
 
@@ -635,6 +651,7 @@ static int dw2102_load_firmware(struct usb_device *dev,
                        dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
                                        DW210X_WRITE_MSG);
                        break;
+               case USB_PID_CINERGY_S:
                case USB_PID_DW2102:
                        dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0,
                                        DW210X_WRITE_MSG);
@@ -643,7 +660,7 @@ static int dw2102_load_firmware(struct usb_device *dev,
                        /* check STV0299 frontend  */
                        dw210x_op_rw(dev, 0xb5, 0, 0, &reset16[0], 2,
                                        DW210X_READ_MSG);
-                       if (reset16[0] == 0xa1) {
+                       if ((reset16[0] == 0xa1) || (reset16[0] == 0x80)) {
                                dw2102_properties.i2c_algo = &dw2102_i2c_algo;
                                dw2102_properties.adapter->tuner_attach = &dw2102_tuner_attach;
                                break;
@@ -714,7 +731,7 @@ static struct dvb_usb_device_properties dw2102_properties = {
                        },
                }
        },
-       .num_device_descs = 2,
+       .num_device_descs = 3,
        .devices = {
                {"DVBWorld DVB-S 2102 USB2.0",
                        {&dw2102_table[0], NULL},
@@ -724,6 +741,10 @@ static struct dvb_usb_device_properties dw2102_properties = {
                        {&dw2102_table[1], NULL},
                        {NULL},
                },
+               {"TerraTec Cinergy S USB",
+                       {&dw2102_table[4], NULL},
+                       {NULL},
+               },
        }
 };