V4L/DVB (7471): SkyStar2: preparing support for the rev2.8
authorPatrick Boettcher <pb@linuxtv.org>
Sun, 30 Mar 2008 00:28:07 +0000 (21:28 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:09:40 +0000 (14:09 -0300)
Support is prepared, but the CX24113-driver .c-file is missing. After sorting out the NDA problems, the file will be there immediatly.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/b2c2/Kconfig
drivers/media/dvb/b2c2/flexcop-fe-tuner.c
drivers/media/dvb/b2c2/flexcop-misc.c
drivers/media/dvb/b2c2/flexcop-reg.h
drivers/media/dvb/frontends/cx24113.h [new file with mode: 0644]

index ffcbc7610856e2d5b46808b1fafa5634b61cb875..8193d88d171c0df7f33789af4f8f84d8aa69d379 100644 (file)
@@ -10,6 +10,8 @@ config DVB_B2C2_FLEXCOP
        select DVB_BCM3510 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
        select TUNER_SIMPLE if !DVB_FE_CUSTOMISE
+       select DVB_ISL6421 if !DVB_FE_CUSTOMISE
+       select DVB_CX24123 if !DVB_FE_CUSTOMISE
        help
          Support for the digital TV receiver chip made by B2C2 Inc. included in
          Technisats PCI cards and USB boxes.
index 46d6f5d8cd1c78dabdacf5a6e9cfa61c8e2e0588..6759c3ad234ace8b31f2f72ce363f0fb50c766c4 100644 (file)
 #include "dvb-pll.h"
 #include "tuner-simple.h"
 
+#include "cx24123.h"
+#include "cx24113.h"
+
+#include "isl6421.h"
+
 /* lnb control */
 
 static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
@@ -476,11 +481,54 @@ static struct stv0297_config alps_tdee4_stv0297_config = {
 //     .pll_set = alps_tdee4_stv0297_pll_set,
 };
 
+
+static struct cx24123_config skystar2_rev2_8_cx24123_config = {
+       .demod_address = 0x55,
+       .dont_use_pll = 1,
+       .agc_callback = cx24113_agc_callback,
+};
+
+static const struct cx24113_config skystar2_rev2_8_cx24113_config = {
+       .i2c_addr = 0x54,
+       .xtal_khz = 10111,
+};
+
 /* try to figure out the frontend, each card/box can have on of the following list */
 int flexcop_frontend_init(struct flexcop_device *fc)
 {
        struct dvb_frontend_ops *ops;
        struct i2c_adapter *i2c = &fc->fc_i2c_adap[0].i2c_adap;
+       struct i2c_adapter *i2c_tuner;
+
+       /* try the sky v2.8 (cx24123, isl6421) */
+       fc->fe = dvb_attach(cx24123_attach,
+               &skystar2_rev2_8_cx24123_config, i2c);
+       if (fc->fe != NULL) {
+               i2c_tuner = cx24123_get_tuner_i2c_adapter(fc->fe);
+               if (i2c_tuner != NULL) {
+                       if (dvb_attach(cx24113_attach, fc->fe,
+                                       &skystar2_rev2_8_cx24113_config,
+                                       i2c_tuner) == NULL)
+                               err("CX24113 could NOT be attached");
+                       else
+                               info("CX24113 successfully attached");
+               }
+
+               fc->dev_type = FC_SKY_REV28;
+
+               fc->fc_i2c_adap[2].no_base_addr = 1;
+               if (dvb_attach(isl6421_attach, fc->fe,
+                      &fc->fc_i2c_adap[2].i2c_adap, 0x08, 0, 0) == NULL)
+                       err("ISL6421 could NOT be attached");
+               else
+                       info("ISL6421 successfully attached");
+
+               /* TODO on i2c_adap[1] addr 0x11 (EEPROM) there seems to be an
+                * IR-receiver (PIC16F818) - but the card has no input for
+                * that ??? */
+
+               goto fe_found;
+    }
 
        /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */
        fc->fe = dvb_attach(stv0299_attach, &samsung_tbmu24112_config, i2c);
index 167583bf0621879b1f9deefd1c443646ccbd4771..93d20e56f909e17c243c8348e81e01047937e213 100644 (file)
@@ -52,6 +52,8 @@ static const char *flexcop_device_names[] = {
        "Sky2PC/SkyStar 2 DVB-S (old version)",
        "Cable2PC/CableStar 2 DVB-C",
        "Air2PC/AirStar 2 ATSC 3rd generation (HD5000)",
+       "Sky2PC/SkyStar 2 DVB-S rev 2.7a/u",
+       "Sky2PC/SkyStar 2 DVB-S rev 2.8",
 };
 
 static const char *flexcop_bus_names[] = {
index 491f9bd6e1951be8d23463667da4fb5c72972b81..7599fccc1a5b80a438e9cbfd2c8d387c9b526f6c 100644 (file)
@@ -25,6 +25,8 @@ typedef enum {
        FC_SKY_OLD,
        FC_CABLE,
        FC_AIR_ATSC3,
+       FC_SKY_REV27,
+       FC_SKY_REV28,
 } flexcop_device_type_t;
 
 typedef enum {
diff --git a/drivers/media/dvb/frontends/cx24113.h b/drivers/media/dvb/frontends/cx24113.h
new file mode 100644 (file)
index 0000000..5ab3dd1
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ *  Driver for Conexant CX24113/CX24128 Tuner (Satelite)
+ *
+ *  Copyright (C) 2007-8 Patrick Boettcher <pb@linuxtv.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=
+ */
+
+#ifndef CX24113_H
+#define CX24113_H
+
+struct dvb_frontend;
+
+struct cx24113_config {
+       u8 i2c_addr; /* 0x14 or 0x54 */
+
+       u32 xtal_khz;
+};
+
+/* TODO: #if defined(CONFIG_DVB_TUNER_CX24113) || \
+ * (defined(CONFIG_DVB_TUNER_CX24113_MODULE) && defined(MODULE)) */
+
+static inline struct dvb_frontend *cx24113_attach(struct dvb_frontend *fe,
+       const struct cx24113_config *config, struct i2c_adapter *i2c)
+{
+       printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+       return NULL;
+}
+
+static inline void cx24113_agc_callback(struct dvb_frontend *fe)
+{
+       printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+}
+
+#endif /* CX24113_H */