2019-05-27 14:55:06 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2009-09-15 22:33:54 +08:00
|
|
|
/*
|
|
|
|
* Driver for the Conexant CX25821 PCIe bridge
|
|
|
|
*
|
2009-09-13 22:25:45 +08:00
|
|
|
* Copyright (C) 2009 Conexant Systems Inc.
|
2009-09-15 22:33:54 +08:00
|
|
|
* Authors <shu.lin@conexant.com>, <hiep.huynh@conexant.com>
|
|
|
|
* Based on Steven Toth <stoth@linuxtv.org> cx23885 driver
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CX25821_VIDEO_H_
|
|
|
|
#define CX25821_VIDEO_H_
|
|
|
|
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/list.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/moduleparam.h>
|
|
|
|
#include <linux/kmod.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/slab.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/delay.h>
|
|
|
|
#include <linux/kthread.h>
|
|
|
|
#include <asm/div64.h>
|
|
|
|
|
|
|
|
#include "cx25821.h"
|
|
|
|
#include <media/v4l2-common.h>
|
|
|
|
#include <media/v4l2-ioctl.h>
|
2013-04-14 22:57:18 +08:00
|
|
|
#include <media/v4l2-event.h>
|
2009-09-15 22:33:54 +08:00
|
|
|
|
|
|
|
#define VIDEO_DEBUG 0
|
|
|
|
|
2010-11-08 04:48:21 +08:00
|
|
|
#define dprintk(level, fmt, arg...) \
|
|
|
|
do { \
|
|
|
|
if (VIDEO_DEBUG >= level) \
|
|
|
|
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \
|
|
|
|
} while (0)
|
2009-09-15 22:33:54 +08:00
|
|
|
|
|
|
|
#define FORMAT_FLAGS_PACKED 0x01
|
2009-09-13 22:30:11 +08:00
|
|
|
extern void cx25821_video_wakeup(struct cx25821_dev *dev,
|
|
|
|
struct cx25821_dmaqueue *q, u32 count);
|
2009-09-15 22:33:54 +08:00
|
|
|
|
|
|
|
extern int cx25821_start_video_dma(struct cx25821_dev *dev,
|
2009-09-13 22:30:11 +08:00
|
|
|
struct cx25821_dmaqueue *q,
|
|
|
|
struct cx25821_buffer *buf,
|
2013-04-13 17:28:54 +08:00
|
|
|
const struct sram_channel *channel);
|
2009-09-15 22:33:54 +08:00
|
|
|
|
|
|
|
extern int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status);
|
|
|
|
extern void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num);
|
2010-07-05 01:15:38 +08:00
|
|
|
extern int cx25821_video_register(struct cx25821_dev *dev);
|
2011-09-16 14:15:17 +08:00
|
|
|
|
2009-09-15 22:33:54 +08:00
|
|
|
#endif
|