1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  *  Driver for the Conexant CX25821 PCIe bridge
4  *
5  *  Copyright (C) 2009 Conexant Systems Inc.
6  *  Authors  <shu.lin@conexant.com>, <hiep.huynh@conexant.com>
7  *  Based on Steven Toth <stoth@linuxtv.org> cx23885 driver
8  */
9 
10 #ifndef CX25821_VIDEO_H_
11 #define CX25821_VIDEO_H_
12 
13 #include <linux/init.h>
14 #include <linux/list.h>
15 #include <linux/module.h>
16 #include <linux/moduleparam.h>
17 #include <linux/kmod.h>
18 #include <linux/kernel.h>
19 #include <linux/slab.h>
20 #include <linux/interrupt.h>
21 #include <linux/delay.h>
22 #include <linux/kthread.h>
23 #include <asm/div64.h>
24 
25 #include "cx25821.h"
26 #include <media/v4l2-common.h>
27 #include <media/v4l2-ioctl.h>
28 #include <media/v4l2-event.h>
29 
30 #define VIDEO_DEBUG 0
31 
32 #define dprintk(level, fmt, arg...)					\
33 do {									\
34 	if (VIDEO_DEBUG >= level)					\
35 		printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg);	\
36 } while (0)
37 
38 #define FORMAT_FLAGS_PACKED       0x01
39 extern int cx25821_start_video_dma(struct cx25821_dev *dev,
40 				   struct cx25821_dmaqueue *q,
41 				   struct cx25821_buffer *buf,
42 				   const struct sram_channel *channel);
43 
44 extern int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status);
45 extern void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num);
46 extern int cx25821_video_register(struct cx25821_dev *dev);
47 
48 #endif
49