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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Z-Star/Vimicro zc301/zc302p/vc30x driver
 *
 * Copyright (C) 2009-2012 Jean-Francois Moine <http://moinejf.free.fr>
 * Copyright (C) 2004 2005 2006 Michel Xhaard [email protected]
 */

#define pr_fmt(fmt)

#include <linux/input.h>
#include "gspca.h"
#include "jpeg.h"

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

static int force_sensor =;

#define REG08_DEF
#include "zc3xx-reg.h"

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

static const struct v4l2_pix_format vga_mode[] =;

static const struct v4l2_pix_format broken_vga_mode[] =;

static const struct v4l2_pix_format sif_mode[] =;

/*
 * Bridge reg08 bits 1-2 -> JPEG quality conversion table. Note the highest
 * quality setting is not usable as USB 1 does not have enough bandwidth.
 */
static u8 jpeg_qual[] =;

/* usb exchanges */
struct usb_action {};

static const struct usb_action adcm2700_Initial[] =;
static const struct usb_action adcm2700_InitialScale[] =;
static const struct usb_action adcm2700_50HZ[] =;
static const struct usb_action adcm2700_60HZ[] =;
static const struct usb_action adcm2700_NoFlicker[] =;
static const struct usb_action cs2102_InitialScale[] =;

static const struct usb_action cs2102_Initial[] =;
static const struct usb_action cs2102_50HZScale[] =;
static const struct usb_action cs2102_50HZ[] =;
static const struct usb_action cs2102_60HZScale[] =;
static const struct usb_action cs2102_60HZ[] =;
static const struct usb_action cs2102_NoFlickerScale[] =;
static const struct usb_action cs2102_NoFlicker[] =;

/* CS2102_KOCOM */
static const struct usb_action cs2102K_InitialScale[] =;

static const struct usb_action cs2102K_Initial[] =;

static const struct usb_action gc0305_Initial[] =;
static const struct usb_action gc0305_InitialScale[] =;
static const struct usb_action gc0305_50HZ[] =;
static const struct usb_action gc0305_60HZ[] =;

static const struct usb_action gc0305_NoFlicker[] =;

static const struct usb_action hdcs2020_InitialScale[] =;
static const struct usb_action hdcs2020_Initial[] =;
static const struct usb_action hdcs2020_50HZ[] =;
static const struct usb_action hdcs2020_60HZ[] =;
static const struct usb_action hdcs2020_NoFlicker[] =;

static const struct usb_action hv7131b_InitialScale[] =;

static const struct usb_action hv7131b_Initial[] =;
static const struct usb_action hv7131b_50HZ[] =;
static const struct usb_action hv7131b_50HZScale[] =;
static const struct usb_action hv7131b_60HZ[] =;
static const struct usb_action hv7131b_60HZScale[] =;
static const struct usb_action hv7131b_NoFlicker[] =;
static const struct usb_action hv7131b_NoFlickerScale[] =;

/* from lPEPI264v.inf (hv7131b!) */
static const struct usb_action hv7131r_InitialScale[] =;
static const struct usb_action hv7131r_Initial[] =;
static const struct usb_action hv7131r_50HZ[] =;
static const struct usb_action hv7131r_50HZScale[] =;
static const struct usb_action hv7131r_60HZ[] =;
static const struct usb_action hv7131r_60HZScale[] =;
static const struct usb_action hv7131r_NoFlicker[] =;
static const struct usb_action hv7131r_NoFlickerScale[] =;

static const struct usb_action icm105a_InitialScale[] =;

static const struct usb_action icm105a_Initial[] =;
static const struct usb_action icm105a_50HZScale[] =;
static const struct usb_action icm105a_50HZ[] =;
static const struct usb_action icm105a_60HZScale[] =;
static const struct usb_action icm105a_60HZ[] =;
static const struct usb_action icm105a_NoFlickerScale[] =;
static const struct usb_action icm105a_NoFlicker[] =;

static const struct usb_action mc501cb_Initial[] =;

static const struct usb_action mc501cb_InitialScale[] =;

static const struct usb_action mc501cb_50HZ[] =;

static const struct usb_action mc501cb_50HZScale[] =;

static const struct usb_action mc501cb_60HZ[] =;

static const struct usb_action mc501cb_60HZScale[] =;

static const struct usb_action mc501cb_NoFlicker[] =;

static const struct usb_action mc501cb_NoFlickerScale[] =;

/* from zs211.inf */
static const struct usb_action ov7620_Initial[] =;
static const struct usb_action ov7620_InitialScale[] =;
static const struct usb_action ov7620_50HZ[] =;
static const struct usb_action ov7620_60HZ[] =;
static const struct usb_action ov7620_NoFlicker[] =;

static const struct usb_action ov7630c_InitialScale[] =;

static const struct usb_action ov7630c_Initial[] =;

static const struct usb_action pas106b_Initial_com[] =;

static const struct usb_action pas106b_InitialScale[] =;

static const struct usb_action pas106b_Initial[] =;
static const struct usb_action pas106b_50HZ[] =;
static const struct usb_action pas106b_60HZ[] =;
static const struct usb_action pas106b_NoFlicker[] =;

/* from lvWIMv.inf 046d:08a2/:08aa 2007/06/03 */
static const struct usb_action pas202b_Initial[] =;
static const struct usb_action pas202b_InitialScale[] =;
static const struct usb_action pas202b_50HZ[] =;
static const struct usb_action pas202b_50HZScale[] =;
static const struct usb_action pas202b_60HZ[] =;
static const struct usb_action pas202b_60HZScale[] =;
static const struct usb_action pas202b_NoFlicker[] =;
static const struct usb_action pas202b_NoFlickerScale[] =;

/* mt9v111 (mi0360soc) and pb0330 from vm30x.inf 0ac8:301b 07/02/13 */
static const struct usb_action mt9v111_1_Initial[] =;
static const struct usb_action mt9v111_1_InitialScale[] =;
static const struct usb_action mt9v111_1_AE50HZ[] =;
static const struct usb_action mt9v111_1_AE50HZScale[] =;
static const struct usb_action mt9v111_1_AE60HZ[] =;
static const struct usb_action mt9v111_1_AE60HZScale[] =;
static const struct usb_action mt9v111_1_AENoFlicker[] =;
static const struct usb_action mt9v111_1_AENoFlickerScale[] =;
/* from usbvm303.inf 0ac8:303b 07/03/25 (3 - tas5130c) */
static const struct usb_action mt9v111_3_Initial[] =;
static const struct usb_action mt9v111_3_InitialScale[] =;
static const struct usb_action mt9v111_3_AE50HZ[] =;
static const struct usb_action mt9v111_3_AE50HZScale[] =;
static const struct usb_action mt9v111_3_AE60HZ[] =;
static const struct usb_action mt9v111_3_AE60HZScale[] =;
static const struct usb_action mt9v111_3_AENoFlicker[] =;
static const struct usb_action mt9v111_3_AENoFlickerScale[] =;

static const struct usb_action pb0330_Initial[] =;
static const struct usb_action pb0330_InitialScale[] =;
static const struct usb_action pb0330_50HZ[] =;
static const struct usb_action pb0330_50HZScale[] =;
static const struct usb_action pb0330_60HZ[] =;
static const struct usb_action pb0330_60HZScale[] =;
static const struct usb_action pb0330_NoFlicker[] =;
static const struct usb_action pb0330_NoFlickerScale[] =;

/* from oem9.inf */
static const struct usb_action po2030_Initial[] =;

/* from oem9.inf */
static const struct usb_action po2030_InitialScale[] =;

static const struct usb_action po2030_50HZ[] =;

static const struct usb_action po2030_60HZ[] =;

static const struct usb_action po2030_NoFlicker[] =;

static const struct usb_action tas5130c_InitialScale[] =;
static const struct usb_action tas5130c_Initial[] =;
static const struct usb_action tas5130c_50HZ[] =;
static const struct usb_action tas5130c_50HZScale[] =;
static const struct usb_action tas5130c_60HZ[] =;
static const struct usb_action tas5130c_60HZScale[] =;
static const struct usb_action tas5130c_NoFlicker[] =;

static const struct usb_action tas5130c_NoFlickerScale[] =;

/* from usbvm305.inf 0ac8:305b 07/06/15 (3 - tas5130c) */
static const struct usb_action gc0303_Initial[] =;

static const struct usb_action gc0303_InitialScale[] =;
static const struct usb_action gc0303_50HZ[] =;

static const struct usb_action gc0303_50HZScale[] =;

static const struct usb_action gc0303_60HZ[] =;

static const struct usb_action gc0303_60HZScale[] =;

static const struct usb_action gc0303_NoFlicker[] =;

static const struct usb_action gc0303_NoFlickerScale[] =;

static u8 reg_r(struct gspca_dev *gspca_dev,
		u16 index)
{}

static void reg_w(struct gspca_dev *gspca_dev,
			u8 value,
			u16 index)
{}

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

static u8 i2c_write(struct gspca_dev *gspca_dev,
			u8 reg,
			u8 valL,
			u8 valH)
{}

static void usb_exchange(struct gspca_dev *gspca_dev,
			const struct usb_action *action)
{}

static void setmatrix(struct gspca_dev *gspca_dev)
{}

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

static void setcontrast(struct gspca_dev *gspca_dev,
		s32 gamma, s32 brightness, s32 contrast)
{}

static s32 getexposure(struct gspca_dev *gspca_dev)
{}

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

static void setquality(struct gspca_dev *gspca_dev)
{}

/* Matches the sensor's internal frame rate to the lighting frequency.
 * Valid frequencies are:
 *	50Hz, for European and Asian lighting (default)
 *	60Hz, for American lighting
 *	0 = No Flicker (for outdoor usage)
 */
static void setlightfreq(struct gspca_dev *gspca_dev, s32 val)
{}

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

/*
 * Update the transfer parameters.
 * This function is executed from a work queue.
 */
static void transfer_update(struct work_struct *work)
{}

static void send_unknown(struct gspca_dev *gspca_dev, int sensor)
{}

/* start probe 2 wires */
static void start_2wr_probe(struct gspca_dev *gspca_dev, int sensor)
{}

static int sif_probe(struct gspca_dev *gspca_dev)
{}

static int vga_2wr_probe(struct gspca_dev *gspca_dev)
{}

struct sensor_by_chipset_revision {};
static const struct sensor_by_chipset_revision chipset_revision_sensor[] =;

static int vga_3wr_probe(struct gspca_dev *gspca_dev)
{}

static int zcxx_probeSensor(struct gspca_dev *gspca_dev)
{}

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

static int zcxx_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
{}

static int zcxx_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops zcxx_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_pre_start(struct gspca_dev *gspca_dev)
{}

static int sd_start(struct gspca_dev *gspca_dev)
{}

/* called on streamoff with alt==0 and on disconnect */
/* the usb_lock is held at entry - restore on exit */
static void sd_stop0(struct gspca_dev *gspca_dev)
{}

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

static int sd_set_jcomp(struct gspca_dev *gspca_dev,
			const struct v4l2_jpegcompression *jcomp)
{}

static int sd_get_jcomp(struct gspca_dev *gspca_dev,
			struct v4l2_jpegcompression *jcomp)
{}

#if IS_ENABLED(CONFIG_INPUT)
static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
			u8 *data,		/* interrupt packet data */
			int len)		/* interrupt packet length */
{}
#endif

static const struct sd_desc sd_desc =;

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)
{}

/* USB driver */
static struct usb_driver sd_driver =;

module_usb_driver();

module_param(force_sensor, int, 0644);
MODULE_PARM_DESC();