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