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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Sonix sn9c102p sn9c105 sn9c120 (jpeg) subdriver
 *
 * Copyright (C) 2009-2011 Jean-François Moine <http://moinejf.free.fr>
 * Copyright (C) 2005 Michel Xhaard [email protected]
 */

#define pr_fmt(fmt)

#define MODULE_NAME

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

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

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

static void qual_upd(struct work_struct *work);

/* device flags */
#define F_PDN_INV
#define F_ILLUM

/* sn9c1xx definitions */
/* register 0x01 */
#define S_PWR_DN
#define S_PDN_INV
#define V_TX_EN
#define LED
#define SCL_SEL_OD
#define SYS_SEL_48M
/* register 0x17 */
#define MCK_SIZE_MASK
#define SEN_CLK_EN
#define DEF_EN

static const struct v4l2_pix_format cif_mode[] =;
static const struct v4l2_pix_format vga_mode[] =;

static const u8 sn_adcm1700[0x1c] =;

static const u8 sn_gc0307[0x1c] =;

static const u8 sn_hv7131[0x1c] =;

static const u8 sn_mi0360[0x1c] =;

static const u8 sn_mi0360b[0x1c] =;

static const u8 sn_mo4000[0x1c] =;

static const u8 sn_mt9v111[0x1c] =;

static const u8 sn_om6802[0x1c] =;

static const u8 sn_ov7630[0x1c] =;

static const u8 sn_ov7648[0x1c] =;

static const u8 sn_ov7660[0x1c] =;

static const u8 sn_po1030[0x1c] =;

static const u8 sn_po2030n[0x1c] =;

static const u8 sn_soi768[0x1c] =;

static const u8 sn_sp80708[0x1c] =;

/* sequence specific to the sensors - !! index = SENSOR_xxx */
static const u8 *sn_tb[] =;

/* default gamma table */
static const u8 gamma_def[17] =;
/* gamma for sensor ADCM1700 */
static const u8 gamma_spec_0[17] =;
/* gamma for sensors HV7131R and MT9V111 */
static const u8 gamma_spec_1[17] =;
/* gamma for sensor GC0307 */
static const u8 gamma_spec_2[17] =;
/* gamma for sensor SP80708 */
static const u8 gamma_spec_3[17] =;

/* color matrix and offsets */
static const u8 reg84[] =;

#define DELAY

static const u8 adcm1700_sensor_init[][8] =;
static const u8 adcm1700_sensor_param1[][8] =;
static const u8 gc0307_sensor_init[][8] =;
static const u8 gc0307_sensor_param1[][8] =;

static const u8 hv7131r_sensor_init[][8] =;
static const u8 mi0360_sensor_init[][8] =;
static const u8 mi0360b_sensor_init[][8] =;
static const u8 mi0360b_sensor_param1[][8] =;
static const u8 mo4000_sensor_init[][8] =;
static const u8 mt9v111_sensor_init[][8] =;
static const u8 mt9v111_sensor_param1[][8] =;
static const u8 om6802_init0[2][8] =;
static const u8 om6802_sensor_init[][8] =;
static const u8 om6802_sensor_param1[][8] =;
static const u8 ov7630_sensor_init[][8] =;
static const u8 ov7630_sensor_param1[][8] =;

static const u8 ov7648_sensor_init[][8] =;
static const u8 ov7648_sensor_param1[][8] =;

static const u8 ov7660_sensor_init[][8] =;
static const u8 ov7660_sensor_param1[][8] =;

static const u8 po1030_sensor_init[][8] =;
static const u8 po1030_sensor_param1[][8] =;

static const u8 po2030n_sensor_init[][8] =;
static const u8 po2030n_sensor_param1[][8] =;

static const u8 soi768_sensor_init[][8] =;
static const u8 soi768_sensor_param1[][8] =;

static const u8 sp80708_sensor_init[][8] =;
static const u8 sp80708_sensor_param1[][8] =;

static const u8 (*sensor_init[])[8] =;

/* read <len> bytes to gspca_dev->usb_buf */
static void reg_r(struct gspca_dev *gspca_dev,
		  u16 value, int len)
{}

static void reg_w1(struct gspca_dev *gspca_dev,
		   u16 value,
		   u8 data)
{}
static void reg_w(struct gspca_dev *gspca_dev,
			  u16 value,
			  const u8 *buffer,
			  int len)
{}

/* I2C write 1 byte */
static void i2c_w1(struct gspca_dev *gspca_dev, u8 reg, u8 val)
{}

/* I2C write 8 bytes */
static void i2c_w8(struct gspca_dev *gspca_dev,
		   const u8 *buffer)
{}

/* sensor read 'len' (1..5) bytes in gspca_dev->usb_buf */
static void i2c_r(struct gspca_dev *gspca_dev, u8 reg, int len)
{}

static void i2c_w_seq(struct gspca_dev *gspca_dev,
			const u8 (*data)[8])
{}

/* check the ID of the hv7131 sensor */
/* this sequence is needed because it activates the sensor */
static void hv7131r_probe(struct gspca_dev *gspca_dev)
{}

static void mi0360_probe(struct gspca_dev *gspca_dev)
{}

static void ov7630_probe(struct gspca_dev *gspca_dev)
{}

static void ov7648_probe(struct gspca_dev *gspca_dev)
{}

/* 0c45:6142 sensor may be po2030n, gc0305 or gc0307 */
static void po2030n_probe(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)
{}

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

static int sd_s_ctrl(struct v4l2_ctrl *ctrl);

static const struct v4l2_ctrl_ops sd_ctrl_ops =;

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

static u32 expo_adjust(struct gspca_dev *gspca_dev,
			u32 expo)
{}

static void setbrightness(struct gspca_dev *gspca_dev)
{}

static void setcontrast(struct gspca_dev *gspca_dev)
{}

static void setcolors(struct gspca_dev *gspca_dev)
{}

static void setredblue(struct gspca_dev *gspca_dev)
{}

static void setgamma(struct gspca_dev *gspca_dev)
{}

static void setexposure(struct gspca_dev *gspca_dev)
{}

static void setautogain(struct gspca_dev *gspca_dev)
{}

static void setgain(struct gspca_dev *gspca_dev)
{}

static void sethvflip(struct gspca_dev *gspca_dev)
{}

static void setsharpness(struct gspca_dev *gspca_dev)
{}

static void setillum(struct gspca_dev *gspca_dev)
{}

static void setfreq(struct gspca_dev *gspca_dev)
{}

static void setjpegqual(struct gspca_dev *gspca_dev)
{}

/* JPEG quality update */
/* This function is executed from a work queue. */
static void qual_upd(struct work_struct *work)
{}

/* -- start the camera -- */
static int sd_start(struct gspca_dev *gspca_dev)
{}

static void sd_stopN(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 do_autogain(struct gspca_dev *gspca_dev)
{}

/* set the average luminosity from an isoc marker */
static void set_lum(struct sd *sd,
		    u8 *data)
{}

/* scan the URB packets */
/* This function is run at interrupt level. */
static void sd_pkt_scan(struct gspca_dev *gspca_dev,
			u8 *data,			/* isoc packet */
			int len)			/* iso packet length */
{}

static int sd_s_ctrl(struct v4l2_ctrl *ctrl)
{}

#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

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

/* -- module initialisation -- */
#define BS(bridge, sensor)
#define BSF(bridge, sensor, flags)
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();