#include "cx231xx.h"
#include <linux/init.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <media/v4l2-common.h>
#include <media/tuner.h>
#include "cx231xx-reg.h"
static unsigned int core_debug;
module_param(core_debug, int, 0644);
MODULE_PARM_DESC(…) …;
#define cx231xx_coredbg(fmt, arg...) …
static unsigned int reg_debug;
module_param(reg_debug, int, 0644);
MODULE_PARM_DESC(…) …;
static int alt = …;
module_param(alt, int, 0644);
MODULE_PARM_DESC(…) …;
#define cx231xx_isocdbg(fmt, arg...) …
LIST_HEAD(…);
static DEFINE_MUTEX(cx231xx_devlist_mutex);
void cx231xx_remove_from_devlist(struct cx231xx *dev)
{
if (dev == NULL)
return;
if (dev->udev == NULL)
return;
if (atomic_read(&dev->devlist_count) > 0) {
mutex_lock(&cx231xx_devlist_mutex);
list_del(&dev->devlist);
atomic_dec(&dev->devlist_count);
mutex_unlock(&cx231xx_devlist_mutex);
}
};
void cx231xx_add_into_devlist(struct cx231xx *dev)
{
mutex_lock(&cx231xx_devlist_mutex);
list_add_tail(&dev->devlist, &cx231xx_devlist);
atomic_inc(&dev->devlist_count);
mutex_unlock(&cx231xx_devlist_mutex);
};
static LIST_HEAD(cx231xx_extension_devlist);
int cx231xx_register_extension(struct cx231xx_ops *ops)
{ … }
EXPORT_SYMBOL(…);
void cx231xx_unregister_extension(struct cx231xx_ops *ops)
{ … }
EXPORT_SYMBOL(…);
void cx231xx_init_extension(struct cx231xx *dev)
{ … }
void cx231xx_close_extension(struct cx231xx *dev)
{ … }
int cx231xx_send_usb_command(struct cx231xx_i2c *i2c_bus,
struct cx231xx_i2c_xfer_data *req_data)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __usb_control_msg(struct cx231xx *dev, unsigned int pipe,
__u8 request, __u8 requesttype, __u16 value, __u16 index,
void *data, __u16 size, int timeout)
{ … }
int cx231xx_read_ctrl_reg(struct cx231xx *dev, u8 req, u16 reg,
char *buf, int len)
{ … }
int cx231xx_send_vendor_cmd(struct cx231xx *dev,
struct VENDOR_REQUEST_IN *ven_req)
{ … }
int cx231xx_write_ctrl_reg(struct cx231xx *dev, u8 req, u16 reg, char *buf,
int len)
{ … }
int cx231xx_set_video_alternate(struct cx231xx *dev)
{ … }
int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt)
{ … }
EXPORT_SYMBOL_GPL(…);
int cx231xx_gpio_set(struct cx231xx *dev, struct cx231xx_reg_seq *gpio)
{ … }
int cx231xx_demod_reset(struct cx231xx *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int is_fw_load(struct cx231xx *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode)
{ … }
EXPORT_SYMBOL_GPL(…);
int cx231xx_ep5_bulkout(struct cx231xx *dev, u8 *firmware, u16 size)
{ … }
static void cx231xx_isoc_irq_callback(struct urb *urb)
{ … }
static void cx231xx_bulk_irq_callback(struct urb *urb)
{ … }
void cx231xx_uninit_isoc(struct cx231xx *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void cx231xx_uninit_bulk(struct cx231xx *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int cx231xx_init_isoc(struct cx231xx *dev, int max_packets,
int num_bufs, int max_pkt_size,
int (*isoc_copy) (struct cx231xx *dev, struct urb *urb))
{ … }
EXPORT_SYMBOL_GPL(…);
int cx231xx_init_bulk(struct cx231xx *dev, int max_packets,
int num_bufs, int max_pkt_size,
int (*bulk_copy) (struct cx231xx *dev, struct urb *urb))
{ … }
EXPORT_SYMBOL_GPL(…);
void cx231xx_stop_TS1(struct cx231xx *dev)
{ … }
void cx231xx_start_TS1(struct cx231xx *dev)
{ … }
int cx231xx_dev_init(struct cx231xx *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void cx231xx_dev_uninit(struct cx231xx *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int cx231xx_send_gpio_cmd(struct cx231xx *dev, u32 gpio_bit, u8 *gpio_val,
u8 len, u8 request, u8 direction)
{ … }
EXPORT_SYMBOL_GPL(…);
int cx231xx_mode_register(struct cx231xx *dev, u16 address, u32 mode)
{ … }
int cx231xx_read_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr,
u8 saddr_len, u32 *data, u8 data_len, int master)
{ … }
int cx231xx_write_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr,
u8 saddr_len, u32 data, u8 data_len, int master)
{ … }
int cx231xx_read_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr,
u8 saddr_len, u32 *data, u8 data_len)
{ … }
int cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr,
u8 saddr_len, u32 data, u8 data_len)
{ … }
int cx231xx_reg_mask_write(struct cx231xx *dev, u8 dev_addr, u8 size,
u16 register_address, u8 bit_start, u8 bit_end,
u32 value)
{ … }
int cx231xx_read_modify_write_i2c_dword(struct cx231xx *dev, u8 dev_addr,
u16 saddr, u32 mask, u32 value)
{ … }
u32 cx231xx_set_field(u32 field_mask, u32 data)
{ … }