diff options
author | Manu Abraham <abraham.manu@gmail.com> | 2009-12-04 03:39:57 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-01-17 08:55:42 -0500 |
commit | add206368462434ba97e8fe4de98e5d47ffdb0a0 (patch) | |
tree | 04ab626b19b2c74683500ec26abd6af1b074ea37 /drivers | |
parent | ec1b6ff1cce9d406a9a5f84a1d1205328f2c515a (diff) |
V4L/DVB (13794): [Mantis/VP-3028] Initial go at Serial interface implementation, add support for VP-3028
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/Makefile | 2 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_common.h | 10 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_core.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_pci.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_uart.c | 139 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_uart.h | 25 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp1033.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp1034.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp1041.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp2033.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp2040.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp3028.c | 38 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp3028.h | 13 | ||||
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp3030.c | 3 |
14 files changed, 253 insertions, 2 deletions
diff --git a/drivers/media/dvb/mantis/Makefile b/drivers/media/dvb/mantis/Makefile index d002ef9f7449..bb88cdc98ce0 100644 --- a/drivers/media/dvb/mantis/Makefile +++ b/drivers/media/dvb/mantis/Makefile | |||
@@ -1,4 +1,5 @@ | |||
1 | mantis-objs = mantis_core.o \ | 1 | mantis-objs = mantis_core.o \ |
2 | mantis_uart.o \ | ||
2 | mantis_dma.o \ | 3 | mantis_dma.o \ |
3 | mantis_pci.o \ | 4 | mantis_pci.o \ |
4 | mantis_i2c.o \ | 5 | mantis_i2c.o \ |
@@ -12,6 +13,7 @@ mantis-objs = mantis_core.o \ | |||
12 | mantis_vp1041.o \ | 13 | mantis_vp1041.o \ |
13 | mantis_vp2033.o \ | 14 | mantis_vp2033.o \ |
14 | mantis_vp2040.o \ | 15 | mantis_vp2040.o \ |
16 | mantis_vp3028.o \ | ||
15 | mantis_vp3030.o | 17 | mantis_vp3030.o |
16 | 18 | ||
17 | obj-$(CONFIG_DVB_MANTIS) += mantis.o | 19 | obj-$(CONFIG_DVB_MANTIS) += mantis.o |
diff --git a/drivers/media/dvb/mantis/mantis_common.h b/drivers/media/dvb/mantis/mantis_common.h index 6b9f92b4ab39..6a02adf1ab4d 100644 --- a/drivers/media/dvb/mantis/mantis_common.h +++ b/drivers/media/dvb/mantis/mantis_common.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/mutex.h> | 28 | #include <linux/mutex.h> |
29 | #include <linux/workqueue.h> | ||
29 | 30 | ||
30 | #include "dvbdev.h" | 31 | #include "dvbdev.h" |
31 | #include "dvb_demux.h" | 32 | #include "dvb_demux.h" |
@@ -34,6 +35,7 @@ | |||
34 | #include "dvb_net.h" | 35 | #include "dvb_net.h" |
35 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
36 | #include "mantis_reg.h" | 37 | #include "mantis_reg.h" |
38 | #include "mantis_uart.h" | ||
37 | 39 | ||
38 | #include "mantis_link.h" | 40 | #include "mantis_link.h" |
39 | 41 | ||
@@ -74,6 +76,10 @@ struct mantis_hwconfig { | |||
74 | char *model_name; | 76 | char *model_name; |
75 | char *dev_type; | 77 | char *dev_type; |
76 | u32 ts_size; | 78 | u32 ts_size; |
79 | |||
80 | enum mantis_baud baud_rate; | ||
81 | enum mantis_parity parity; | ||
82 | u32 bytes; | ||
77 | }; | 83 | }; |
78 | 84 | ||
79 | struct mantis_pci { | 85 | struct mantis_pci { |
@@ -142,6 +148,10 @@ struct mantis_pci { | |||
142 | u32 gpif_status; | 148 | u32 gpif_status; |
143 | 149 | ||
144 | struct mantis_ca *mantis_ca; | 150 | struct mantis_ca *mantis_ca; |
151 | |||
152 | wait_queue_head_t uart_wq; | ||
153 | struct work_struct uart_work; | ||
154 | spinlock_t uart_lock; | ||
145 | }; | 155 | }; |
146 | 156 | ||
147 | #define MANTIS_HIF_STATUS (mantis->gpio_status) | 157 | #define MANTIS_HIF_STATUS (mantis->gpio_status) |
diff --git a/drivers/media/dvb/mantis/mantis_core.c b/drivers/media/dvb/mantis/mantis_core.c index c3d0d53bc381..52b3e9ebfcfa 100644 --- a/drivers/media/dvb/mantis/mantis_core.c +++ b/drivers/media/dvb/mantis/mantis_core.c | |||
@@ -165,6 +165,10 @@ int mantis_core_init(struct mantis_pci *mantis) | |||
165 | dprintk(verbose, MANTIS_DEBUG, 1, "Mantis DVB init failed"); | 165 | dprintk(verbose, MANTIS_DEBUG, 1, "Mantis DVB init failed"); |
166 | return err; | 166 | return err; |
167 | } | 167 | } |
168 | if ((err = mantis_uart_init(mantis)) < 0) { | ||
169 | dprintk(verbose, MANTIS_DEBUG, 1, "Mantis UART init failed"); | ||
170 | return err; | ||
171 | } | ||
168 | 172 | ||
169 | return 0; | 173 | return 0; |
170 | } | 174 | } |
@@ -173,6 +177,10 @@ int mantis_core_exit(struct mantis_pci *mantis) | |||
173 | { | 177 | { |
174 | mantis_dma_stop(mantis); | 178 | mantis_dma_stop(mantis); |
175 | dprintk(verbose, MANTIS_ERROR, 1, "DMA engine stopping"); | 179 | dprintk(verbose, MANTIS_ERROR, 1, "DMA engine stopping"); |
180 | |||
181 | mantis_uart_exit(mantis); | ||
182 | dprintk(verbose, MANTIS_ERROR, 1, "UART exit failed"); | ||
183 | |||
176 | if (mantis_dma_exit(mantis) < 0) | 184 | if (mantis_dma_exit(mantis) < 0) |
177 | dprintk(verbose, MANTIS_ERROR, 1, "DMA exit failed"); | 185 | dprintk(verbose, MANTIS_ERROR, 1, "DMA exit failed"); |
178 | if (mantis_dvb_exit(mantis) < 0) | 186 | if (mantis_dvb_exit(mantis) < 0) |
diff --git a/drivers/media/dvb/mantis/mantis_pci.c b/drivers/media/dvb/mantis/mantis_pci.c index 94abcee3fc72..d1eac4083fcc 100644 --- a/drivers/media/dvb/mantis/mantis_pci.c +++ b/drivers/media/dvb/mantis/mantis_pci.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include "mantis_common.h" | 28 | #include "mantis_common.h" |
29 | #include "mantis_core.h" | 29 | #include "mantis_core.h" |
30 | #include "mantis_uart.h" | ||
30 | 31 | ||
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
32 | #include <linux/signal.h> | 33 | #include <linux/signal.h> |
@@ -94,6 +95,7 @@ static irqreturn_t mantis_pci_irq(int irq, void *dev_id) | |||
94 | } | 95 | } |
95 | if (stat & MANTIS_INT_IRQ1) { | 96 | if (stat & MANTIS_INT_IRQ1) { |
96 | dprintk(verbose, MANTIS_DEBUG, 0, "* INT IRQ-1 *"); | 97 | dprintk(verbose, MANTIS_DEBUG, 0, "* INT IRQ-1 *"); |
98 | schedule_work(&mantis->uart_work); | ||
97 | } | 99 | } |
98 | if (stat & MANTIS_INT_OCERR) { | 100 | if (stat & MANTIS_INT_OCERR) { |
99 | dprintk(verbose, MANTIS_DEBUG, 0, "* INT OCERR *"); | 101 | dprintk(verbose, MANTIS_DEBUG, 0, "* INT OCERR *"); |
diff --git a/drivers/media/dvb/mantis/mantis_uart.c b/drivers/media/dvb/mantis/mantis_uart.c new file mode 100644 index 000000000000..786fcc339117 --- /dev/null +++ b/drivers/media/dvb/mantis/mantis_uart.c | |||
@@ -0,0 +1,139 @@ | |||
1 | #include <linux/spinlock.h> | ||
2 | #include "mantis_common.h" | ||
3 | |||
4 | struct mantis_uart_params { | ||
5 | enum mantis_baud baud_rate; | ||
6 | enum mantis_parity parity; | ||
7 | }; | ||
8 | |||
9 | #define UART_MAX_BUF 16 | ||
10 | |||
11 | int mantis_uart_read(struct mantis_pci *mantis, u8 *data) | ||
12 | { | ||
13 | struct mantis_hwconfig *config = mantis->hwconfig; | ||
14 | u32 stat, i; | ||
15 | unsigned long flags; | ||
16 | |||
17 | /* get data */ | ||
18 | for (i = 0; i < (config->bytes + 1); i++) { | ||
19 | |||
20 | if (stat & MANTIS_UART_RXFIFO_FULL) { | ||
21 | dprintk(verbose, MANTIS_ERROR, 1, "RX Fifo FULL"); | ||
22 | } | ||
23 | data[i] = mmread(MANTIS_UART_RXD) & 0x3f; | ||
24 | |||
25 | stat = mmread(MANTIS_UART_STAT); | ||
26 | |||
27 | dprintk(verbose, MANTIS_DEBUG, 1, "Reading ... <%02x>", data[i] & 0x3f); | ||
28 | |||
29 | if (data[i] & (1 << 7)) { | ||
30 | dprintk(verbose, MANTIS_ERROR, 1, "UART framing error"); | ||
31 | return -EINVAL; | ||
32 | } | ||
33 | if (data[i] & (1 << 6)) { | ||
34 | dprintk(verbose, MANTIS_ERROR, 1, "UART parity error"); | ||
35 | return -EINVAL; | ||
36 | } | ||
37 | } | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | static void mantis_uart_work(struct work_struct *work) | ||
43 | { | ||
44 | struct mantis_pci *mantis = container_of(work, struct mantis_pci, uart_work); | ||
45 | struct mantis_hwconfig *config = mantis->hwconfig; | ||
46 | u8 buf[16]; | ||
47 | int i; | ||
48 | |||
49 | dprintk(verbose, MANTIS_DEBUG, 1, "UART read"); | ||
50 | mantis_uart_read(mantis, buf); | ||
51 | |||
52 | dprintk(verbose, MANTIS_DEBUG, 1, "UART: "); | ||
53 | for (i = 0; i < (config->bytes + 1); i++) | ||
54 | dprintk(verbose, MANTIS_DEBUG, 0, "<%02x> ", buf[i]); | ||
55 | |||
56 | dprintk(verbose, MANTIS_DEBUG, 0, "\n"); | ||
57 | } | ||
58 | |||
59 | static int mantis_uart_setup(struct mantis_pci *mantis, | ||
60 | struct mantis_uart_params *params) | ||
61 | { | ||
62 | char* rates[] = { "B_9600", "B_19200", "B_38400", "B_57600", "B_115200" }; | ||
63 | char* parity[] = { "NONE", "ODD", "EVEN" }; | ||
64 | |||
65 | u32 reg; | ||
66 | |||
67 | dprintk(verbose, MANTIS_DEBUG, 1, "Set Parity <%s> Baud Rate <%s>", | ||
68 | parity[params->parity], | ||
69 | rates[params->baud_rate]); | ||
70 | |||
71 | mmwrite((mmread(MANTIS_UART_CTL) | (params->parity & 0x3)), MANTIS_UART_CTL); | ||
72 | |||
73 | reg = mmread(MANTIS_UART_BAUD); | ||
74 | |||
75 | switch (params->baud_rate) { | ||
76 | case MANTIS_BAUD_9600: | ||
77 | reg |= 0xd8; | ||
78 | break; | ||
79 | case MANTIS_BAUD_19200: | ||
80 | reg |= 0x6c; | ||
81 | break; | ||
82 | case MANTIS_BAUD_38400: | ||
83 | reg |= 0x36; | ||
84 | break; | ||
85 | case MANTIS_BAUD_57600: | ||
86 | reg |= 0x23; | ||
87 | break; | ||
88 | case MANTIS_BAUD_115200: | ||
89 | reg |= 0x11; | ||
90 | break; | ||
91 | default: | ||
92 | return -EINVAL; | ||
93 | } | ||
94 | |||
95 | mmwrite(reg, MANTIS_UART_BAUD); | ||
96 | |||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | int mantis_uart_init(struct mantis_pci *mantis) | ||
101 | { | ||
102 | struct mantis_hwconfig *config = mantis->hwconfig; | ||
103 | struct mantis_uart_params params; | ||
104 | |||
105 | dprintk(verbose, MANTIS_DEBUG, 1, "Initializing UART .."); | ||
106 | /* default parity: */ | ||
107 | params.baud_rate = config->baud_rate; | ||
108 | params.parity = config->parity; | ||
109 | |||
110 | init_waitqueue_head(&mantis->uart_wq); | ||
111 | spin_lock_init(&mantis->uart_lock); | ||
112 | |||
113 | INIT_WORK(&mantis->uart_work, mantis_uart_work); | ||
114 | |||
115 | /* disable interrupt */ | ||
116 | mmwrite(mmread(MANTIS_UART_CTL) & 0xffef, MANTIS_UART_CTL); | ||
117 | |||
118 | mantis_uart_setup(mantis, ¶ms); | ||
119 | |||
120 | /* default 1 byte */ | ||
121 | mmwrite((mmread(MANTIS_UART_BAUD) | (config->bytes << 8)), MANTIS_UART_BAUD); | ||
122 | |||
123 | /* flush buffer */ | ||
124 | mmwrite((mmread(MANTIS_UART_CTL) | MANTIS_UART_RXFLUSH), MANTIS_UART_CTL); | ||
125 | |||
126 | /* enable interrupt */ | ||
127 | mmwrite(mmread(MANTIS_INT_MASK) | 0x800, MANTIS_INT_MASK); | ||
128 | mmwrite(mmread(MANTIS_UART_CTL) | MANTIS_UART_RXINT, MANTIS_UART_CTL); | ||
129 | |||
130 | schedule_work(&mantis->uart_work); | ||
131 | |||
132 | return 0; | ||
133 | } | ||
134 | |||
135 | void mantis_uart_exit(struct mantis_pci *mantis) | ||
136 | { | ||
137 | /* disable interrupt */ | ||
138 | mmwrite(mmread(MANTIS_UART_CTL) & 0xffef, MANTIS_UART_CTL); | ||
139 | } | ||
diff --git a/drivers/media/dvb/mantis/mantis_uart.h b/drivers/media/dvb/mantis/mantis_uart.h index 61138639c366..e9f938d37c3a 100644 --- a/drivers/media/dvb/mantis/mantis_uart.h +++ b/drivers/media/dvb/mantis/mantis_uart.h | |||
@@ -21,6 +21,21 @@ | |||
21 | #ifndef __MANTIS_UART_H | 21 | #ifndef __MANTIS_UART_H |
22 | #define __MANTIS_UART_H | 22 | #define __MANTIS_UART_H |
23 | 23 | ||
24 | #define MANTIS_UART_CTL 0xe0 | ||
25 | #define MANTIS_UART_RXINT (1 << 4) | ||
26 | #define MANTIS_UART_RXFLUSH (1 << 2) | ||
27 | |||
28 | #define MANTIS_UART_RXD 0xe8 | ||
29 | #define MANTIS_UART_BAUD 0xec | ||
30 | |||
31 | #define MANTIS_UART_STAT 0xf0 | ||
32 | #define MANTIS_UART_RXFIFO_DATA (1 << 7) | ||
33 | #define MANTIS_UART_RXFIFO_EMPTY (1 << 6) | ||
34 | #define MANTIS_UART_RXFIFO_FULL (1 << 3) | ||
35 | #define MANTIS_UART_FRAME_ERR (1 << 2) | ||
36 | #define MANTIS_UART_PARITY_ERR (1 << 1) | ||
37 | #define MANTIS_UART_RXTHRESH_INT (1 << 0) | ||
38 | |||
24 | enum mantis_baud { | 39 | enum mantis_baud { |
25 | MANTIS_BAUD_9600 = 0, | 40 | MANTIS_BAUD_9600 = 0, |
26 | MANTIS_BAUD_19200, | 41 | MANTIS_BAUD_19200, |
@@ -30,9 +45,15 @@ enum mantis_baud { | |||
30 | }; | 45 | }; |
31 | 46 | ||
32 | enum mantis_parity { | 47 | enum mantis_parity { |
33 | MANTIS_PARITY_NONE = 0, | 48 | MANTIS_PARITY_UNDEFINED = 0, |
34 | MANTIS_PARITY_EVEN, | 49 | MANTIS_PARITY_EVEN, |
35 | MANTIS_PARITY_ODD | 50 | MANTIS_PARITY_ODD, |
51 | MANTIS_PARITY_NONE | ||
36 | }; | 52 | }; |
37 | 53 | ||
54 | struct mantis_pci; | ||
55 | |||
56 | extern int mantis_uart_init(struct mantis_pci *mantis); | ||
57 | extern void mantis_uart_exit(struct mantis_pci *mantis); | ||
58 | |||
38 | #endif // __MANTIS_UART_H | 59 | #endif // __MANTIS_UART_H |
diff --git a/drivers/media/dvb/mantis/mantis_vp1033.c b/drivers/media/dvb/mantis/mantis_vp1033.c index 797c4e0c7eac..64cdfb8b709b 100644 --- a/drivers/media/dvb/mantis/mantis_vp1033.c +++ b/drivers/media/dvb/mantis/mantis_vp1033.c | |||
@@ -88,6 +88,9 @@ struct mantis_hwconfig vp1033_mantis_config = { | |||
88 | .model_name = MANTIS_MODEL_NAME, | 88 | .model_name = MANTIS_MODEL_NAME, |
89 | .dev_type = MANTIS_DEV_TYPE, | 89 | .dev_type = MANTIS_DEV_TYPE, |
90 | .ts_size = MANTIS_TS_204, | 90 | .ts_size = MANTIS_TS_204, |
91 | .baud_rate = MANTIS_BAUD_9600, | ||
92 | .parity = MANTIS_PARITY_NONE, | ||
93 | .bytes = 0, | ||
91 | }; | 94 | }; |
92 | 95 | ||
93 | int lgtdqcs001f_tuner_set(struct dvb_frontend *fe, | 96 | int lgtdqcs001f_tuner_set(struct dvb_frontend *fe, |
diff --git a/drivers/media/dvb/mantis/mantis_vp1034.c b/drivers/media/dvb/mantis/mantis_vp1034.c index a2fe9d42d1e5..28f3420b2312 100644 --- a/drivers/media/dvb/mantis/mantis_vp1034.c +++ b/drivers/media/dvb/mantis/mantis_vp1034.c | |||
@@ -33,6 +33,9 @@ struct mantis_hwconfig vp1034_mantis_config = { | |||
33 | .model_name = MANTIS_MODEL_NAME, | 33 | .model_name = MANTIS_MODEL_NAME, |
34 | .dev_type = MANTIS_DEV_TYPE, | 34 | .dev_type = MANTIS_DEV_TYPE, |
35 | .ts_size = MANTIS_TS_204, | 35 | .ts_size = MANTIS_TS_204, |
36 | .baud_rate = MANTIS_BAUD_9600, | ||
37 | .parity = MANTIS_PARITY_NONE, | ||
38 | .bytes = 0, | ||
36 | }; | 39 | }; |
37 | 40 | ||
38 | int vp1034_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) | 41 | int vp1034_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) |
diff --git a/drivers/media/dvb/mantis/mantis_vp1041.c b/drivers/media/dvb/mantis/mantis_vp1041.c index 8eb1afdab113..90df80b80e11 100644 --- a/drivers/media/dvb/mantis/mantis_vp1041.c +++ b/drivers/media/dvb/mantis/mantis_vp1041.c | |||
@@ -31,6 +31,9 @@ struct mantis_hwconfig vp1041_mantis_config = { | |||
31 | .model_name = MANTIS_MODEL_NAME, | 31 | .model_name = MANTIS_MODEL_NAME, |
32 | .dev_type = MANTIS_DEV_TYPE, | 32 | .dev_type = MANTIS_DEV_TYPE, |
33 | .ts_size = MANTIS_TS_188, | 33 | .ts_size = MANTIS_TS_188, |
34 | .baud_rate = MANTIS_BAUD_9600, | ||
35 | .parity = MANTIS_PARITY_NONE, | ||
36 | .bytes = 0, | ||
34 | }; | 37 | }; |
35 | 38 | ||
36 | static const struct stb0899_s1_reg vp1041_stb0899_s1_init_1[] = { | 39 | static const struct stb0899_s1_reg vp1041_stb0899_s1_init_1[] = { |
diff --git a/drivers/media/dvb/mantis/mantis_vp2033.c b/drivers/media/dvb/mantis/mantis_vp2033.c index 4664d2959218..1171e69b7e64 100644 --- a/drivers/media/dvb/mantis/mantis_vp2033.c +++ b/drivers/media/dvb/mantis/mantis_vp2033.c | |||
@@ -28,6 +28,9 @@ struct mantis_hwconfig vp2033_mantis_config = { | |||
28 | .model_name = MANTIS_MODEL_NAME, | 28 | .model_name = MANTIS_MODEL_NAME, |
29 | .dev_type = MANTIS_DEV_TYPE, | 29 | .dev_type = MANTIS_DEV_TYPE, |
30 | .ts_size = MANTIS_TS_204, | 30 | .ts_size = MANTIS_TS_204, |
31 | .baud_rate = MANTIS_BAUD_9600, | ||
32 | .parity = MANTIS_PARITY_NONE, | ||
33 | .bytes = 0, | ||
31 | }; | 34 | }; |
32 | 35 | ||
33 | struct tda1002x_config philips_cu1216_config = { | 36 | struct tda1002x_config philips_cu1216_config = { |
diff --git a/drivers/media/dvb/mantis/mantis_vp2040.c b/drivers/media/dvb/mantis/mantis_vp2040.c index f77be7b6491f..ce73d6beb5c6 100644 --- a/drivers/media/dvb/mantis/mantis_vp2040.c +++ b/drivers/media/dvb/mantis/mantis_vp2040.c | |||
@@ -28,6 +28,9 @@ struct mantis_hwconfig vp2040_mantis_config = { | |||
28 | .model_name = MANTIS_MODEL_NAME, | 28 | .model_name = MANTIS_MODEL_NAME, |
29 | .dev_type = MANTIS_DEV_TYPE, | 29 | .dev_type = MANTIS_DEV_TYPE, |
30 | .ts_size = MANTIS_TS_204, | 30 | .ts_size = MANTIS_TS_204, |
31 | .baud_rate = MANTIS_BAUD_9600, | ||
32 | .parity = MANTIS_PARITY_NONE, | ||
33 | .bytes = 0, | ||
31 | }; | 34 | }; |
32 | 35 | ||
33 | struct tda10023_config tda10023_cu1216_config = { | 36 | struct tda10023_config tda10023_cu1216_config = { |
diff --git a/drivers/media/dvb/mantis/mantis_vp3028.c b/drivers/media/dvb/mantis/mantis_vp3028.c new file mode 100644 index 000000000000..7f8918c2ce64 --- /dev/null +++ b/drivers/media/dvb/mantis/mantis_vp3028.c | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | Mantis VP-3028 driver | ||
3 | |||
4 | Copyright (C) 2005, 2006 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_vp3028.h" | ||
23 | |||
24 | struct zl10353_config mantis_vp3028_config = { | ||
25 | .demod_address = 0x0f, | ||
26 | }; | ||
27 | |||
28 | #define MANTIS_MODEL_NAME "VP-3028" | ||
29 | #define MANTIS_DEV_TYPE "DVB-T" | ||
30 | |||
31 | struct mantis_hwconfig vp3028_mantis_config = { | ||
32 | .model_name = MANTIS_MODEL_NAME, | ||
33 | .dev_type = MANTIS_DEV_TYPE, | ||
34 | .ts_size = MANTIS_TS_188, | ||
35 | .baud_rate = MANTIS_BAUD_9600, | ||
36 | .parity = MANTIS_PARITY_NONE, | ||
37 | .bytes = 0, | ||
38 | }; | ||
diff --git a/drivers/media/dvb/mantis/mantis_vp3028.h b/drivers/media/dvb/mantis/mantis_vp3028.h new file mode 100644 index 000000000000..c51628ddf3c8 --- /dev/null +++ b/drivers/media/dvb/mantis/mantis_vp3028.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef __MANTIS_VP3028_H | ||
2 | #define __MANTIS_VP3028_H | ||
3 | |||
4 | #include "dvb_frontend.h" | ||
5 | #include "mantis_common.h" | ||
6 | #include "zl10353.h" | ||
7 | |||
8 | #define MANTIS_VP_3028_DVB_T 0x0028 | ||
9 | |||
10 | extern struct zl10353_config mantis_vp3028_config; | ||
11 | extern struct mantis_hwconfig vp3028_mantis_config; | ||
12 | |||
13 | #endif /* __MANTIS_VP3028_H */ | ||
diff --git a/drivers/media/dvb/mantis/mantis_vp3030.c b/drivers/media/dvb/mantis/mantis_vp3030.c index cab092ce2306..9ca8040489dd 100644 --- a/drivers/media/dvb/mantis/mantis_vp3030.c +++ b/drivers/media/dvb/mantis/mantis_vp3030.c | |||
@@ -32,6 +32,9 @@ struct mantis_hwconfig vp3030_mantis_config = { | |||
32 | .model_name = MANTIS_MODEL_NAME, | 32 | .model_name = MANTIS_MODEL_NAME, |
33 | .dev_type = MANTIS_DEV_TYPE, | 33 | .dev_type = MANTIS_DEV_TYPE, |
34 | .ts_size = MANTIS_TS_188, | 34 | .ts_size = MANTIS_TS_188, |
35 | .baud_rate = MANTIS_BAUD_9600, | ||
36 | .parity = MANTIS_PARITY_NONE, | ||
37 | .bytes = 0, | ||
35 | }; | 38 | }; |
36 | 39 | ||
37 | int panasonic_en57h12d5_set_params(struct dvb_frontend *fe, | 40 | int panasonic_en57h12d5_set_params(struct dvb_frontend *fe, |