linux/drivers/media/usb/em28xx/em28xx-core.c

// SPDX-License-Identifier: GPL-2.0+
//
// em28xx-core.c - driver for Empia EM2800/EM2820/2840 USB video capture devices
//
// Copyright (C) 2005 Ludovico Cavedon <[email protected]>
//		      Markus Rechberger <[email protected]>
//		      Mauro Carvalho Chehab <[email protected]>
//		      Sascha Sommer <[email protected]>
// Copyright (C) 2012 Frank Schäfer <[email protected]>

#include "em28xx.h"

#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/vmalloc.h>
#include <sound/ac97_codec.h>
#include <media/v4l2-common.h>

#define DRIVER_AUTHOR

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

/* #define ENABLE_DEBUG_ISOC_FRAMES */

static unsigned int core_debug;
module_param(core_debug, int, 0644);
MODULE_PARM_DESC();

#define em28xx_coredbg(fmt, arg...)

static unsigned int reg_debug;
module_param(reg_debug, int, 0644);
MODULE_PARM_DESC();

#define em28xx_regdbg(fmt, arg...)

/* FIXME: don't abuse core_debug */
#define em28xx_isocdbg(fmt, arg...)

/*
 * em28xx_read_reg_req()
 * reads data from the usb device specifying bRequest
 */
int em28xx_read_reg_req_len(struct em28xx *dev, u8 req, u16 reg,
			    char *buf, int len)
{}

/*
 * em28xx_read_reg_req()
 * reads data from the usb device specifying bRequest
 */
int em28xx_read_reg_req(struct em28xx *dev, u8 req, u16 reg)
{}

int em28xx_read_reg(struct em28xx *dev, u16 reg)
{}
EXPORT_SYMBOL_GPL();

/*
 * em28xx_write_regs_req()
 * sends data to the usb device, specifying bRequest
 */
int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
			  int len)
{}

int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len)
{}
EXPORT_SYMBOL_GPL();

/* Write a single register */
int em28xx_write_reg(struct em28xx *dev, u16 reg, u8 val)
{}
EXPORT_SYMBOL_GPL();

/*
 * em28xx_write_reg_bits()
 * sets only some bits (specified by bitmask) of a register, by first reading
 * the actual value
 */
int em28xx_write_reg_bits(struct em28xx *dev, u16 reg, u8 val,
			  u8 bitmask)
{}
EXPORT_SYMBOL_GPL();

/*
 * em28xx_toggle_reg_bits()
 * toggles/inverts the bits (specified by bitmask) of a register
 */
int em28xx_toggle_reg_bits(struct em28xx *dev, u16 reg, u8 bitmask)
{}
EXPORT_SYMBOL_GPL();

/*
 * em28xx_is_ac97_ready()
 * Checks if ac97 is ready
 */
static int em28xx_is_ac97_ready(struct em28xx *dev)
{}

/*
 * em28xx_read_ac97()
 * write a 16 bit value to the specified AC97 address (LSB first!)
 */
int em28xx_read_ac97(struct em28xx *dev, u8 reg)
{}
EXPORT_SYMBOL_GPL();

/*
 * em28xx_write_ac97()
 * write a 16 bit value to the specified AC97 address (LSB first!)
 */
int em28xx_write_ac97(struct em28xx *dev, u8 reg, u16 val)
{}
EXPORT_SYMBOL_GPL();

struct em28xx_vol_itable {};

static struct em28xx_vol_itable inputs[] =;

static int set_ac97_input(struct em28xx *dev)
{}

static int em28xx_set_audio_source(struct em28xx *dev)
{}

struct em28xx_vol_otable {};

static const struct em28xx_vol_otable outputs[] =;

int em28xx_audio_analog_set(struct em28xx *dev)
{}
EXPORT_SYMBOL_GPL();

int em28xx_audio_setup(struct em28xx *dev)
{}
EXPORT_SYMBOL_GPL();

const struct em28xx_led *em28xx_find_led(struct em28xx *dev,
					 enum em28xx_led_role role)
{}
EXPORT_SYMBOL_GPL();

int em28xx_capture_start(struct em28xx *dev, int start)
{}

int em28xx_gpio_set(struct em28xx *dev, const struct em28xx_reg_seq *gpio)
{}
EXPORT_SYMBOL_GPL();

int em28xx_set_mode(struct em28xx *dev, enum em28xx_mode set_mode)
{}
EXPORT_SYMBOL_GPL();

/*
 *URB control
 */

/*
 * URB completion handler for isoc/bulk transfers
 */
static void em28xx_irq_callback(struct urb *urb)
{}

/*
 * Stop and Deallocate URBs
 */
void em28xx_uninit_usb_xfer(struct em28xx *dev, enum em28xx_mode mode)
{}
EXPORT_SYMBOL_GPL();

/*
 * Stop URBs
 */
void em28xx_stop_urbs(struct em28xx *dev)
{}
EXPORT_SYMBOL_GPL();

/*
 * Allocate URBs
 */
int em28xx_alloc_urbs(struct em28xx *dev, enum em28xx_mode mode, int xfer_bulk,
		      int num_bufs, int max_pkt_size, int packet_multiplier)
{}
EXPORT_SYMBOL_GPL();

/*
 * Allocate URBs and start IRQ
 */
int em28xx_init_usb_xfer(struct em28xx *dev, enum em28xx_mode mode,
			 int xfer_bulk, int num_bufs, int max_pkt_size,
		    int packet_multiplier,
		    int (*urb_data_copy)(struct em28xx *dev, struct urb *urb))
{}
EXPORT_SYMBOL_GPL();

/*
 * Device control list
 */

static LIST_HEAD(em28xx_devlist);
static DEFINE_MUTEX(em28xx_devlist_mutex);

/*
 * Extension interface
 */

static LIST_HEAD(em28xx_extension_devlist);

int em28xx_register_extension(struct em28xx_ops *ops)
{}
EXPORT_SYMBOL();

void em28xx_unregister_extension(struct em28xx_ops *ops)
{}
EXPORT_SYMBOL();

void em28xx_init_extension(struct em28xx *dev)
{}

void em28xx_close_extension(struct em28xx *dev)
{}

int em28xx_suspend_extension(struct em28xx *dev)
{}

int em28xx_resume_extension(struct em28xx *dev)
{}