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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Jeilin JL2005B/C/D library
 *
 * Copyright (C) 2011 Theodore Kilgore <[email protected]>
 */

#define MODULE_NAME

#include <linux/workqueue.h>
#include <linux/slab.h>
#include "gspca.h"


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

/* Default timeouts, in ms */
#define JL2005C_CMD_TIMEOUT
#define JL2005C_DATA_TIMEOUT

/* Maximum transfer size to use. */
#define JL2005C_MAX_TRANSFER
#define FRAME_HEADER_LEN


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


/* Camera has two resolution settings. What they are depends on model. */
static const struct v4l2_pix_format cif_mode[] =;

static const struct v4l2_pix_format vga_mode[] =;

/*
 * cam uses endpoint 0x03 to send commands, 0x84 for read commands,
 * and 0x82 for bulk data transfer.
 */

/* All commands are two bytes only */
static int jl2005c_write2(struct gspca_dev *gspca_dev, unsigned char *command)
{}

/* Response to a command is one byte in usb_buf[0], only if requested. */
static int jl2005c_read1(struct gspca_dev *gspca_dev)
{}

/* Response appears in gspca_dev->usb_buf[0] */
static int jl2005c_read_reg(struct gspca_dev *gspca_dev, unsigned char reg)
{}

static int jl2005c_start_new_frame(struct gspca_dev *gspca_dev)
{}

static int jl2005c_write_reg(struct gspca_dev *gspca_dev, unsigned char reg,
						    unsigned char value)
{}

static int jl2005c_get_firmware_id(struct gspca_dev *gspca_dev)
{}

static int jl2005c_stream_start_vga_lg
		    (struct gspca_dev *gspca_dev)
{}

static int jl2005c_stream_start_vga_small(struct gspca_dev *gspca_dev)
{}

static int jl2005c_stream_start_cif_lg(struct gspca_dev *gspca_dev)
{}

static int jl2005c_stream_start_cif_small(struct gspca_dev *gspca_dev)
{}


static int jl2005c_stop(struct gspca_dev *gspca_dev)
{}

/*
 * This function is called as a workqueue function and runs whenever the camera
 * is streaming data. Because it is a workqueue function it is allowed to sleep
 * so we can use synchronous USB calls. To avoid possible collisions with other
 * threads attempting to use gspca_dev->usb_buf we take the usb_lock when
 * performing USB operations using it. In practice we don't really need this
 * as the camera doesn't provide any controls.
 */
static void jl2005c_dostream(struct work_struct *work)
{}




/* 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_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)
{}



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