linux/drivers/media/usb/gspca/ov534.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * ov534-ov7xxx gspca driver
 *
 * Copyright (C) 2008 Antonio Ospite <[email protected]>
 * Copyright (C) 2008 Jim Paris <[email protected]>
 * Copyright (C) 2009 Jean-Francois Moine http://moinejf.free.fr
 *
 * Based on a prototype written by Mark Ferrell <[email protected]>
 * USB protocol reverse engineered by Jim Paris <[email protected]>
 * https://jim.sh/svn/jim/devl/playstation/ps3/eye/test/
 *
 * PS3 Eye camera enhanced by Richard Kaswy http://kaswy.free.fr
 * PS3 Eye camera - brightness, contrast, awb, agc, aec controls
 *                  added by Max Thrun <[email protected]>
 * PS3 Eye camera - FPS range extended by Joseph Howse
 *                  <[email protected]> https://nummist.com
 */

#define pr_fmt(fmt)

#define MODULE_NAME

#include "gspca.h"

#include <linux/fixp-arith.h>
#include <media/v4l2-ctrls.h>

#define OV534_REG_ADDRESS
#define OV534_REG_SUBADDR
#define OV534_REG_WRITE
#define OV534_REG_READ
#define OV534_REG_OPERATION
#define OV534_REG_STATUS

#define OV534_OP_WRITE_3
#define OV534_OP_WRITE_2
#define OV534_OP_READ_2

#define CTRL_TIMEOUT
#define DEFAULT_FRAME_RATE

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

/* specific webcam descriptor */
struct sd {};
enum sensors {};

static int sd_start(struct gspca_dev *gspca_dev);
static void sd_stopN(struct gspca_dev *gspca_dev);


static const struct v4l2_pix_format ov772x_mode[] =;
static const struct v4l2_pix_format ov767x_mode[] =;

static const u8 qvga_rates[] =;
static const u8 vga_rates[] =;

static const struct framerates ov772x_framerates[] =;

struct reg_array {};

static const u8 bridge_init_767x[][2] =;
static const u8 sensor_init_767x[][2] =;
static const u8 bridge_start_vga_767x[][2] =;
static const u8 sensor_start_vga_767x[][2] =;
static const u8 bridge_start_qvga_767x[][2] =;
static const u8 sensor_start_qvga_767x[][2] =;

static const u8 bridge_init_772x[][2] =;
static const u8 sensor_init_772x[][2] =;
static const u8 bridge_start_vga_yuyv_772x[][2] =;
static const u8 sensor_start_vga_yuyv_772x[][2] =;
static const u8 bridge_start_qvga_yuyv_772x[][2] =;
static const u8 sensor_start_qvga_yuyv_772x[][2] =;
static const u8 bridge_start_vga_gbrg_772x[][2] =;
static const u8 sensor_start_vga_gbrg_772x[][2] =;
static const u8 bridge_start_qvga_gbrg_772x[][2] =;
static const u8 sensor_start_qvga_gbrg_772x[][2] =;

static void ov534_reg_write(struct gspca_dev *gspca_dev, u16 reg, u8 val)
{}

static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg)
{}

/* Two bits control LED: 0x21 bit 7 and 0x23 bit 7.
 * (direction and output)? */
static void ov534_set_led(struct gspca_dev *gspca_dev, int status)
{}

static int sccb_check_status(struct gspca_dev *gspca_dev)
{}

static void sccb_reg_write(struct gspca_dev *gspca_dev, u8 reg, u8 val)
{}

static u8 sccb_reg_read(struct gspca_dev *gspca_dev, u16 reg)
{}

/* output a bridge sequence (reg - val) */
static void reg_w_array(struct gspca_dev *gspca_dev,
			const u8 (*data)[2], int len)
{}

/* output a sensor sequence (reg - val) */
static void sccb_w_array(struct gspca_dev *gspca_dev,
			const u8 (*data)[2], int len)
{}

/* ov772x specific controls */
static void set_frame_rate(struct gspca_dev *gspca_dev)
{}

static void sethue(struct gspca_dev *gspca_dev, s32 val)
{}

static void setsaturation(struct gspca_dev *gspca_dev, s32 val)
{}

static void setbrightness(struct gspca_dev *gspca_dev, s32 val)
{}

static void setcontrast(struct gspca_dev *gspca_dev, s32 val)
{}

static void setgain(struct gspca_dev *gspca_dev, s32 val)
{}

static s32 getgain(struct gspca_dev *gspca_dev)
{}

static void setexposure(struct gspca_dev *gspca_dev, s32 val)
{}

static s32 getexposure(struct gspca_dev *gspca_dev)
{}

static void setagc(struct gspca_dev *gspca_dev, s32 val)
{}

static void setawb(struct gspca_dev *gspca_dev, s32 val)
{}

static void setaec(struct gspca_dev *gspca_dev, s32 val)
{}

static void setsharpness(struct gspca_dev *gspca_dev, s32 val)
{}

static void sethvflip(struct gspca_dev *gspca_dev, s32 hflip, s32 vflip)
{}

static void setlightfreq(struct gspca_dev *gspca_dev, s32 val)
{}


/* this function is called at probe time */
static int sd_config(struct gspca_dev *gspca_dev,
		     const struct usb_device_id *id)
{}

static int ov534_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
{}

static int ov534_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops ov534_ctrl_ops =;

static int sd_init_controls(struct gspca_dev *gspca_dev)
{}

/* this function is called at probe and resume time */
static int sd_init(struct gspca_dev *gspca_dev)
{}

static int sd_start(struct gspca_dev *gspca_dev)
{}

static void sd_stopN(struct gspca_dev *gspca_dev)
{}

/* Values for bmHeaderInfo (Video and Still Image Payload Headers, 2.4.3.3) */
#define UVC_STREAM_EOH
#define UVC_STREAM_ERR
#define UVC_STREAM_STI
#define UVC_STREAM_RES
#define UVC_STREAM_SCR
#define UVC_STREAM_PTS
#define UVC_STREAM_EOF
#define UVC_STREAM_FID

static void sd_pkt_scan(struct gspca_dev *gspca_dev,
			u8 *data, int len)
{}

/* get stream parameters (framerate) */
static void sd_get_streamparm(struct gspca_dev *gspca_dev,
			     struct v4l2_streamparm *parm)
{}

/* set stream parameters (framerate) */
static void sd_set_streamparm(struct gspca_dev *gspca_dev,
			     struct v4l2_streamparm *parm)
{}

/* sub-driver description */
static const struct sd_desc sd_desc =;

/* -- module initialisation -- */
static const struct usb_device_id device_table[] =;

MODULE_DEVICE_TABLE(usb, device_table);

/* -- device connect -- */
static int sd_probe(struct usb_interface *intf, const struct usb_device_id *id)
{}

static struct usb_driver sd_driver =;

module_usb_driver();