1 /* 2 * Driver for the Conexant CX25821 PCIe bridge 3 * 4 * Copyright (C) 2009 Conexant Systems Inc. 5 * Authors <shu.lin@conexant.com>, <hiep.huynh@conexant.com> 6 * Based on Steven Toth <stoth@linuxtv.org> cx23885 driver 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * 17 * GNU General Public License for more details. 18 */ 19 20 #ifndef CX25821_VIDEO_H_ 21 #define CX25821_VIDEO_H_ 22 23 #include <linux/init.h> 24 #include <linux/list.h> 25 #include <linux/module.h> 26 #include <linux/moduleparam.h> 27 #include <linux/kmod.h> 28 #include <linux/kernel.h> 29 #include <linux/slab.h> 30 #include <linux/interrupt.h> 31 #include <linux/delay.h> 32 #include <linux/kthread.h> 33 #include <asm/div64.h> 34 35 #include "cx25821.h" 36 #include <media/v4l2-common.h> 37 #include <media/v4l2-ioctl.h> 38 #include <media/v4l2-event.h> 39 40 #define VIDEO_DEBUG 0 41 42 #define dprintk(level, fmt, arg...) \ 43 do { \ 44 if (VIDEO_DEBUG >= level) \ 45 printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \ 46 } while (0) 47 48 #define FORMAT_FLAGS_PACKED 0x01 49 extern void cx25821_video_wakeup(struct cx25821_dev *dev, 50 struct cx25821_dmaqueue *q, u32 count); 51 52 extern int cx25821_start_video_dma(struct cx25821_dev *dev, 53 struct cx25821_dmaqueue *q, 54 struct cx25821_buffer *buf, 55 const struct sram_channel *channel); 56 57 extern int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status); 58 extern void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num); 59 extern int cx25821_video_register(struct cx25821_dev *dev); 60 61 #endif 62