#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/wait.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/mm.h>
#include <linux/usb.h>
#include <linux/i2c.h>
#include <asm/byteorder.h>
#include <media/i2c/saa7115.h>
#include <media/tuner.h>
#include <media/i2c/uda1342.h>
#include "go7007-priv.h"
static unsigned int assume_endura;
module_param(assume_endura, int, 0644);
MODULE_PARM_DESC(…) …;
#define HPI_STATUS_ADDR …
#define INT_PARAM_ADDR …
#define INT_INDEX_ADDR …
#define GO7007_USB_EZUSB …
#define GO7007_USB_EZUSB_I2C …
struct go7007_usb_board { … };
struct go7007_usb { … };
static const struct go7007_usb_board board_matrix_ii = …;
static const struct go7007_usb_board board_matrix_reload = …;
static const struct go7007_usb_board board_star_trek = …;
static const struct go7007_usb_board board_px_tv402u = …;
static const struct go7007_usb_board board_xmen = …;
static const struct go7007_usb_board board_matrix_revolution = …;
#if 0
static const struct go7007_usb_board board_lifeview_lr192 = {
.flags = GO7007_USB_EZUSB,
.main_info = {
.flags = GO7007_BOARD_HAS_AUDIO |
GO7007_BOARD_USE_ONBOARD_I2C,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
GO7007_AUDIO_WORD_16,
.audio_rate = 48000,
.audio_bclk_div = 8,
.audio_main_div = 2,
.hpi_buffer_cap = 7,
.sensor_flags = GO7007_SENSOR_656 |
GO7007_SENSOR_VALID_ENABLE |
GO7007_SENSOR_TV |
GO7007_SENSOR_VBI |
GO7007_SENSOR_SCALING,
.num_i2c_devs = 0,
.num_inputs = 1,
.inputs = {
{
.video_input = 0,
.name = "Composite",
},
},
},
};
#endif
static const struct go7007_usb_board board_endura = …;
static const struct go7007_usb_board board_adlink_mpg24 = …;
static const struct go7007_usb_board board_sensoray_2250 = …;
static const struct go7007_usb_board board_ads_usbav_709 = …;
static const struct usb_device_id go7007_usb_id_table[] = …;
MODULE_DEVICE_TABLE(usb, go7007_usb_id_table);
static int go7007_usb_vendor_request(struct go7007 *go, int request,
int value, int index, void *transfer_buffer, int length, int in)
{ … }
static int go7007_usb_interface_reset(struct go7007 *go)
{ … }
static int go7007_usb_ezusb_write_interrupt(struct go7007 *go,
int addr, int data)
{ … }
static int go7007_usb_onboard_write_interrupt(struct go7007 *go,
int addr, int data)
{ … }
static void go7007_usb_readinterrupt_complete(struct urb *urb)
{ … }
static int go7007_usb_read_interrupt(struct go7007 *go)
{ … }
static void go7007_usb_read_video_pipe_complete(struct urb *urb)
{ … }
static void go7007_usb_read_audio_pipe_complete(struct urb *urb)
{ … }
static int go7007_usb_stream_start(struct go7007 *go)
{ … }
static int go7007_usb_stream_stop(struct go7007 *go)
{ … }
static int go7007_usb_send_firmware(struct go7007 *go, u8 *data, int len)
{ … }
static void go7007_usb_release(struct go7007 *go)
{ … }
static const struct go7007_hpi_ops go7007_usb_ezusb_hpi_ops = …;
static const struct go7007_hpi_ops go7007_usb_onboard_hpi_ops = …;
static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
struct i2c_msg msgs[], int num)
{ … }
static u32 go7007_usb_functionality(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm go7007_usb_algo = …;
static struct i2c_adapter go7007_usb_adap_templ = …;
static int go7007_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void go7007_usb_disconnect(struct usb_interface *intf)
{ … }
static struct usb_driver go7007_usb_driver = …;
module_usb_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;