linux/drivers/media/usb/dvb-usb/dib0700_devices.c

// SPDX-License-Identifier: GPL-2.0-only
/* Linux driver for devices based on the DiBcom DiB0700 USB bridge
 *
 *  Copyright (C) 2005-9 DiBcom, SA et al
 */
#include "dib0700.h"

#include "dib3000mc.h"
#include "dib7000m.h"
#include "dib7000p.h"
#include "dib8000.h"
#include "dib9000.h"
#include "mt2060.h"
#include "mt2266.h"
#include "xc2028.h"
#include "xc5000.h"
#include "xc4000.h"
#include "s5h1411.h"
#include "dib0070.h"
#include "dib0090.h"
#include "lgdt3305.h"
#include "mxl5007t.h"
#include "mn88472.h"
#include "tda18250.h"


static int force_lna_activation;
module_param(force_lna_activation, int, 0644);
MODULE_PARM_DESC();

struct dib0700_adapter_state {};

/* Hauppauge Nova-T 500 (aka Bristol)
 *  has a LNA on GPIO0 which is enabled by setting 1 */
static struct mt2060_config bristol_mt2060_config[2] =;


static struct dibx000_agc_config bristol_dib3000p_mt2060_agc_config =;

static struct dib3000mc_config bristol_dib3000mc_config[2] =;

static int bristol_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int eeprom_read(struct i2c_adapter *adap,u8 adrs,u8 *pval)
{}

static int bristol_tuner_attach(struct dvb_usb_adapter *adap)
{}

/* STK7700D: Pinnacle/Terratec/Hauppauge Dual DVB-T Diversity */

/* MT226x */
static struct dibx000_agc_config stk7700d_7000p_mt2266_agc_config[2] =;

static struct dibx000_bandwidth_config stk7700d_mt2266_pll_config =;

static struct dib7000p_config stk7700d_dib7000p_mt2266_config[] =;

static struct mt2266_config stk7700d_mt2266_config[2] =;

static int stk7700P2_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap)
{}

/* STK7700-PH: Digital/Analog Hybrid Tuner, e.h. Cinergy HT USB HE */
static struct dibx000_agc_config xc3028_agc_config =;

/* PLL Configuration for COFDM BW_MHz = 8.00 with external clock = 30.00 */
static struct dibx000_bandwidth_config xc3028_bw_config =;

static struct dib7000p_config stk7700ph_dib7700_xc3028_config =;

static int stk7700ph_xc3028_callback(void *ptr, int component,
				     int command, int arg)
{}

static struct xc2028_ctrl stk7700ph_xc3028_ctrl =;

static struct xc2028_config stk7700ph_xc3028_config =;

static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap)
{}

#define DEFAULT_RC_INTERVAL

/*
 * This function is used only when firmware is < 1.20 version. Newer
 * firmwares use bulk mode, with functions implemented at dib0700_core,
 * at dib0700_rc_urb_completion()
 */
static int dib0700_rc_query_old_firmware(struct dvb_usb_device *d)
{}

/* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */
static struct dibx000_agc_config stk7700p_7000m_mt2060_agc_config =;

static struct dibx000_agc_config stk7700p_7000p_mt2060_agc_config =;

static struct dibx000_bandwidth_config stk7700p_pll_config =;

static struct dib7000m_config stk7700p_dib7000m_config =;

static struct dib7000p_config stk7700p_dib7000p_config =;

static int stk7700p_frontend_attach(struct dvb_usb_adapter *adap)
{}

static struct mt2060_config stk7700p_mt2060_config =;

static int stk7700p_tuner_attach(struct dvb_usb_adapter *adap)
{}

/* DIB7070 generic */
static struct dibx000_agc_config dib7070_agc_config =;

static int dib7070_tuner_reset(struct dvb_frontend *fe, int onoff)
{}

static int dib7070_tuner_sleep(struct dvb_frontend *fe, int onoff)
{}

static struct dib0070_config dib7070p_dib0070_config[2] =;

static struct dib0070_config dib7770p_dib0070_config =;

static int dib7070_set_param_override(struct dvb_frontend *fe)
{}

static int dib7770_set_param_override(struct dvb_frontend *fe)
{}

static int dib7770p_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int stk7700p_pid_filter(struct dvb_usb_adapter *adapter, int index,
		u16 pid, int onoff)
{}

static int stk7700p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff)
{}

static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff)
{}

static int stk70x0p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff)
{}

static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz =;

static struct dib7000p_config dib7070p_dib7000p_config =;

/* STK7070P */
static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap)
{}

/* STK7770P */
static struct dib7000p_config dib7770p_dib7000p_config =;

static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap)
{}

/* DIB807x generic */
static struct dibx000_agc_config dib807x_agc_config[2] =;

static struct dibx000_bandwidth_config dib807x_bw_config_12_mhz =;

static struct dib8000_config dib807x_dib8000_config[2] =;

static int dib80xx_tuner_reset(struct dvb_frontend *fe, int onoff)
{}

static int dib80xx_tuner_sleep(struct dvb_frontend *fe, int onoff)
{}

static const struct dib0070_wbd_gain_cfg dib8070_wbd_gain_cfg[] =;

static struct dib0070_config dib807x_dib0070_config[2] =;

static int dib807x_set_param_override(struct dvb_frontend *fe)
{}

static int dib807x_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int stk80xx_pid_filter(struct dvb_usb_adapter *adapter, int index,
	u16 pid, int onoff)
{}

static int stk80xx_pid_filter_ctrl(struct dvb_usb_adapter *adapter,
		int onoff)
{}

/* STK807x */
static int stk807x_frontend_attach(struct dvb_usb_adapter *adap)
{}

/* STK807xPVR */
static int stk807xpvr_frontend_attach0(struct dvb_usb_adapter *adap)
{}

static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter *adap)
{}

/* STK8096GP */
static struct dibx000_agc_config dib8090_agc_config[2] =;

static struct dibx000_bandwidth_config dib8090_pll_config_12mhz =;

static int dib8090_get_adc_power(struct dvb_frontend *fe)
{}

static void dib8090_agc_control(struct dvb_frontend *fe, u8 restart)
{}

static struct dib8000_config dib809x_dib8000_config[2] =;

static struct dib0090_wbd_slope dib8090_wbd_table[] =;

static struct dib0090_config dib809x_dib0090_config =;

static u8 dib8090_compute_pll_parameters(struct dvb_frontend *fe)
{}

static int dib8096_set_param_override(struct dvb_frontend *fe)
{}

static int dib809x_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int stk809x_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int stk809x_frontend1_attach(struct dvb_usb_adapter *adap)
{}

static int nim8096md_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int nim8096md_frontend_attach(struct dvb_usb_adapter *adap)
{}

/* TFE8096P */
static struct dibx000_agc_config dib8096p_agc_config[2] =;

static struct dibx000_bandwidth_config dib8096p_clock_config_12_mhz =;

static struct dib8000_config tfe8096p_dib8000_config =;

static struct dib0090_wbd_slope dib8096p_wbd_table[] =;

static struct dib0090_config tfe8096p_dib0090_config =;

struct dibx090p_best_adc {};

static int dib8096p_get_best_sampling(struct dvb_frontend *fe, struct dibx090p_best_adc *adc)
{}

static int dib8096p_agc_startup(struct dvb_frontend *fe)
{}

static int tfe8096p_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int tfe8096p_tuner_attach(struct dvb_usb_adapter *adap)
{}

/* STK9090M */
static int dib90x0_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff)
{}

static int dib90x0_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff)
{}

static int dib90x0_tuner_reset(struct dvb_frontend *fe, int onoff)
{}

static int dib90x0_tuner_sleep(struct dvb_frontend *fe, int onoff)
{}

static int dib01x0_pmu_update(struct i2c_adapter *i2c, u16 *data, u8 len)
{}

static struct dib9000_config stk9090m_config =;

static struct dib9000_config nim9090md_config[2] =;

static struct dib0090_config dib9090_dib0090_config =;

static struct dib0090_config nim9090md_dib0090_config[2] =;


static int stk9090m_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int dib9090_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int nim9090md_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap)
{}

/* NIM7090 */
static int dib7090p_get_best_sampling(struct dvb_frontend *fe , struct dibx090p_best_adc *adc)
{}

static int dib7090_agc_startup(struct dvb_frontend *fe)
{}

static int dib7090_agc_restart(struct dvb_frontend *fe, u8 restart)
{}

static int tfe7790p_update_lna(struct dvb_frontend *fe, u16 agc_global)
{}

static struct dib0090_wbd_slope dib7090_wbd_table[] =;

static struct dibx000_agc_config dib7090_agc_config[2] =;

static struct dibx000_bandwidth_config dib7090_clock_config_12_mhz =;

static struct dib7000p_config nim7090_dib7000p_config =;

static int tfe7090p_pvr_update_lna(struct dvb_frontend *fe, u16 agc_global)
{}

static struct dib7000p_config tfe7090pvr_dib7000p_config[2] =;

static struct dib0090_config nim7090_dib0090_config =;

static struct dib7000p_config tfe7790p_dib7000p_config =;

static struct dib0090_config tfe7790p_dib0090_config =;

static struct dib0090_config tfe7090pvr_dib0090_config[2] =;

static int nim7090_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int nim7090_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap)
{}

static int tfe7090pvr_frontend1_attach(struct dvb_usb_adapter *adap)
{}

static int tfe7090pvr_tuner0_attach(struct dvb_usb_adapter *adap)
{}

static int tfe7090pvr_tuner1_attach(struct dvb_usb_adapter *adap)
{}

static int tfe7790p_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int tfe7790p_tuner_attach(struct dvb_usb_adapter *adap)
{}

/* STK7070PD */
static struct dib7000p_config stk7070pd_dib7000p_config[2] =;

static void stk7070pd_init(struct dvb_usb_device *dev)
{}

static int stk7070pd_frontend_attach0(struct dvb_usb_adapter *adap)
{}

static int stk7070pd_frontend_attach1(struct dvb_usb_adapter *adap)
{}

static int novatd_read_status_override(struct dvb_frontend *fe,
				       enum fe_status *stat)
{}

static int novatd_sleep_override(struct dvb_frontend* fe)
{}

/*
 * novatd_frontend_attach - Nova-TD specific attach
 *
 * Nova-TD has GPIO0, 1 and 2 for LEDs. So do not fiddle with them except for
 * information purposes.
 */
static int novatd_frontend_attach(struct dvb_usb_adapter *adap)
{}

/* S5H1411 */
static struct s5h1411_config pinnacle_801e_config =;

/* Pinnacle PCTV HD Pro 801e GPIOs map:
   GPIO0  - currently unknown
   GPIO1  - xc5000 tuner reset
   GPIO2  - CX25843 sleep
   GPIO3  - currently unknown
   GPIO4  - currently unknown
   GPIO6  - currently unknown
   GPIO7  - currently unknown
   GPIO9  - currently unknown
   GPIO10 - CX25843 reset
 */
static int s5h1411_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int dib0700_xc5000_tuner_callback(void *priv, int component,
					 int command, int arg)
{}

static struct xc5000_config s5h1411_xc5000_tunerconfig =;

static int xc5000_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int dib0700_xc4000_tuner_callback(void *priv, int component,
					 int command, int arg)
{}

static struct dibx000_agc_config stk7700p_7000p_xc4000_agc_config =;

static struct dibx000_bandwidth_config stk7700p_xc4000_pll_config =;

/* FIXME: none of these inputs are validated yet */
static struct dib7000p_config pctv_340e_config =;

/* PCTV 340e GPIOs map:
   dib0700:
   GPIO2  - CX25843 sleep
   GPIO3  - CS5340 reset
   GPIO5  - IRD
   GPIO6  - Power Supply
   GPIO8  - LNA (1=off 0=on)
   GPIO10 - CX25843 reset
   dib7000:
   GPIO8  - xc4000 reset
 */
static int pctv340e_frontend_attach(struct dvb_usb_adapter *adap)
{}

static struct xc4000_config dib7000p_xc4000_tunerconfig =;

static int xc4000_tuner_attach(struct dvb_usb_adapter *adap)
{}

static struct lgdt3305_config hcw_lgdt3305_config =;

static struct mxl5007t_config hcw_mxl5007t_config =;

/* TIGER-ATSC map:
   GPIO0  - LNA_CTR  (H: LNA power enabled, L: LNA power disabled)
   GPIO1  - ANT_SEL  (H: VPA, L: MCX)
   GPIO4  - SCL2
   GPIO6  - EN_TUNER
   GPIO7  - SDA2
   GPIO10 - DEM_RST

   MXL is behind LG's i2c repeater.  LG is on SCL2/SDA2 gpios on the DIB
 */
static int lgdt3305_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap)
{}

static int xbox_one_attach(struct dvb_usb_adapter *adap)
{}


/* DVB-USB and USB stuff follows */
enum {};

struct usb_device_id dib0700_usb_id_table[] =;

MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);

#define DIB0700_DEFAULT_DEVICE_PROPERTIES

#define DIB0700_DEFAULT_STREAMING_CONFIG(ep)

#define DIB0700_NUM_FRONTENDS(n)

struct dvb_usb_device_properties dib0700_devices[] =;

int dib0700_device_count =;