linux/drivers/media/usb/go7007/go7007-v4l2.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2005-2006 Micronas USA Inc.
 */

#include <linux/module.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/unistd.h>
#include <linux/time.h>
#include <linux/vmalloc.h>
#include <linux/pagemap.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/uaccess.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-subdev.h>
#include <media/v4l2-event.h>
#include <media/videobuf2-vmalloc.h>
#include <media/i2c/saa7115.h>

#include "go7007-priv.h"

#define call_all(dev, o, f, args...)

static bool valid_pixelformat(u32 pixelformat)
{}

static u32 get_frame_type_flag(struct go7007_buffer *vb, int format)
{}

static void get_resolution(struct go7007 *go, int *width, int *height)
{}

static void set_formatting(struct go7007 *go)
{}

static int set_capture_size(struct go7007 *go, struct v4l2_format *fmt, int try)
{}

static int vidioc_querycap(struct file *file, void  *priv,
					struct v4l2_capability *cap)
{}

static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
					struct v4l2_fmtdesc *fmt)
{}

static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
					struct v4l2_format *fmt)
{}

static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
			struct v4l2_format *fmt)
{}

static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
			struct v4l2_format *fmt)
{}

static int go7007_queue_setup(struct vb2_queue *q,
		unsigned int *num_buffers, unsigned int *num_planes,
		unsigned int sizes[], struct device *alloc_devs[])
{}

static void go7007_buf_queue(struct vb2_buffer *vb)
{}

static int go7007_buf_prepare(struct vb2_buffer *vb)
{}

static void go7007_buf_finish(struct vb2_buffer *vb)
{}

static int go7007_start_streaming(struct vb2_queue *q, unsigned int count)
{}

static void go7007_stop_streaming(struct vb2_queue *q)
{}

static const struct vb2_ops go7007_video_qops =;

static int vidioc_g_parm(struct file *filp, void *priv,
		struct v4l2_streamparm *parm)
{}

static int vidioc_s_parm(struct file *filp, void *priv,
		struct v4l2_streamparm *parm)
{}

/* VIDIOC_ENUMSTD on go7007 were used for enumerating the supported fps and
   its resolution, when the device is not connected to TV.
   This is were an API abuse, probably used by the lack of specific IOCTL's to
   enumerate it, by the time the driver was written.

   However, since kernel 2.6.19, two new ioctls (VIDIOC_ENUM_FRAMEINTERVALS
   and VIDIOC_ENUM_FRAMESIZES) were added for this purpose.

   The two functions below implement the newer ioctls
*/
static int vidioc_enum_framesizes(struct file *filp, void *priv,
				  struct v4l2_frmsizeenum *fsize)
{}

static int vidioc_enum_frameintervals(struct file *filp, void *priv,
				      struct v4l2_frmivalenum *fival)
{}

static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *std)
{}

static int go7007_s_std(struct go7007 *go)
{}

static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id std)
{}

static int vidioc_querystd(struct file *file, void *priv, v4l2_std_id *std)
{}

static int vidioc_enum_input(struct file *file, void *priv,
				struct v4l2_input *inp)
{}


static int vidioc_g_input(struct file *file, void *priv, unsigned int *input)
{}

static int vidioc_enumaudio(struct file *file, void *fh, struct v4l2_audio *a)
{}

static int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a)
{}

static int vidioc_s_audio(struct file *file, void *fh,
	const struct v4l2_audio *a)
{}

static void go7007_s_input(struct go7007 *go)
{}

static int vidioc_s_input(struct file *file, void *priv, unsigned int input)
{}

static int vidioc_g_tuner(struct file *file, void *priv,
				struct v4l2_tuner *t)
{}

static int vidioc_s_tuner(struct file *file, void *priv,
				const struct v4l2_tuner *t)
{}

static int vidioc_g_frequency(struct file *file, void *priv,
				struct v4l2_frequency *f)
{}

static int vidioc_s_frequency(struct file *file, void *priv,
				const struct v4l2_frequency *f)
{}

static int vidioc_log_status(struct file *file, void *priv)
{}

static int vidioc_subscribe_event(struct v4l2_fh *fh,
				const struct v4l2_event_subscription *sub)
{}


static int go7007_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_file_operations go7007_fops =;

static const struct v4l2_ioctl_ops video_ioctl_ops =;

static const struct video_device go7007_template =;

static const struct v4l2_ctrl_ops go7007_ctrl_ops =;

static const struct v4l2_ctrl_config go7007_pixel_threshold0_ctrl =;

static const struct v4l2_ctrl_config go7007_motion_threshold0_ctrl =;

static const struct v4l2_ctrl_config go7007_mb_threshold0_ctrl =;

static const struct v4l2_ctrl_config go7007_pixel_threshold1_ctrl =;

static const struct v4l2_ctrl_config go7007_motion_threshold1_ctrl =;

static const struct v4l2_ctrl_config go7007_mb_threshold1_ctrl =;

static const struct v4l2_ctrl_config go7007_pixel_threshold2_ctrl =;

static const struct v4l2_ctrl_config go7007_motion_threshold2_ctrl =;

static const struct v4l2_ctrl_config go7007_mb_threshold2_ctrl =;

static const struct v4l2_ctrl_config go7007_pixel_threshold3_ctrl =;

static const struct v4l2_ctrl_config go7007_motion_threshold3_ctrl =;

static const struct v4l2_ctrl_config go7007_mb_threshold3_ctrl =;

static const struct v4l2_ctrl_config go7007_mb_regions_ctrl =;

int go7007_v4l2_ctrl_init(struct go7007 *go)
{}

int go7007_v4l2_init(struct go7007 *go)
{}

void go7007_v4l2_remove(struct go7007 *go)
{}