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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * USB IBM C-It Video Camera driver
 *
 * Supports Xirlink C-It Video Camera, IBM PC Camera,
 * IBM NetCamera and Veo Stingray.
 *
 * Copyright (C) 2010 Hans de Goede <[email protected]>
 *
 * This driver is based on earlier work of:
 *
 * (C) Copyright 1999 Johannes Erdfelt
 * (C) Copyright 1999 Randy Dunlap
 */

#define pr_fmt(fmt)

#define MODULE_NAME

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

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

/* FIXME we should autodetect this */
static int ibm_netcam_pro;
module_param(ibm_netcam_pro, int, 0);
MODULE_PARM_DESC();

/* FIXME this should be handled through the V4L2 input selection API */
static int rca_input;
module_param(rca_input, int, 0644);
MODULE_PARM_DESC();

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

static void sd_stop0(struct gspca_dev *gspca_dev);

static const struct v4l2_pix_format cif_yuv_mode[] =;

static const struct v4l2_pix_format vga_yuv_mode[] =;

static const struct v4l2_pix_format model0_mode[] =;

static const struct v4l2_pix_format model2_mode[] =;

/*
 * 01.01.08 - Added for RCA video in support -LO
 * This struct is used to init the Model3 cam to use the RCA video in port
 * instead of the CCD sensor.
 */
static const u16 rca_initdata[][3] =;

/* TESTME the old ibmcam driver repeats certain commands to Model1 cameras, we
   do the same for now (testing needed to see if this is really necessary) */
static const int cit_model1_ntries =;
static const int cit_model1_ntries2 =;

static int cit_write_reg(struct gspca_dev *gspca_dev, u16 value, u16 index)
{}

static int cit_read_reg(struct gspca_dev *gspca_dev, u16 index, int verbose)
{}

/*
 * cit_send_FF_04_02()
 *
 * This procedure sends magic 3-command prefix to the camera.
 * The purpose of this prefix is not known.
 *
 * History:
 * 1/2/00   Created.
 */
static void cit_send_FF_04_02(struct gspca_dev *gspca_dev)
{}

static void cit_send_00_04_06(struct gspca_dev *gspca_dev)
{}

static void cit_send_x_00(struct gspca_dev *gspca_dev, unsigned short x)
{}

static void cit_send_x_00_05(struct gspca_dev *gspca_dev, unsigned short x)
{}

static void cit_send_x_00_05_02(struct gspca_dev *gspca_dev, unsigned short x)
{}

static void cit_send_x_01_00_05(struct gspca_dev *gspca_dev, u16 x)
{}

static void cit_send_x_00_05_02_01(struct gspca_dev *gspca_dev, u16 x)
{}

static void cit_send_x_00_05_02_08_01(struct gspca_dev *gspca_dev, u16 x)
{}

static void cit_Packet_Format1(struct gspca_dev *gspca_dev, u16 fkey, u16 val)
{}

static void cit_PacketFormat2(struct gspca_dev *gspca_dev, u16 fkey, u16 val)
{}

static void cit_model2_Packet2(struct gspca_dev *gspca_dev)
{}

static void cit_model2_Packet1(struct gspca_dev *gspca_dev, u16 v1, u16 v2)
{}

/*
 * cit_model3_Packet1()
 *
 * 00_0078_012d
 * 00_0097_012f
 * 00_d141_0124
 * 00_0096_0127
 * 00_fea8_0124
 */
static void cit_model3_Packet1(struct gspca_dev *gspca_dev, u16 v1, u16 v2)
{}

static void cit_model4_Packet1(struct gspca_dev *gspca_dev, u16 v1, u16 v2)
{}

static void cit_model4_BrightnessPacket(struct gspca_dev *gspca_dev, u16 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 cit_init_model0(struct gspca_dev *gspca_dev)
{}

static int cit_init_ibm_netcam_pro(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 cit_set_brightness(struct gspca_dev *gspca_dev, s32 val)
{}

static int cit_set_contrast(struct gspca_dev *gspca_dev, s32 val)
{}

static int cit_set_hue(struct gspca_dev *gspca_dev, s32 val)
{}

static int cit_set_sharpness(struct gspca_dev *gspca_dev, s32 val)
{}

/*
 * cit_set_lighting()
 *
 * Camera model 1:
 * We have 3 levels of lighting conditions: 0=Bright, 1=Medium, 2=Low.
 *
 * Camera model 2:
 * We have 16 levels of lighting, 0 for bright light and up to 15 for
 * low light. But values above 5 or so are useless because camera is
 * not really capable to produce anything worth viewing at such light.
 * This setting may be altered only in certain camera state.
 *
 * Low lighting forces slower FPS.
 *
 * History:
 * 1/5/00   Created.
 * 2/20/00  Added support for Model 2 cameras.
 */
static void cit_set_lighting(struct gspca_dev *gspca_dev, s32 val)
{}

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

static int cit_restart_stream(struct gspca_dev *gspca_dev)
{}

static int cit_get_packet_size(struct gspca_dev *gspca_dev)
{}

/* Calculate the clockdiv giving us max fps given the available bandwidth */
static int cit_get_clock_div(struct gspca_dev *gspca_dev)
{}

static int cit_start_model0(struct gspca_dev *gspca_dev)
{}

static int cit_start_model1(struct gspca_dev *gspca_dev)
{}

static int cit_start_model2(struct gspca_dev *gspca_dev)
{}

static int cit_start_model3(struct gspca_dev *gspca_dev)
{}

static int cit_start_model4(struct gspca_dev *gspca_dev)
{}

static int cit_start_ibm_netcam_pro(struct gspca_dev *gspca_dev)
{}

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

static int sd_isoc_init(struct gspca_dev *gspca_dev)
{}

static int sd_isoc_nego(struct gspca_dev *gspca_dev)
{}

static void sd_stopN(struct gspca_dev *gspca_dev)
{}

static void sd_stop0(struct gspca_dev *gspca_dev)
{}

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

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

#if IS_ENABLED(CONFIG_INPUT)
static void cit_check_button(struct gspca_dev *gspca_dev)
{}
#endif

static int sd_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops sd_ctrl_ops =;

static int sd_init_controls(struct gspca_dev *gspca_dev)
{}

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

static const struct sd_desc sd_desc_isoc_nego =;

/* -- 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();