Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6] / drivers / media / dvb / ttpci / budget-core.c
1 /*
2  * budget-core.c: driver for the SAA7146 based Budget DVB cards
3  *
4  * Compiled from various sources by Michael Hunold <michael@mihu.de>
5  *
6  * Copyright (C) 2002 Ralph Metzler <rjkm@metzlerbros.de>
7  *
8  * Copyright (C) 1999-2002 Ralph  Metzler
9  *                       & Marcus Metzler for convergence integrated media GmbH
10  *
11  * 26feb2004 Support for FS Activy Card (Grundig tuner) by
12  *           Michael Dreher <michael@5dot1.de>,
13  *           Oliver Endriss <o.endriss@gmx.de>,
14  *           Andreas 'randy' Weinberger
15  *
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25  * GNU General Public License for more details.
26  *
27  *
28  * You should have received a copy of the GNU General Public License
29  * along with this program; if not, write to the Free Software
30  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
32  *
33  *
34  * the project's page is at http://www.linuxtv.org/dvb/
35  */
36
37
38 #include "budget.h"
39 #include "ttpci-eeprom.h"
40
41 #define TS_WIDTH                (2 * TS_SIZE)
42 #define TS_WIDTH_ACTIVY         TS_SIZE
43 #define TS_WIDTH_DVBC           TS_SIZE
44 #define TS_HEIGHT_MASK          0xf00
45 #define TS_HEIGHT_MASK_ACTIVY   0xc00
46 #define TS_HEIGHT_MASK_DVBC     0xe00
47 #define TS_MIN_BUFSIZE_K        188
48 #define TS_MAX_BUFSIZE_K        1410
49 #define TS_MAX_BUFSIZE_K_ACTIVY 564
50 #define TS_MAX_BUFSIZE_K_DVBC   1316
51 #define BUFFER_WARNING_WAIT     (30*HZ)
52
53 int budget_debug;
54 static int dma_buffer_size = TS_MIN_BUFSIZE_K;
55 module_param_named(debug, budget_debug, int, 0644);
56 module_param_named(bufsize, dma_buffer_size, int, 0444);
57 MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off).");
58 MODULE_PARM_DESC(bufsize, "DMA buffer size in KB, default: 188, min: 188, max: 1410 (Activy: 564)");
59
60 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
61
62 /****************************************************************************
63  * TT budget / WinTV Nova
64  ****************************************************************************/
65
66 static int stop_ts_capture(struct budget *budget)
67 {
68         dprintk(2, "budget: %p\n", budget);
69
70         saa7146_write(budget->dev, MC1, MASK_20);       // DMA3 off
71         SAA7146_IER_DISABLE(budget->dev, MASK_10);
72         return 0;
73 }
74
75 static int start_ts_capture(struct budget *budget)
76 {
77         struct saa7146_dev *dev = budget->dev;
78
79         dprintk(2, "budget: %p\n", budget);
80
81         if (!budget->feeding || !budget->fe_synced)
82                 return 0;
83
84         saa7146_write(dev, MC1, MASK_20);       // DMA3 off
85
86         memset(budget->grabbing, 0x00, budget->buffer_size);
87
88         saa7146_write(dev, PCI_BT_V1, 0x001c0000 | (saa7146_read(dev, PCI_BT_V1) & ~0x001f0000));
89
90         budget->ttbp = 0;
91
92         /*
93          *  Signal path on the Activy:
94          *
95          *  tuner -> SAA7146 port A -> SAA7146 BRS -> SAA7146 DMA3 -> memory
96          *
97          *  Since the tuner feeds 204 bytes packets into the SAA7146,
98          *  DMA3 is configured to strip the trailing 16 FEC bytes:
99          *      Pitch: 188, NumBytes3: 188, NumLines3: 1024
100          */
101
102         switch(budget->card->type) {
103         case BUDGET_FS_ACTIVY:
104                 saa7146_write(dev, DD1_INIT, 0x04000000);
105                 saa7146_write(dev, MC2, (MASK_09 | MASK_25));
106                 saa7146_write(dev, BRS_CTRL, 0x00000000);
107                 break;
108         case BUDGET_PATCH:
109                 saa7146_write(dev, DD1_INIT, 0x00000200);
110                 saa7146_write(dev, MC2, (MASK_10 | MASK_26));
111                 saa7146_write(dev, BRS_CTRL, 0x60000000);
112                 break;
113         case BUDGET_CIN1200C_MK3:
114         case BUDGET_KNC1C_MK3:
115         case BUDGET_KNC1CP_MK3:
116                 if (budget->video_port == BUDGET_VIDEO_PORTA) {
117                         saa7146_write(dev, DD1_INIT, 0x06000200);
118                         saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
119                         saa7146_write(dev, BRS_CTRL, 0x00000000);
120                 } else {
121                         saa7146_write(dev, DD1_INIT, 0x00000600);
122                         saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
123                         saa7146_write(dev, BRS_CTRL, 0x60000000);
124                 }
125                 break;
126         default:
127                 if (budget->video_port == BUDGET_VIDEO_PORTA) {
128                         saa7146_write(dev, DD1_INIT, 0x06000200);
129                         saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
130                         saa7146_write(dev, BRS_CTRL, 0x00000000);
131                 } else {
132                         saa7146_write(dev, DD1_INIT, 0x02000600);
133                         saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
134                         saa7146_write(dev, BRS_CTRL, 0x60000000);
135                 }
136         }
137
138         saa7146_write(dev, MC2, (MASK_08 | MASK_24));
139         mdelay(10);
140
141         saa7146_write(dev, BASE_ODD3, 0);
142         if (budget->buffer_size > budget->buffer_height * budget->buffer_width) {
143                 // using odd/even buffers
144                 saa7146_write(dev, BASE_EVEN3, budget->buffer_height * budget->buffer_width);
145         } else {
146                 // using a single buffer
147                 saa7146_write(dev, BASE_EVEN3, 0);
148         }
149         saa7146_write(dev, PROT_ADDR3, budget->buffer_size);
150         saa7146_write(dev, BASE_PAGE3, budget->pt.dma | ME1 | 0x90);
151
152         saa7146_write(dev, PITCH3, budget->buffer_width);
153         saa7146_write(dev, NUM_LINE_BYTE3,
154                         (budget->buffer_height << 16) | budget->buffer_width);
155
156         saa7146_write(dev, MC2, (MASK_04 | MASK_20));
157
158         SAA7146_ISR_CLEAR(budget->dev, MASK_10);        /* VPE */
159         SAA7146_IER_ENABLE(budget->dev, MASK_10);       /* VPE */
160         saa7146_write(dev, MC1, (MASK_04 | MASK_20));   /* DMA3 on */
161
162         return 0;
163 }
164
165 static int budget_read_fe_status(struct dvb_frontend *fe, fe_status_t *status)
166 {
167         struct budget *budget = (struct budget *) fe->dvb->priv;
168         int synced;
169         int ret;
170
171         if (budget->read_fe_status)
172                 ret = budget->read_fe_status(fe, status);
173         else
174                 ret = -EINVAL;
175
176         if (!ret) {
177                 synced = (*status & FE_HAS_LOCK);
178                 if (synced != budget->fe_synced) {
179                         budget->fe_synced = synced;
180                         spin_lock(&budget->feedlock);
181                         if (synced)
182                                 start_ts_capture(budget);
183                         else
184                                 stop_ts_capture(budget);
185                         spin_unlock(&budget->feedlock);
186                 }
187         }
188         return ret;
189 }
190
191 static void vpeirq(unsigned long data)
192 {
193         struct budget *budget = (struct budget *) data;
194         u8 *mem = (u8 *) (budget->grabbing);
195         u32 olddma = budget->ttbp;
196         u32 newdma = saa7146_read(budget->dev, PCI_VDP3);
197         u32 count;
198
199         /* Ensure streamed PCI data is synced to CPU */
200         pci_dma_sync_sg_for_cpu(budget->dev->pci, budget->pt.slist, budget->pt.nents, PCI_DMA_FROMDEVICE);
201
202         /* nearest lower position divisible by 188 */
203         newdma -= newdma % 188;
204
205         if (newdma >= budget->buffer_size)
206                 return;
207
208         budget->ttbp = newdma;
209
210         if (budget->feeding == 0 || newdma == olddma)
211                 return;
212
213         if (newdma > olddma) {  /* no wraparound, dump olddma..newdma */
214                 count = newdma - olddma;
215                 dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, count / 188);
216         } else {                /* wraparound, dump olddma..buflen and 0..newdma */
217                 count = budget->buffer_size - olddma;
218                 dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, count / 188);
219                 count += newdma;
220                 dvb_dmx_swfilter_packets(&budget->demux, mem, newdma / 188);
221         }
222
223         if (count > budget->buffer_warning_threshold)
224                 budget->buffer_warnings++;
225
226         if (budget->buffer_warnings && time_after(jiffies, budget->buffer_warning_time)) {
227                 printk("%s %s: used %d times >80%% of buffer (%u bytes now)\n",
228                         budget->dev->name, __func__, budget->buffer_warnings, count);
229                 budget->buffer_warning_time = jiffies + BUFFER_WARNING_WAIT;
230                 budget->buffer_warnings = 0;
231         }
232 }
233
234
235 int ttpci_budget_debiread(struct budget *budget, u32 config, int addr, int count,
236                           int uselocks, int nobusyloop)
237 {
238         struct saa7146_dev *saa = budget->dev;
239         int result = 0;
240         unsigned long flags = 0;
241
242         if (count > 4 || count <= 0)
243                 return 0;
244
245         if (uselocks)
246                 spin_lock_irqsave(&budget->debilock, flags);
247
248         if ((result = saa7146_wait_for_debi_done(saa, nobusyloop)) < 0) {
249                 if (uselocks)
250                         spin_unlock_irqrestore(&budget->debilock, flags);
251                 return result;
252         }
253
254         saa7146_write(saa, DEBI_COMMAND, (count << 17) | 0x10000 | (addr & 0xffff));
255         saa7146_write(saa, DEBI_CONFIG, config);
256         saa7146_write(saa, DEBI_PAGE, 0);
257         saa7146_write(saa, MC2, (2 << 16) | 2);
258
259         if ((result = saa7146_wait_for_debi_done(saa, nobusyloop)) < 0) {
260                 if (uselocks)
261                         spin_unlock_irqrestore(&budget->debilock, flags);
262                 return result;
263         }
264
265         result = saa7146_read(saa, DEBI_AD);
266         result &= (0xffffffffUL >> ((4 - count) * 8));
267
268         if (uselocks)
269                 spin_unlock_irqrestore(&budget->debilock, flags);
270
271         return result;
272 }
273
274 int ttpci_budget_debiwrite(struct budget *budget, u32 config, int addr,
275                            int count, u32 value, int uselocks, int nobusyloop)
276 {
277         struct saa7146_dev *saa = budget->dev;
278         unsigned long flags = 0;
279         int result;
280
281         if (count > 4 || count <= 0)
282                 return 0;
283
284         if (uselocks)
285                 spin_lock_irqsave(&budget->debilock, flags);
286
287         if ((result = saa7146_wait_for_debi_done(saa, nobusyloop)) < 0) {
288                 if (uselocks)
289                         spin_unlock_irqrestore(&budget->debilock, flags);
290                 return result;
291         }
292
293         saa7146_write(saa, DEBI_COMMAND, (count << 17) | 0x00000 | (addr & 0xffff));
294         saa7146_write(saa, DEBI_CONFIG, config);
295         saa7146_write(saa, DEBI_PAGE, 0);
296         saa7146_write(saa, DEBI_AD, value);
297         saa7146_write(saa, MC2, (2 << 16) | 2);
298
299         if ((result = saa7146_wait_for_debi_done(saa, nobusyloop)) < 0) {
300                 if (uselocks)
301                         spin_unlock_irqrestore(&budget->debilock, flags);
302                 return result;
303         }
304
305         if (uselocks)
306                 spin_unlock_irqrestore(&budget->debilock, flags);
307         return 0;
308 }
309
310
311 /****************************************************************************
312  * DVB API SECTION
313  ****************************************************************************/
314
315 static int budget_start_feed(struct dvb_demux_feed *feed)
316 {
317         struct dvb_demux *demux = feed->demux;
318         struct budget *budget = (struct budget *) demux->priv;
319         int status = 0;
320
321         dprintk(2, "budget: %p\n", budget);
322
323         if (!demux->dmx.frontend)
324                 return -EINVAL;
325
326         spin_lock(&budget->feedlock);
327         feed->pusi_seen = 0; /* have a clean section start */
328         if (budget->feeding++ == 0)
329                 status = start_ts_capture(budget);
330         spin_unlock(&budget->feedlock);
331         return status;
332 }
333
334 static int budget_stop_feed(struct dvb_demux_feed *feed)
335 {
336         struct dvb_demux *demux = feed->demux;
337         struct budget *budget = (struct budget *) demux->priv;
338         int status = 0;
339
340         dprintk(2, "budget: %p\n", budget);
341
342         spin_lock(&budget->feedlock);
343         if (--budget->feeding == 0)
344                 status = stop_ts_capture(budget);
345         spin_unlock(&budget->feedlock);
346         return status;
347 }
348
349 static int budget_register(struct budget *budget)
350 {
351         struct dvb_demux *dvbdemux = &budget->demux;
352         int ret;
353
354         dprintk(2, "budget: %p\n", budget);
355
356         dvbdemux->priv = (void *) budget;
357
358         dvbdemux->filternum = 256;
359         dvbdemux->feednum = 256;
360         dvbdemux->start_feed = budget_start_feed;
361         dvbdemux->stop_feed = budget_stop_feed;
362         dvbdemux->write_to_decoder = NULL;
363
364         dvbdemux->dmx.capabilities = (DMX_TS_FILTERING | DMX_SECTION_FILTERING |
365                                       DMX_MEMORY_BASED_FILTERING);
366
367         dvb_dmx_init(&budget->demux);
368
369         budget->dmxdev.filternum = 256;
370         budget->dmxdev.demux = &dvbdemux->dmx;
371         budget->dmxdev.capabilities = 0;
372
373         dvb_dmxdev_init(&budget->dmxdev, &budget->dvb_adapter);
374
375         budget->hw_frontend.source = DMX_FRONTEND_0;
376
377         ret = dvbdemux->dmx.add_frontend(&dvbdemux->dmx, &budget->hw_frontend);
378
379         if (ret < 0)
380                 return ret;
381
382         budget->mem_frontend.source = DMX_MEMORY_FE;
383         ret = dvbdemux->dmx.add_frontend(&dvbdemux->dmx, &budget->mem_frontend);
384         if (ret < 0)
385                 return ret;
386
387         ret = dvbdemux->dmx.connect_frontend(&dvbdemux->dmx, &budget->hw_frontend);
388         if (ret < 0)
389                 return ret;
390
391         dvb_net_init(&budget->dvb_adapter, &budget->dvb_net, &dvbdemux->dmx);
392
393         return 0;
394 }
395
396 static void budget_unregister(struct budget *budget)
397 {
398         struct dvb_demux *dvbdemux = &budget->demux;
399
400         dprintk(2, "budget: %p\n", budget);
401
402         dvb_net_release(&budget->dvb_net);
403
404         dvbdemux->dmx.close(&dvbdemux->dmx);
405         dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &budget->hw_frontend);
406         dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &budget->mem_frontend);
407
408         dvb_dmxdev_release(&budget->dmxdev);
409         dvb_dmx_release(&budget->demux);
410 }
411
412 int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
413                       struct saa7146_pci_extension_data *info,
414                       struct module *owner)
415 {
416         int ret = 0;
417         struct budget_info *bi = info->ext_priv;
418         int max_bufsize;
419         int height_mask;
420
421         memset(budget, 0, sizeof(struct budget));
422
423         dprintk(2, "dev: %p, budget: %p\n", dev, budget);
424
425         budget->card = bi;
426         budget->dev = (struct saa7146_dev *) dev;
427
428         switch(budget->card->type) {
429         case BUDGET_FS_ACTIVY:
430                 budget->buffer_width = TS_WIDTH_ACTIVY;
431                 max_bufsize = TS_MAX_BUFSIZE_K_ACTIVY;
432                 height_mask = TS_HEIGHT_MASK_ACTIVY;
433                 break;
434
435         case BUDGET_KNC1C:
436         case BUDGET_KNC1CP:
437         case BUDGET_CIN1200C:
438         case BUDGET_KNC1C_MK3:
439         case BUDGET_KNC1CP_MK3:
440         case BUDGET_CIN1200C_MK3:
441                 budget->buffer_width = TS_WIDTH_DVBC;
442                 max_bufsize = TS_MAX_BUFSIZE_K_DVBC;
443                 height_mask = TS_HEIGHT_MASK_DVBC;
444                 break;
445
446         default:
447                 budget->buffer_width = TS_WIDTH;
448                 max_bufsize = TS_MAX_BUFSIZE_K;
449                 height_mask = TS_HEIGHT_MASK;
450         }
451
452         if (dma_buffer_size < TS_MIN_BUFSIZE_K)
453                 dma_buffer_size = TS_MIN_BUFSIZE_K;
454         else if (dma_buffer_size > max_bufsize)
455                 dma_buffer_size = max_bufsize;
456
457         budget->buffer_height = dma_buffer_size * 1024 / budget->buffer_width;
458         if (budget->buffer_height > 0xfff) {
459                 budget->buffer_height /= 2;
460                 budget->buffer_height &= height_mask;
461                 budget->buffer_size = 2 * budget->buffer_height * budget->buffer_width;
462         } else {
463                 budget->buffer_height &= height_mask;
464                 budget->buffer_size = budget->buffer_height * budget->buffer_width;
465         }
466         budget->buffer_warning_threshold = budget->buffer_size * 80/100;
467         budget->buffer_warnings = 0;
468         budget->buffer_warning_time = jiffies;
469
470         dprintk(2, "%s: buffer type = %s, width = %d, height = %d\n",
471                 budget->dev->name,
472                 budget->buffer_size > budget->buffer_width * budget->buffer_height ? "odd/even" : "single",
473                 budget->buffer_width, budget->buffer_height);
474         printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size);
475
476         ret = dvb_register_adapter(&budget->dvb_adapter, budget->card->name,
477                                    owner, &budget->dev->pci->dev, adapter_nr);
478         if (ret < 0)
479                 return ret;
480
481         /* set dd1 stream a & b */
482         saa7146_write(dev, DD1_STREAM_B, 0x00000000);
483         saa7146_write(dev, MC2, (MASK_09 | MASK_25));
484         saa7146_write(dev, MC2, (MASK_10 | MASK_26));
485         saa7146_write(dev, DD1_INIT, 0x02000000);
486         saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
487
488         if (bi->type != BUDGET_FS_ACTIVY)
489                 budget->video_port = BUDGET_VIDEO_PORTB;
490         else
491                 budget->video_port = BUDGET_VIDEO_PORTA;
492         spin_lock_init(&budget->feedlock);
493         spin_lock_init(&budget->debilock);
494
495         /* the Siemens DVB needs this if you want to have the i2c chips
496            get recognized before the main driver is loaded */
497         if (bi->type != BUDGET_FS_ACTIVY)
498                 saa7146_write(dev, GPIO_CTRL, 0x500000);        /* GPIO 3 = 1 */
499
500         budget->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
501
502         strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->i2c_adap.name));
503
504         saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120);
505         strcpy(budget->i2c_adap.name, budget->card->name);
506
507         if (i2c_add_adapter(&budget->i2c_adap) < 0) {
508                 ret = -ENOMEM;
509                 goto err_dvb_unregister;
510         }
511
512         ttpci_eeprom_parse_mac(&budget->i2c_adap, budget->dvb_adapter.proposed_mac);
513
514         budget->grabbing = saa7146_vmalloc_build_pgtable(dev->pci, budget->buffer_size, &budget->pt);
515         if (NULL == budget->grabbing) {
516                 ret = -ENOMEM;
517                 goto err_del_i2c;
518         }
519
520         saa7146_write(dev, PCI_BT_V1, 0x001c0000);
521         /* upload all */
522         saa7146_write(dev, GPIO_CTRL, 0x000000);
523
524         tasklet_init(&budget->vpe_tasklet, vpeirq, (unsigned long) budget);
525
526         /* frontend power on */
527         if (bi->type != BUDGET_FS_ACTIVY)
528                 saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI);
529
530         if ((ret = budget_register(budget)) == 0)
531                 return 0; /* Everything OK */
532
533         /* An error occurred, cleanup resources */
534         saa7146_vfree_destroy_pgtable(dev->pci, budget->grabbing, &budget->pt);
535
536 err_del_i2c:
537         i2c_del_adapter(&budget->i2c_adap);
538
539 err_dvb_unregister:
540         dvb_unregister_adapter(&budget->dvb_adapter);
541
542         return ret;
543 }
544
545 void ttpci_budget_init_hooks(struct budget *budget)
546 {
547         if (budget->dvb_frontend && !budget->read_fe_status) {
548                 budget->read_fe_status = budget->dvb_frontend->ops.read_status;
549                 budget->dvb_frontend->ops.read_status = budget_read_fe_status;
550         }
551 }
552
553 int ttpci_budget_deinit(struct budget *budget)
554 {
555         struct saa7146_dev *dev = budget->dev;
556
557         dprintk(2, "budget: %p\n", budget);
558
559         budget_unregister(budget);
560
561         tasklet_kill(&budget->vpe_tasklet);
562
563         saa7146_vfree_destroy_pgtable(dev->pci, budget->grabbing, &budget->pt);
564
565         i2c_del_adapter(&budget->i2c_adap);
566
567         dvb_unregister_adapter(&budget->dvb_adapter);
568
569         return 0;
570 }
571
572 void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr)
573 {
574         struct budget *budget = (struct budget *) dev->ext_priv;
575
576         dprintk(8, "dev: %p, budget: %p\n", dev, budget);
577
578         if (*isr & MASK_10)
579                 tasklet_schedule(&budget->vpe_tasklet);
580 }
581
582 void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port)
583 {
584         struct budget *budget = (struct budget *) dev->ext_priv;
585
586         spin_lock(&budget->feedlock);
587         budget->video_port = video_port;
588         if (budget->feeding) {
589                 stop_ts_capture(budget);
590                 start_ts_capture(budget);
591         }
592         spin_unlock(&budget->feedlock);
593 }
594
595 EXPORT_SYMBOL_GPL(ttpci_budget_debiread);
596 EXPORT_SYMBOL_GPL(ttpci_budget_debiwrite);
597 EXPORT_SYMBOL_GPL(ttpci_budget_init);
598 EXPORT_SYMBOL_GPL(ttpci_budget_init_hooks);
599 EXPORT_SYMBOL_GPL(ttpci_budget_deinit);
600 EXPORT_SYMBOL_GPL(ttpci_budget_irq10_handler);
601 EXPORT_SYMBOL_GPL(ttpci_budget_set_video_port);
602 EXPORT_SYMBOL_GPL(budget_debug);
603
604 MODULE_LICENSE("GPL");