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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Linux-DVB Driver for DiBcom's DiB0090 base-band RF Tuner.
 *
 * Copyright (C) 2005-9 DiBcom (http://www.dibcom.fr/)
 *
 * This code is more or less generated from another driver, please
 * excuse some codingstyle oddities.
 */

#define pr_fmt(fmt)

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/mutex.h>

#include <media/dvb_frontend.h>

#include "dib0090.h"
#include "dibx000_common.h"

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

#define dprintk(fmt, arg...)

#define CONFIG_SYS_DVBT
#define CONFIG_SYS_ISDBT
#define CONFIG_BAND_CBAND
#define CONFIG_BAND_VHF
#define CONFIG_BAND_UHF
#define CONFIG_DIB0090_USE_PWM_AGC

#define EN_LNA0
#define EN_LNA1
#define EN_LNA2
#define EN_LNA3
#define EN_MIX0
#define EN_MIX1
#define EN_MIX2
#define EN_MIX3
#define EN_IQADC
#define EN_PLL
#define EN_TX
#define EN_BB
#define EN_LO
#define EN_BIAS

#define EN_IQANA
#define EN_DIGCLK
#define EN_CRYSTAL

#define EN_UHF
#define EN_VHF
#define EN_LBD
#define EN_SBD
#define EN_CAB

/* Calibration defines */
#define DC_CAL
#define WBD_CAL
#define TEMP_CAL
#define CAPTRIM_CAL

#define KROSUS_PLL_LOCKED
#define KROSUS

/* Use those defines to identify SOC version */
#define SOC
#define SOC_7090_P1G_11R1
#define SOC_7090_P1G_21R1
#define SOC_8090_P1G_11R1
#define SOC_8090_P1G_21R1

/* else use thos ones to check */
#define P1A_B
#define P1C
#define P1D_E_F
#define P1G
#define P1G_21R2

#define MP001
#define MP005
#define MP008
#define MP009

#define pgm_read_word(w)

struct dc_calibration;

struct dib0090_tuning {};

struct dib0090_pll {};

struct dib0090_identity {};

struct dib0090_state {};

struct dib0090_fw_state {};

static u16 dib0090_read_reg(struct dib0090_state *state, u8 reg)
{}

static int dib0090_write_reg(struct dib0090_state *state, u32 reg, u16 val)
{}

static u16 dib0090_fw_read_reg(struct dib0090_fw_state *state, u8 reg)
{}

static int dib0090_fw_write_reg(struct dib0090_fw_state *state, u8 reg, u16 val)
{}

#define HARD_RESET(state)
#define ADC_TARGET
#define GAIN_ALPHA
#define WBD_ALPHA
#define LPF
static void dib0090_write_regs(struct dib0090_state *state, u8 r, const u16 * b, u8 c)
{}

static int dib0090_identify(struct dvb_frontend *fe)
{}

static int dib0090_fw_identify(struct dvb_frontend *fe)
{}

static void dib0090_reset_digital(struct dvb_frontend *fe, const struct dib0090_config *cfg)
{}

static int dib0090_fw_reset_digital(struct dvb_frontend *fe, const struct dib0090_config *cfg)
{}

static int dib0090_wakeup(struct dvb_frontend *fe)
{}

static int dib0090_sleep(struct dvb_frontend *fe)
{}

void dib0090_dcc_freq(struct dvb_frontend *fe, u8 fast)
{}

EXPORT_SYMBOL();

static const u16 bb_ramp_pwm_normal_socs[] =;

static const u16 rf_ramp_pwm_cband_7090p[] =;

static const u16 rf_ramp_pwm_cband_7090e_sensitivity[] =;

static const u16 rf_ramp_pwm_cband_7090e_aci[] =;

static const u16 rf_ramp_pwm_cband_8090[] =;

static const u16 rf_ramp_pwm_uhf_7090[] =;

static const u16 rf_ramp_pwm_uhf_8090[] =;

/* GENERAL PWM ramp definition for all other Krosus */
static const u16 bb_ramp_pwm_normal[] =;

#if 0
/* Currently unused */
static const u16 bb_ramp_pwm_boost[] = {
	550, /* max BB gain in 10th of dB */
	8, /* ramp_slope = 1dB of gain -> clock_ticks_per_db = clk_khz / ramp_slope -> BB_RAMP2 */
	440,
	(2  << 9) | 0, /* BB_RAMP3 = 26dB */
	(0  << 9) | 208, /* BB_RAMP4 */
	(2  << 9) | 208, /* BB_RAMP5 = 29dB */
	(0  << 9) | 440, /* BB_RAMP6 */
};
#endif

static const u16 rf_ramp_pwm_cband[] =;

static const u16 rf_ramp_pwm_vhf[] =;

static const u16 rf_ramp_pwm_uhf[] =;

#if 0
/* Currently unused */
static const u16 rf_ramp_pwm_sband[] = {
	253, /* max RF gain in 10th of dB */
	38, /* ramp_slope = 1dB of gain -> clock_ticks_per_db = clk_khz / ramp_slope -> RF_RAMP2 */
	961,
	(4  << 10) | 0, /* RF_RAMP3, LNA 1 = 14.1dB */
	(0  << 10) | 508, /* RF_RAMP4, LNA 1 */
	(9  << 10) | 508, /* RF_RAMP5, LNA 2 = 11.2dB */
	(0  << 10) | 961, /* RF_RAMP6, LNA 2 */
	(0  << 10) | 0, /* RF_RAMP7, LNA 3 = 0dB */
	(0  << 10) | 0, /* RF_RAMP8, LNA 3 */
	(0  << 10) | 0, /* GAIN_4_1, LNA 4 = 0dB */
	(0  << 10) | 0, /* GAIN_4_2, LNA 4 */
};
#endif

struct slope {};
static u16 slopes_to_scale(const struct slope *slopes, u8 num, s16 val)
{}

static const struct slope dib0090_wbd_slopes[3] =;

static s16 dib0090_wbd_to_db(struct dib0090_state *state, u16 wbd)
{}

static void dib0090_wbd_target(struct dib0090_state *state, u32 rf)
{}

static const int gain_reg_addr[4] =;

static void dib0090_gain_apply(struct dib0090_state *state, s16 gain_delta, s16 top_delta, u8 force)
{}

static void dib0090_set_boost(struct dib0090_state *state, int onoff)
{}

static void dib0090_set_rframp(struct dib0090_state *state, const u16 * cfg)
{}

static void dib0090_set_rframp_pwm(struct dib0090_state *state, const u16 * cfg)
{}

static void dib0090_set_bbramp(struct dib0090_state *state, const u16 * cfg)
{}

static void dib0090_set_bbramp_pwm(struct dib0090_state *state, const u16 * cfg)
{}

void dib0090_pwm_gain_reset(struct dvb_frontend *fe)
{}
EXPORT_SYMBOL();

void dib0090_set_dc_servo(struct dvb_frontend *fe, u8 DC_servo_cutoff)
{}
EXPORT_SYMBOL();

static u32 dib0090_get_slow_adc_val(struct dib0090_state *state)
{}

int dib0090_gain_control(struct dvb_frontend *fe)
{}

EXPORT_SYMBOL();

void dib0090_get_current_gain(struct dvb_frontend *fe, u16 * rf, u16 * bb, u16 * rf_gain_limit, u16 * rflt)
{}

EXPORT_SYMBOL();

u16 dib0090_get_wbd_target(struct dvb_frontend *fe)
{}
EXPORT_SYMBOL();

u16 dib0090_get_wbd_offset(struct dvb_frontend *fe)
{}
EXPORT_SYMBOL();

int dib0090_set_switch(struct dvb_frontend *fe, u8 sw1, u8 sw2, u8 sw3)
{}
EXPORT_SYMBOL();

int dib0090_set_vga(struct dvb_frontend *fe, u8 onoff)
{}
EXPORT_SYMBOL();

int dib0090_update_rframp_7090(struct dvb_frontend *fe, u8 cfg_sensitivity)
{}
EXPORT_SYMBOL();

static const u16 dib0090_defaults[] =;

static const u16 dib0090_p1g_additionnal_defaults[] =;

static void dib0090_set_default_config(struct dib0090_state *state, const u16 * n)
{}

#define CAP_VALUE_MIN
#define CAP_VALUE_MAX
#define HR_MIN
#define HR_MAX
#define POLY_MIN
#define POLY_MAX

static void dib0090_set_EFUSE(struct dib0090_state *state)
{}

static int dib0090_reset(struct dvb_frontend *fe)
{}

#define steps(u)
#define INTERN_WAIT
static int dib0090_get_offset(struct dib0090_state *state, enum frontend_tune_state *tune_state)
{}

struct dc_calibration {};

static const struct dc_calibration dc_table[] =;

static const struct dc_calibration dc_p1g_table[] =;

static void dib0090_set_trim(struct dib0090_state *state)
{}

static int dib0090_dc_offset_calibration(struct dib0090_state *state, enum frontend_tune_state *tune_state)
{}

static int dib0090_wbd_calibration(struct dib0090_state *state, enum frontend_tune_state *tune_state)
{}

static void dib0090_set_bandwidth(struct dib0090_state *state)
{}

static const struct dib0090_pll dib0090_pll_table[] =;

static const struct dib0090_tuning dib0090_tuning_table_fm_vhf_on_cband[] =;

static const struct dib0090_tuning dib0090_tuning_table[] =;

static const struct dib0090_tuning dib0090_p1g_tuning_table[] =;

static const struct dib0090_pll dib0090_p1g_pll_table[] =;

static const struct dib0090_tuning dib0090_p1g_tuning_table_fm_vhf_on_cband[] =;

static const struct dib0090_tuning dib0090_tuning_table_cband_7090[] =;

static const struct dib0090_tuning dib0090_tuning_table_cband_7090e_sensitivity[] =;

int dib0090_update_tuning_table_7090(struct dvb_frontend *fe,
		u8 cfg_sensitivity)
{}
EXPORT_SYMBOL();

static int dib0090_captrim_search(struct dib0090_state *state, enum frontend_tune_state *tune_state)
{}

static int dib0090_get_temperature(struct dib0090_state *state, enum frontend_tune_state *tune_state)
{}

#define WBD
static int dib0090_tune(struct dvb_frontend *fe)
{}

static void dib0090_release(struct dvb_frontend *fe)
{}

enum frontend_tune_state dib0090_get_tune_state(struct dvb_frontend *fe)
{}

EXPORT_SYMBOL();

int dib0090_set_tune_state(struct dvb_frontend *fe, enum frontend_tune_state tune_state)
{}

EXPORT_SYMBOL();

static int dib0090_get_frequency(struct dvb_frontend *fe, u32 * frequency)
{}

static int dib0090_set_params(struct dvb_frontend *fe)
{}

static const struct dvb_tuner_ops dib0090_ops =;

static const struct dvb_tuner_ops dib0090_fw_ops =;

static const struct dib0090_wbd_slope dib0090_wbd_table_default[] =;

struct dvb_frontend *dib0090_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config)
{}

EXPORT_SYMBOL_GPL();

struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config)
{}
EXPORT_SYMBOL_GPL();

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