linux/drivers/media/usb/gspca/m5602/m5602_core.c

// SPDX-License-Identifier: GPL-2.0-only
 /*
 * USB Driver for ALi m5602 based webcams
 *
 * Copyright (C) 2008 Erik Andrén
 * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project.
 * Copyright (C) 2005 m5603x Linux Driver Project <[email protected]>
 *
 * Portions of code to USB interface and ALi driver software,
 * Copyright (c) 2006 Willem Duinker
 * v4l2 interface modeled after the V4L2 driver
 * for SN9C10x PC Camera Controllers
 */

#define pr_fmt(fmt)

#include "m5602_ov9650.h"
#include "m5602_ov7660.h"
#include "m5602_mt9m111.h"
#include "m5602_po1030.h"
#include "m5602_s5k83a.h"
#include "m5602_s5k4aa.h"

/* Kernel module parameters */
int force_sensor;
static bool dump_bridge;
bool dump_sensor;

static const struct usb_device_id m5602_table[] =;

MODULE_DEVICE_TABLE(usb, m5602_table);

/* A skeleton used for sending messages to the sensor */
static const unsigned char sensor_urb_skeleton[] =;

/* A skeleton used for sending messages to the m5602 bridge */
static const unsigned char bridge_urb_skeleton[] =;

/* Reads a byte from the m5602 */
int m5602_read_bridge(struct sd *sd, const u8 address, u8 *i2c_data)
{}

/* Writes a byte to the m5602 */
int m5602_write_bridge(struct sd *sd, const u8 address, const u8 i2c_data)
{}

static int m5602_wait_for_i2c(struct sd *sd)
{}

int m5602_read_sensor(struct sd *sd, const u8 address,
		       u8 *i2c_data, const u8 len)
{}

int m5602_write_sensor(struct sd *sd, const u8 address,
			u8 *i2c_data, const u8 len)
{}

/* Dump all the registers of the m5602 bridge,
   unfortunately this breaks the camera until it's power cycled */
static void m5602_dump_bridge(struct sd *sd)
{}

static int m5602_probe_sensor(struct sd *sd)
{}

static int m5602_configure(struct gspca_dev *gspca_dev,
			   const struct usb_device_id *id);

static int m5602_init(struct gspca_dev *gspca_dev)
{}

static int m5602_init_controls(struct gspca_dev *gspca_dev)
{}

static int m5602_start_transfer(struct gspca_dev *gspca_dev)
{}

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

static void m5602_stop_transfer(struct gspca_dev *gspca_dev)
{}

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

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

static int m5602_probe(struct usb_interface *intf,
		       const struct usb_device_id *id)
{}

static void m5602_disconnect(struct usb_interface *intf)
{}

static struct usb_driver sd_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
module_param(force_sensor, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC();

module_param(dump_bridge, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC();

module_param(dump_sensor, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC();