#include <linux/module.h>
#include <linux/stringify.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/slab.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-common.h>
#include <media/videobuf2-dma-contig.h>
#include "dt3155.h"
#define DT3155_DEVICE_ID …
static int read_i2c_reg(void __iomem *addr, u8 index, u8 *data)
{ … }
static int write_i2c_reg(void __iomem *addr, u8 index, u8 data)
{ … }
static void write_i2c_reg_nowait(void __iomem *addr, u8 index, u8 data)
{ … }
static int wait_i2c_reg(void __iomem *addr)
{ … }
static int
dt3155_queue_setup(struct vb2_queue *vq,
unsigned int *nbuffers, unsigned int *num_planes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int dt3155_buf_prepare(struct vb2_buffer *vb)
{ … }
static int dt3155_start_streaming(struct vb2_queue *q, unsigned count)
{ … }
static void dt3155_stop_streaming(struct vb2_queue *q)
{ … }
static void dt3155_buf_queue(struct vb2_buffer *vb)
{ … }
static const struct vb2_ops q_ops = …;
static irqreturn_t dt3155_irq_handler_even(int irq, void *dev_id)
{ … }
static const struct v4l2_file_operations dt3155_fops = …;
static int dt3155_querycap(struct file *filp, void *p,
struct v4l2_capability *cap)
{ … }
static int dt3155_enum_fmt_vid_cap(struct file *filp,
void *p, struct v4l2_fmtdesc *f)
{ … }
static int dt3155_fmt_vid_cap(struct file *filp, void *p, struct v4l2_format *f)
{ … }
static int dt3155_g_std(struct file *filp, void *p, v4l2_std_id *norm)
{ … }
static int dt3155_s_std(struct file *filp, void *p, v4l2_std_id norm)
{ … }
static int dt3155_enum_input(struct file *filp, void *p,
struct v4l2_input *input)
{ … }
static int dt3155_g_input(struct file *filp, void *p, unsigned int *i)
{ … }
static int dt3155_s_input(struct file *filp, void *p, unsigned int i)
{ … }
static const struct v4l2_ioctl_ops dt3155_ioctl_ops = …;
static int dt3155_init_board(struct dt3155_priv *pd)
{ … }
static const struct video_device dt3155_vdev = …;
static int dt3155_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{ … }
static void dt3155_remove(struct pci_dev *pdev)
{ … }
static const struct pci_device_id pci_ids[] = …;
MODULE_DEVICE_TABLE(pci, pci_ids);
static struct pci_driver pci_driver = …;
module_pci_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_VERSION(…);
MODULE_LICENSE(…) …;