linux/drivers/media/dvb-frontends/tda10048.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
    NXP TDA10048HN DVB OFDM demodulator driver

    Copyright (C) 2009 Steven Toth <[email protected]>


*/

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/math64.h>
#include <asm/div64.h>
#include <media/dvb_frontend.h>
#include <linux/int_log.h>
#include "tda10048.h"

#define TDA10048_DEFAULT_FIRMWARE
#define TDA10048_DEFAULT_FIRMWARE_SIZE

/* Register name definitions */
#define TDA10048_IDENTITY
#define TDA10048_VERSION
#define TDA10048_DSP_CODE_CPT
#define TDA10048_DSP_CODE_IN
#define TDA10048_IN_CONF1
#define TDA10048_IN_CONF2
#define TDA10048_IN_CONF3
#define TDA10048_OUT_CONF1
#define TDA10048_OUT_CONF2
#define TDA10048_OUT_CONF3
#define TDA10048_AUTO
#define TDA10048_SYNC_STATUS
#define TDA10048_CONF_C4_1
#define TDA10048_CONF_C4_2
#define TDA10048_CODE_IN_RAM
#define TDA10048_CHANNEL_INFO1_R
#define TDA10048_CHANNEL_INFO2_R
#define TDA10048_CHANNEL_INFO1
#define TDA10048_CHANNEL_INFO2
#define TDA10048_TIME_ERROR_R
#define TDA10048_TIME_ERROR
#define TDA10048_FREQ_ERROR_LSB_R
#define TDA10048_FREQ_ERROR_MSB_R
#define TDA10048_FREQ_ERROR_LSB
#define TDA10048_FREQ_ERROR_MSB
#define TDA10048_IT_SEL
#define TDA10048_IT_STAT
#define TDA10048_DSP_AD_LSB
#define TDA10048_DSP_AD_MSB
#define TDA10048_DSP_REG_LSB
#define TDA10048_DSP_REG_MSB
#define TDA10048_CONF_TRISTATE1
#define TDA10048_CONF_TRISTATE2
#define TDA10048_CONF_POLARITY
#define TDA10048_GPIO_SP_DS0
#define TDA10048_GPIO_SP_DS1
#define TDA10048_GPIO_SP_DS2
#define TDA10048_GPIO_SP_DS3
#define TDA10048_GPIO_OUT_SEL
#define TDA10048_GPIO_SELECT
#define TDA10048_IC_MODE
#define TDA10048_CONF_XO
#define TDA10048_CONF_PLL1
#define TDA10048_CONF_PLL2
#define TDA10048_CONF_PLL3
#define TDA10048_CONF_ADC
#define TDA10048_CONF_ADC_2
#define TDA10048_CONF_C1_1
#define TDA10048_CONF_C1_3
#define TDA10048_AGC_CONF
#define TDA10048_AGC_THRESHOLD_LSB
#define TDA10048_AGC_THRESHOLD_MSB
#define TDA10048_AGC_RENORM
#define TDA10048_AGC_GAINS
#define TDA10048_AGC_TUN_MIN
#define TDA10048_AGC_TUN_MAX
#define TDA10048_AGC_IF_MIN
#define TDA10048_AGC_IF_MAX
#define TDA10048_AGC_TUN_LEVEL
#define TDA10048_AGC_IF_LEVEL
#define TDA10048_DIG_AGC_LEVEL
#define TDA10048_FREQ_PHY2_LSB
#define TDA10048_FREQ_PHY2_MSB
#define TDA10048_TIME_INVWREF_LSB
#define TDA10048_TIME_INVWREF_MSB
#define TDA10048_TIME_WREF_LSB
#define TDA10048_TIME_WREF_MID1
#define TDA10048_TIME_WREF_MID2
#define TDA10048_TIME_WREF_MSB
#define TDA10048_NP_OUT
#define TDA10048_CELL_ID_LSB
#define TDA10048_CELL_ID_MSB
#define TDA10048_EXTTPS_ODD
#define TDA10048_EXTTPS_EVEN
#define TDA10048_TPS_LENGTH
#define TDA10048_FREE_REG_1
#define TDA10048_FREE_REG_2
#define TDA10048_CONF_C3_1
#define TDA10048_CVBER_CTRL
#define TDA10048_CBER_NMAX_LSB
#define TDA10048_CBER_NMAX_MSB
#define TDA10048_CBER_LSB
#define TDA10048_CBER_MSB
#define TDA10048_VBER_LSB
#define TDA10048_VBER_MID
#define TDA10048_VBER_MSB
#define TDA10048_CVBER_LUT
#define TDA10048_UNCOR_CTRL
#define TDA10048_UNCOR_CPT_LSB
#define TDA10048_UNCOR_CPT_MSB
#define TDA10048_SOFT_IT_C3
#define TDA10048_CONF_TS2
#define TDA10048_CONF_TS1

static unsigned int debug;

#define dprintk(level, fmt, arg...)

struct tda10048_state {};

static struct init_tab {} init_tab[] =;

static struct pll_tab {} pll_tab[] =;

static int tda10048_writereg(struct tda10048_state *state, u8 reg, u8 data)
{}

static u8 tda10048_readreg(struct tda10048_state *state, u8 reg)
{}

static int tda10048_writeregbulk(struct tda10048_state *state, u8 reg,
				 const u8 *data, u16 len)
{}

static int tda10048_set_phy2(struct dvb_frontend *fe, u32 sample_freq_hz,
			     u32 if_hz)
{}

static int tda10048_set_wref(struct dvb_frontend *fe, u32 sample_freq_hz,
			     u32 bw)
{}

static int tda10048_set_invwref(struct dvb_frontend *fe, u32 sample_freq_hz,
				u32 bw)
{}

static int tda10048_set_bandwidth(struct dvb_frontend *fe,
	u32 bw)
{}

static int tda10048_set_if(struct dvb_frontend *fe, u32 bw)
{}

static int tda10048_firmware_upload(struct dvb_frontend *fe)
{}

static int tda10048_set_inversion(struct dvb_frontend *fe, int inversion)
{}

/* Retrieve the demod settings */
static int tda10048_get_tps(struct tda10048_state *state,
	struct dtv_frontend_properties *p)
{}

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

static int tda10048_output_mode(struct dvb_frontend *fe, int serial)
{}

/* Talk to the demod, set the FEC, GUARD, QAM settings etc */
/* TODO: Support manual tuning with specific params */
static int tda10048_set_frontend(struct dvb_frontend *fe)
{}

/* Establish sane defaults and load firmware. */
static int tda10048_init(struct dvb_frontend *fe)
{}

static int tda10048_read_status(struct dvb_frontend *fe, enum fe_status *status)
{}

static int tda10048_read_ber(struct dvb_frontend *fe, u32 *ber)
{}

static int tda10048_read_signal_strength(struct dvb_frontend *fe,
	u16 *signal_strength)
{}

/* SNR lookup table */
static struct snr_tab {} snr_tab[] =;

static int tda10048_read_snr(struct dvb_frontend *fe, u16 *snr)
{}

static int tda10048_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{}

static int tda10048_get_frontend(struct dvb_frontend *fe,
				 struct dtv_frontend_properties *p)
{}

static int tda10048_get_tune_settings(struct dvb_frontend *fe,
	struct dvb_frontend_tune_settings *tune)
{}

static void tda10048_release(struct dvb_frontend *fe)
{}

static void tda10048_establish_defaults(struct dvb_frontend *fe)
{}

static const struct dvb_frontend_ops tda10048_ops;

struct dvb_frontend *tda10048_attach(const struct tda10048_config *config,
	struct i2c_adapter *i2c)
{}
EXPORT_SYMBOL_GPL();

static const struct dvb_frontend_ops tda10048_ops =;

module_param(debug, int, 0644);
MODULE_PARM_DESC();

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