#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/mutex.h>
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include <linux/platform_data/media/si4713.h>
#include "si4713.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
#define USB_SI4713_VENDOR …
#define USB_SI4713_PRODUCT …
#define BUFFER_LENGTH …
#define USB_TIMEOUT …
#define USB_RESP_TIMEOUT …
static const struct usb_device_id usb_si4713_usb_device_table[] = …;
MODULE_DEVICE_TABLE(usb, usb_si4713_usb_device_table);
struct si4713_usb_device { … };
static inline struct si4713_usb_device *to_si4713_dev(struct v4l2_device *v4l2_dev)
{ … }
static int vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *v)
{ … }
static int vidioc_g_modulator(struct file *file, void *priv,
struct v4l2_modulator *vm)
{ … }
static int vidioc_s_modulator(struct file *file, void *priv,
const struct v4l2_modulator *vm)
{ … }
static int vidioc_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *vf)
{ … }
static int vidioc_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *vf)
{ … }
static const struct v4l2_ioctl_ops usb_si4713_ioctl_ops = …;
static const struct v4l2_file_operations usb_si4713_fops = …;
static void usb_si4713_video_device_release(struct v4l2_device *v4l2_dev)
{ … }
static int si4713_send_startup_command(struct si4713_usb_device *radio)
{ … }
struct si4713_start_seq_table { … };
static const struct si4713_start_seq_table start_seq[] = …;
static int si4713_start_seq(struct si4713_usb_device *radio)
{ … }
static struct i2c_board_info si4713_board_info = …;
struct si4713_command_table { … };
static struct si4713_command_table command_table[] = …;
static int send_command(struct si4713_usb_device *radio, u8 *payload, char *data, int len)
{ … }
static int si4713_i2c_read(struct si4713_usb_device *radio, char *data, int len)
{ … }
static int si4713_i2c_write(struct si4713_usb_device *radio, char *data, int len)
{ … }
static int si4713_transfer(struct i2c_adapter *i2c_adapter,
struct i2c_msg *msgs, int num)
{ … }
static u32 si4713_functionality(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm si4713_algo = …;
static const struct i2c_adapter si4713_i2c_adapter_template = …;
static int si4713_register_i2c_adapter(struct si4713_usb_device *radio)
{ … }
static int usb_si4713_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static void usb_si4713_disconnect(struct usb_interface *intf)
{ … }
static struct usb_driver usb_si4713_driver = …;
module_usb_driver(…) …;