aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2009-12-04 02:42:22 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-01-17 08:55:31 -0500
commitb2eb1312faa26703e71b7b3945c8773213e9ee49 (patch)
tree4e9ca292e4be0a917fd39512c3e14589a32e5c18 /drivers
parent5e68b0aedaa34447d86ae5cc6d071251c62bef37 (diff)
V4L/DVB (13723): [Mantis/VP-2040, Terratec Cinergy C] Add support for the Cinergy C, VP-2040 clone
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/mantis/Makefile13
-rw-r--r--drivers/media/dvb/mantis/mantis_core.c4
-rw-r--r--drivers/media/dvb/mantis/mantis_dvb.c16
-rw-r--r--drivers/media/dvb/mantis/mantis_vp2040.c36
-rw-r--r--drivers/media/dvb/mantis/mantis_vp2040.h33
5 files changed, 98 insertions, 4 deletions
diff --git a/drivers/media/dvb/mantis/Makefile b/drivers/media/dvb/mantis/Makefile
index a980ff2382b..2be21bfdd24 100644
--- a/drivers/media/dvb/mantis/Makefile
+++ b/drivers/media/dvb/mantis/Makefile
@@ -1,6 +1,13 @@
1mantis-objs = mantis_core.o mantis_dma.o mantis_pci.o mantis_i2c.o \ 1mantis-objs = mantis_core.o \
2 mantis_dvb.o mantis_vp1033.o mantis_vp1034.o mantis_vp2033.o \ 2 mantis_dma.o \
3 mantis_vp3030.o 3 mantis_pci.o \
4 mantis_i2c.o \
5 mantis_dvb.o \
6 mantis_vp1033.o \
7 mantis_vp1034.o \
8 mantis_vp2033.o \
9 mantis_vp2040.o \
10 mantis_vp3030.o
4 11
5obj-$(CONFIG_DVB_MANTIS) += mantis.o 12obj-$(CONFIG_DVB_MANTIS) += mantis.o
6 13
diff --git a/drivers/media/dvb/mantis/mantis_core.c b/drivers/media/dvb/mantis/mantis_core.c
index 16d693eeb29..96b939247b4 100644
--- a/drivers/media/dvb/mantis/mantis_core.c
+++ b/drivers/media/dvb/mantis/mantis_core.c
@@ -23,6 +23,7 @@
23#include "mantis_vp1033.h" 23#include "mantis_vp1033.h"
24#include "mantis_vp1034.h" 24#include "mantis_vp1034.h"
25#include "mantis_vp2033.h" 25#include "mantis_vp2033.h"
26#include "mantis_vp2040.h"
26#include "mantis_vp3030.h" 27#include "mantis_vp3030.h"
27 28
28static int read_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length) 29static int read_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length)
@@ -113,6 +114,9 @@ static void mantis_load_config(struct mantis_pci *mantis)
113 case MANTIS_VP_2033_DVB_C: // VP-2033 114 case MANTIS_VP_2033_DVB_C: // VP-2033
114 mantis->hwconfig = &vp2033_mantis_config; 115 mantis->hwconfig = &vp2033_mantis_config;
115 break; 116 break;
117 case TERRATEC_CINERGY_C_PCI: // VP-2040 clone
118 mantis->hwconfig = &vp2040_mantis_config;
119 break;
116 case MANTIS_VP_3030_DVB_T: // VP-3030 120 case MANTIS_VP_3030_DVB_T: // VP-3030
117 mantis->hwconfig = &vp3030_mantis_config; 121 mantis->hwconfig = &vp3030_mantis_config;
118 break; 122 break;
diff --git a/drivers/media/dvb/mantis/mantis_dvb.c b/drivers/media/dvb/mantis/mantis_dvb.c
index f2556950d18..15012ea5796 100644
--- a/drivers/media/dvb/mantis/mantis_dvb.c
+++ b/drivers/media/dvb/mantis/mantis_dvb.c
@@ -28,6 +28,7 @@
28#include "mantis_vp1033.h" 28#include "mantis_vp1033.h"
29#include "mantis_vp1034.h" 29#include "mantis_vp1034.h"
30#include "mantis_vp2033.h" 30#include "mantis_vp2033.h"
31#include "mantis_vp2040.h"
31#include "mantis_vp3030.h" 32#include "mantis_vp3030.h"
32 33
33/* Tuner power supply control */ 34/* Tuner power supply control */
@@ -243,7 +244,7 @@ int __devinit mantis_frontend_init(struct mantis_pci *mantis)
243 if (mantis->fe) { 244 if (mantis->fe) {
244 mantis->fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set; 245 mantis->fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set;
245 dprintk(verbose, MANTIS_ERROR, 1, 246 dprintk(verbose, MANTIS_ERROR, 1,
246 "found Philips CU1216 DVB-C frontend @ 0x%02x", 247 "found Philips CU1216 DVB-C frontend (TDA10021) @ 0x%02x",
247 philips_cu1216_config.demod_address); 248 philips_cu1216_config.demod_address);
248 249
249 dprintk(verbose, MANTIS_ERROR, 1, 250 dprintk(verbose, MANTIS_ERROR, 1,
@@ -251,6 +252,19 @@ int __devinit mantis_frontend_init(struct mantis_pci *mantis)
251 252
252 } 253 }
253 break; 254 break;
255 case TERRATEC_CINERGY_C_PCI:
256 dprintk(verbose, MANTIS_ERROR, 1, "Probing for CU1216 (DVB-C)");
257 mantis->fe = tda10023_attach(&tda10023_cu1216_config, &mantis->adapter, read_pwm(mantis));
258 if (mantis->fe) {
259 mantis->fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set;
260 dprintk(verbose, MANTIS_ERROR, 1,
261 "found Philips CU1216 DVB-C frontend (TDA10023) @ 0x%02x",
262 philips_cu1216_config.demod_address);
263
264 dprintk(verbose, MANTIS_ERROR, 1,
265 "Mantis DVB-C Philips CU1216 frontend attach success");
266 }
267 break;
254 default: 268 default:
255 dprintk(verbose, MANTIS_DEBUG, 1, "Unknown frontend:[0x%02x]", 269 dprintk(verbose, MANTIS_DEBUG, 1, "Unknown frontend:[0x%02x]",
256 mantis->sub_device_id); 270 mantis->sub_device_id);
diff --git a/drivers/media/dvb/mantis/mantis_vp2040.c b/drivers/media/dvb/mantis/mantis_vp2040.c
new file mode 100644
index 00000000000..07da73827fd
--- /dev/null
+++ b/drivers/media/dvb/mantis/mantis_vp2040.c
@@ -0,0 +1,36 @@
1/*
2 Mantis VP-2040 driver
3
4 Copyright (C) Manu Abraham (abraham.manu@gmail.com)
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21#include "mantis_common.h"
22#include "mantis_vp2040.h"
23
24#define MANTIS_MODEL_NAME "VP-2040"
25#define MANTIS_DEV_TYPE "DVB-C"
26
27struct mantis_hwconfig vp2040_mantis_config = {
28 .model_name = MANTIS_MODEL_NAME,
29 .dev_type = MANTIS_DEV_TYPE,
30 .ts_size = MANTIS_TS_204,
31};
32
33struct tda1002x_config tda10023_cu1216_config = {
34 .demod_address = 0x18 >> 1,
35 .invert = 1,
36};
diff --git a/drivers/media/dvb/mantis/mantis_vp2040.h b/drivers/media/dvb/mantis/mantis_vp2040.h
new file mode 100644
index 00000000000..825ccbb87ad
--- /dev/null
+++ b/drivers/media/dvb/mantis/mantis_vp2040.h
@@ -0,0 +1,33 @@
1/*
2 Mantis VP-2040 driver
3
4 Copyright (C) Manu Abraham (abraham.manu@gmail.com)
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21#ifndef __MANTIS_VP2040_H
22#define __MANTIS_VP2040_H
23
24#include "dvb_frontend.h"
25#include "mantis_common.h"
26#include "tda1002x.h"
27
28#define TERRATEC_CINERGY_C_PCI 0x1178
29
30extern struct tda1002x_config tda10023_cu1216_config;
31extern struct mantis_hwconfig vp2040_mantis_config;
32
33#endif //__MANTIS_VP2040_H