linux/drivers/media/usb/cx231xx/cx231xx-cards.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
   cx231xx-cards.c - driver for Conexant Cx23100/101/102
				USB video capture devices

   Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
				Based on em28xx driver

 */

#include "cx231xx.h"
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <media/tuner.h>
#include <media/tveeprom.h>
#include <media/v4l2-common.h>

#include <media/drv-intf/cx25840.h>
#include <media/dvb-usb-ids.h>
#include "xc5000.h"
#include "tda18271.h"


static int tuner =;
module_param(tuner, int, 0444);
MODULE_PARM_DESC();

static int transfer_mode =;
module_param(transfer_mode, int, 0444);
MODULE_PARM_DESC();

static unsigned int disable_ir;
module_param(disable_ir, int, 0444);
MODULE_PARM_DESC();

/* Bitmask marking allocated devices from 0 to CX231XX_MAXBOARDS */
static unsigned long cx231xx_devused;

/*
 *  Reset sequences for analog/digital modes
 */

static struct cx231xx_reg_seq RDE250_XCV_TUNER[] =;

/*
 *  Board definitions
 */
struct cx231xx_board cx231xx_boards[] =;
const unsigned int cx231xx_bcount =;

/* table of devices that work with this driver */
struct usb_device_id cx231xx_id_table[] =;

MODULE_DEVICE_TABLE(usb, cx231xx_id_table);

/* cx231xx_tuner_callback
 * will be used to reset XC5000 tuner using GPIO pin
 */

int cx231xx_tuner_callback(void *ptr, int component, int command, int arg)
{}
EXPORT_SYMBOL_GPL();

static void cx231xx_reset_out(struct cx231xx *dev)
{}

static void cx231xx_enable_OSC(struct cx231xx *dev)
{}

static void cx231xx_sleep_s5h1432(struct cx231xx *dev)
{}

static inline void cx231xx_set_model(struct cx231xx *dev)
{}

/* Since cx231xx_pre_card_setup() requires a proper dev->model,
 * this won't work for boards with generic PCI IDs
 */
void cx231xx_pre_card_setup(struct cx231xx *dev)
{}

static void cx231xx_config_tuner(struct cx231xx *dev)
{}

static int read_eeprom(struct cx231xx *dev, struct i2c_client *client,
		       u8 *eedata, int len)
{}

void cx231xx_card_setup(struct cx231xx *dev)
{}

/*
 * cx231xx_config()
 * inits registers with sane defaults
 */
int cx231xx_config(struct cx231xx *dev)
{}

/*
 * cx231xx_config_i2c()
 * configure i2c attached devices
 */
void cx231xx_config_i2c(struct cx231xx *dev)
{}

static void cx231xx_unregister_media_device(struct cx231xx *dev)
{}

/*
 * cx231xx_realease_resources()
 * unregisters the v4l2,i2c and usb devices
 * called when the device gets disconnected or at module unload
*/
void cx231xx_release_resources(struct cx231xx *dev)
{}

static int cx231xx_media_device_init(struct cx231xx *dev,
				      struct usb_device *udev)
{}

/*
 * cx231xx_init_dev()
 * allocates and inits the device structs, registers i2c bus and v4l device
 */
static int cx231xx_init_dev(struct cx231xx *dev, struct usb_device *udev,
			    int minor)
{}

#if defined(CONFIG_MODULES) && defined(MODULE)
static void request_module_async(struct work_struct *work)
{
	struct cx231xx *dev = container_of(work,
					   struct cx231xx, request_module_wk);

	if (dev->has_alsa_audio)
		request_module("cx231xx-alsa");

	if (dev->board.has_dvb)
		request_module("cx231xx-dvb");

}

static void request_modules(struct cx231xx *dev)
{
	INIT_WORK(&dev->request_module_wk, request_module_async);
	schedule_work(&dev->request_module_wk);
}

static void flush_request_modules(struct cx231xx *dev)
{
	flush_work(&dev->request_module_wk);
}
#else
#define request_modules(dev)
#define flush_request_modules(dev)
#endif /* CONFIG_MODULES */

static int cx231xx_init_v4l2(struct cx231xx *dev,
			     struct usb_device *udev,
			     struct usb_interface *interface,
			     int isoc_pipe)
{}

/*
 * cx231xx_usb_probe()
 * checks for supported devices
 */
static int cx231xx_usb_probe(struct usb_interface *interface,
			     const struct usb_device_id *id)
{}

/*
 * cx231xx_usb_disconnect()
 * called when the device gets disconnected
 * video device will be unregistered on v4l2_close in case it is still open
 */
static void cx231xx_usb_disconnect(struct usb_interface *interface)
{}

static struct usb_driver cx231xx_usb_driver =;

module_usb_driver();