linux/drivers/media/pci/ngene/ngene-cards.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * ngene-cards.c: nGene PCIe bridge driver - card specific info
 *
 * Copyright (C) 2005-2007 Micronas
 *
 * Copyright (C) 2008-2009 Ralph Metzler <[email protected]>
 *                         Modifications for new nGene firmware,
 *                         support for EEPROM-copying,
 *                         support for new dual DVB-S2 card prototype
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>

#include "ngene.h"

/* demods/tuners */
#include "stv6110x.h"
#include "stv090x.h"
#include "lnbh24.h"
#include "lgdt330x.h"
#include "mt2131.h"
#include "tda18271c2dd.h"
#include "drxk.h"
#include "drxd.h"
#include "dvb-pll.h"
#include "stv0367.h"
#include "stv0367_priv.h"
#include "tda18212.h"
#include "cxd2841er.h"
#include "stv0910.h"
#include "stv6111.h"
#include "lnbh25.h"

/****************************************************************************/
/* I2C transfer functions used for demod/tuner probing***********************/
/****************************************************************************/

static int i2c_io(struct i2c_adapter *adapter, u8 adr,
		  u8 *wbuf, u32 wlen, u8 *rbuf, u32 rlen)
{}

static int i2c_write(struct i2c_adapter *adap, u8 adr, u8 *data, int len)
{}

static int i2c_write_reg(struct i2c_adapter *adap, u8 adr,
			 u8 reg, u8 val)
{}

static int i2c_read(struct i2c_adapter *adapter, u8 adr, u8 *val)
{}

static int i2c_read_reg16(struct i2c_adapter *adapter, u8 adr,
			  u16 reg, u8 *val)
{}

static int i2c_read_regs(struct i2c_adapter *adapter,
			 u8 adr, u8 reg, u8 *val, u8 len)
{}

static int i2c_read_reg(struct i2c_adapter *adapter, u8 adr, u8 reg, u8 *val)
{}

/****************************************************************************/
/* Demod/tuner attachment ***************************************************/
/****************************************************************************/

static struct i2c_adapter *i2c_adapter_from_chan(struct ngene_channel *chan)
{}

static int tuner_attach_stv6110(struct ngene_channel *chan)
{}

static int tuner_attach_stv6111(struct ngene_channel *chan)
{}

static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable)
{}

static int tuner_attach_tda18271(struct ngene_channel *chan)
{}

static int tuner_tda18212_ping(struct ngene_channel *chan,
			       struct i2c_adapter *i2c,
			       unsigned short adr)
{}

static int tuner_attach_tda18212(struct ngene_channel *chan, u32 dmdtype)
{}

static int tuner_attach_probe(struct ngene_channel *chan)
{}

static int demod_attach_stv0900(struct ngene_channel *chan)
{}

static struct stv0910_cfg stv0910_p =;

static struct lnbh25_config lnbh25_cfg =;

static int demod_attach_stv0910(struct ngene_channel *chan,
				struct i2c_adapter *i2c)
{}

static struct stv0367_config ddb_stv0367_config[] =;

static int demod_attach_stv0367(struct ngene_channel *chan,
				struct i2c_adapter *i2c)
{}

static int demod_attach_cxd28xx(struct ngene_channel *chan,
				struct i2c_adapter *i2c, int osc24)
{}

static void cineS2_tuner_i2c_lock(struct dvb_frontend *fe, int lock)
{}

static int port_has_stv0900(struct i2c_adapter *i2c, int port)
{}

static int port_has_drxk(struct i2c_adapter *i2c, int port)
{}

static int port_has_stv0367(struct i2c_adapter *i2c)
{}

int ngene_port_has_cxd2099(struct i2c_adapter *i2c, u8 *type)
{}

static int demod_attach_drxk(struct ngene_channel *chan,
			     struct i2c_adapter *i2c)
{}

/****************************************************************************/
/* XO2 related lists and functions ******************************************/
/****************************************************************************/

static char *xo2names[] =;

static int init_xo2(struct ngene_channel *chan, struct i2c_adapter *i2c)
{}

static int port_has_xo2(struct i2c_adapter *i2c, u8 *type, u8 *id)
{}

/****************************************************************************/
/* Probing and port/channel handling ****************************************/
/****************************************************************************/

static int cineS2_probe(struct ngene_channel *chan)
{}


static struct lgdt330x_config aver_m780 =;

static struct mt2131_config m780_tunerconfig =;

/* A single func to attach the demo and tuner, rather than
 * use two sep funcs like the current design mandates.
 */
static int demod_attach_lg330x(struct ngene_channel *chan)
{}

static int demod_attach_drxd(struct ngene_channel *chan)
{}

static int tuner_attach_dtt7520x(struct ngene_channel *chan)
{}

/****************************************************************************/
/* EEPROM TAGS **************************************************************/
/****************************************************************************/

#define MICNG_EE_START
#define MICNG_EE_END

#define MICNG_EETAG_END0
#define MICNG_EETAG_END1

/* 0x0001 - 0x000F reserved for housekeeping */
/* 0xFFFF - 0xFFFE reserved for housekeeping */

/* Micronas assigned tags
   EEProm tags for hardware support */

#define MICNG_EETAG_DRXD1_OSCDEVIATION
#define MICNG_EETAG_DRXD2_OSCDEVIATION

#define MICNG_EETAG_MT2060_1_1STIF
#define MICNG_EETAG_MT2060_2_1STIF

/* Tag range for OEMs */

#define MICNG_EETAG_OEM_FIRST
#define MICNG_EETAG_OEM_LAST

static int i2c_write_eeprom(struct i2c_adapter *adapter,
			    u8 adr, u16 reg, u8 data)
{}

static int i2c_read_eeprom(struct i2c_adapter *adapter,
			   u8 adr, u16 reg, u8 *data, int len)
{}

static int ReadEEProm(struct i2c_adapter *adapter,
		      u16 Tag, u32 MaxLen, u8 *data, u32 *pLength)
{}

static int WriteEEProm(struct i2c_adapter *adapter,
		       u16 Tag, u32 Length, u8 *data)
{}

static int eeprom_read_ushort(struct i2c_adapter *adapter, u16 tag, u16 *data)
{}

static int eeprom_write_ushort(struct i2c_adapter *adapter, u16 tag, u16 data)
{}

static s16 osc_deviation(void *priv, s16 deviation, int flag)
{}

/****************************************************************************/
/* Switch control (I2C gates, etc.) *****************************************/
/****************************************************************************/


static struct stv090x_config fe_cineS2 =;

static struct stv090x_config fe_cineS2_2 =;

static struct stv6110x_config tuner_cineS2_0 =;

static struct stv6110x_config tuner_cineS2_1 =;

static const struct ngene_info ngene_info_cineS2 =;

static const struct ngene_info ngene_info_satixS2 =;

static const struct ngene_info ngene_info_satixS2v2 =;

static const struct ngene_info ngene_info_cineS2v5 =;


static const struct ngene_info ngene_info_duoFlex =;

static const struct ngene_info ngene_info_m780 =;

static struct drxd_config fe_terratec_dvbt_0 =;

static struct drxd_config fe_terratec_dvbt_1 =;

static const struct ngene_info ngene_info_terratec =;

/****************************************************************************/



/****************************************************************************/
/* PCI Subsystem ID *********************************************************/
/****************************************************************************/

#define NGENE_ID(_subvend, _subdev, _driverdata)

/****************************************************************************/

static const struct pci_device_id ngene_id_tbl[] =;
MODULE_DEVICE_TABLE(pci, ngene_id_tbl);

/****************************************************************************/
/* Init/Exit ****************************************************************/
/****************************************************************************/

static pci_ers_result_t ngene_error_detected(struct pci_dev *dev,
					     pci_channel_state_t state)
{}

static pci_ers_result_t ngene_slot_reset(struct pci_dev *dev)
{}

static void ngene_resume(struct pci_dev *dev)
{}

static const struct pci_error_handlers ngene_errors =;

static struct pci_driver ngene_pci_driver =;

static __init int module_init_ngene(void)
{}

static __exit void module_exit_ngene(void)
{}

module_init();
module_exit(module_exit_ngene);

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();