4 Copyright (C) Manu Abraham (abraham.manu@gmail.com)
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.
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.
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.
21 #include <linux/signal.h>
22 #include <linux/sched.h>
23 #include <linux/interrupt.h>
27 #include "dvb_demux.h"
28 #include "dvb_frontend.h"
33 #include "mantis_common.h"
34 #include "mantis_ioc.h"
35 #include "mantis_dvb.h"
36 #include "mantis_vp3030.h"
38 struct zl10353_config mantis_vp3030_config
= {
39 .demod_address
= 0x0f,
42 struct tda665x_config env57h12d5_config
= {
43 .name
= "ENV57H12D5 (ET-50DT)",
45 .frequency_min
= 47000000,
46 .frequency_max
= 862000000,
47 .frequency_offst
= 3616667,
48 .ref_multiplier
= 6, /* 1/6 MHz */
49 .ref_divider
= 100000, /* 1/6 MHz */
52 #define MANTIS_MODEL_NAME "VP-3030"
53 #define MANTIS_DEV_TYPE "DVB-T"
56 static int vp3030_frontend_init(struct mantis_pci
*mantis
, struct dvb_frontend
*fe
)
58 struct i2c_adapter
*adapter
= &mantis
->adapter
;
59 struct mantis_hwconfig
*config
= mantis
->hwconfig
;
62 mantis_gpio_set_bits(mantis
, config
->reset
, 0);
64 err
= mantis_frontend_power(mantis
, POWER_ON
);
66 mantis_gpio_set_bits(mantis
, config
->reset
, 1);
70 dprintk(MANTIS_ERROR
, 1, "Probing for 10353 (DVB-T)");
71 fe
= dvb_attach(zl10353_attach
, &mantis_vp3030_config
, adapter
);
76 dvb_attach(tda665x_attach
, fe
, &env57h12d5_config
, adapter
);
78 dprintk(MANTIS_ERROR
, 1, "Frontend on <%s> POWER ON failed! <%d>",
86 dprintk(MANTIS_ERROR
, 1, "Done!");
91 struct mantis_hwconfig vp3030_config
= {
92 .model_name
= MANTIS_MODEL_NAME
,
93 .dev_type
= MANTIS_DEV_TYPE
,
94 .ts_size
= MANTIS_TS_188
,
96 .baud_rate
= MANTIS_BAUD_9600
,
97 .parity
= MANTIS_PARITY_NONE
,
100 .frontend_init
= vp3030_frontend_init
,
104 .i2c_mode
= MANTIS_BYTE_MODE