#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(…);
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...) …
#define em28xx_isocdbg(fmt, arg...) …
int em28xx_read_reg_req_len(struct em28xx *dev, u8 req, u16 reg,
char *buf, int len)
{ … }
int em28xx_read_reg_req(struct em28xx *dev, u8 req, u16 reg)
{ … }
int em28xx_read_reg(struct em28xx *dev, u16 reg)
{ … }
EXPORT_SYMBOL_GPL(…);
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(…);
int em28xx_write_reg(struct em28xx *dev, u16 reg, u8 val)
{ … }
EXPORT_SYMBOL_GPL(…);
int em28xx_write_reg_bits(struct em28xx *dev, u16 reg, u8 val,
u8 bitmask)
{ … }
EXPORT_SYMBOL_GPL(…);
int em28xx_toggle_reg_bits(struct em28xx *dev, u16 reg, u8 bitmask)
{ … }
EXPORT_SYMBOL_GPL(…);
static int em28xx_is_ac97_ready(struct em28xx *dev)
{ … }
int em28xx_read_ac97(struct em28xx *dev, u8 reg)
{ … }
EXPORT_SYMBOL_GPL(…);
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(…);
static void em28xx_irq_callback(struct urb *urb)
{ … }
void em28xx_uninit_usb_xfer(struct em28xx *dev, enum em28xx_mode mode)
{ … }
EXPORT_SYMBOL_GPL(…);
void em28xx_stop_urbs(struct em28xx *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
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(…);
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(…);
static LIST_HEAD(em28xx_devlist);
static DEFINE_MUTEX(em28xx_devlist_mutex);
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)
{ … }