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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *   Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver
 *
 *   Copyright (C) 2005 Steven Toth <[email protected]>
 *
 *   Support for KWorld DVB-S 100 by Vadim Catana <[email protected]>
 *
 *   Support for CX24123/CX24113-NIM by Patrick Boettcher <[email protected]>
 */

#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <asm/div64.h>

#include <media/dvb_frontend.h>
#include "cx24123.h"

#define XTAL

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

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

#define info(args...)
#define err(args...)

#define dprintk(args...)

struct cx24123_state {};

/* Various tuner defaults need to be established for a given symbol rate Sps */
static struct cx24123_AGC_val {} cx24123_AGC_vals[] =;

/*
 * Various tuner defaults need to be established for a given frequency kHz.
 * fixme: The bounds on the bands do not match the doc in real life.
 * fixme: Some of them have been moved, other might need adjustment.
 */
static struct cx24123_bandselect_val {} cx24123_bandselect_vals[] =;

static struct {} cx24123_regdata[] =;

static int cx24123_i2c_writereg(struct cx24123_state *state,
	u8 i2c_addr, int reg, int data)
{}

static int cx24123_i2c_readreg(struct cx24123_state *state, u8 i2c_addr, u8 reg)
{}

#define cx24123_readreg(state, reg)
#define cx24123_writereg(state, reg, val)

static int cx24123_set_inversion(struct cx24123_state *state,
				 enum fe_spectral_inversion inversion)
{}

static int cx24123_get_inversion(struct cx24123_state *state,
				 enum fe_spectral_inversion *inversion)
{}

static int cx24123_set_fec(struct cx24123_state *state, enum fe_code_rate fec)
{}

static int cx24123_get_fec(struct cx24123_state *state, enum fe_code_rate *fec)
{}

/* Approximation of closest integer of log2(a/b). It actually gives the
   lowest integer i such that 2^i >= round(a/b) */
static u32 cx24123_int_log2(u32 a, u32 b)
{}

static int cx24123_set_symbolrate(struct cx24123_state *state, u32 srate)
{}

/*
 * Based on the required frequency and symbolrate, the tuner AGC has
 * to be configured and the correct band selected.
 * Calculate those values.
 */
static int cx24123_pll_calculate(struct dvb_frontend *fe)
{}

/*
 * Tuner data is 21 bits long, must be left-aligned in data.
 * Tuner cx24109 is written through a dedicated 3wire interface
 * on the demod chip.
 */
static int cx24123_pll_writereg(struct dvb_frontend *fe, u32 data)
{}

static int cx24123_pll_tune(struct dvb_frontend *fe)
{}


/*
 * 0x23:
 *    [7:7] = BTI enabled
 *    [6:6] = I2C repeater enabled
 *    [5:5] = I2C repeater start
 *    [0:0] = BTI start
 */

/* mode == 1 -> i2c-repeater, 0 -> bti */
static int cx24123_repeater_mode(struct cx24123_state *state, u8 mode, u8 start)
{}

static int cx24123_initfe(struct dvb_frontend *fe)
{}

static int cx24123_set_voltage(struct dvb_frontend *fe,
			       enum fe_sec_voltage voltage)
{}

/* wait for diseqc queue to become ready (or timeout) */
static void cx24123_wait_for_diseqc(struct cx24123_state *state)
{}

static int cx24123_send_diseqc_msg(struct dvb_frontend *fe,
	struct dvb_diseqc_master_cmd *cmd)
{}

static int cx24123_diseqc_send_burst(struct dvb_frontend *fe,
				     enum fe_sec_mini_cmd burst)
{}

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

/*
 * Configured to return the measurement of errors in blocks,
 * because no UCBLOCKS value is available, so this value doubles up
 * to satisfy both measurements.
 */
static int cx24123_read_ber(struct dvb_frontend *fe, u32 *ber)
{}

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

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

static int cx24123_set_frontend(struct dvb_frontend *fe)
{}

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

static int cx24123_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone)
{}

static int cx24123_tune(struct dvb_frontend *fe,
			bool re_tune,
			unsigned int mode_flags,
			unsigned int *delay,
			enum fe_status *status)
{}

static enum dvbfe_algo cx24123_get_algo(struct dvb_frontend *fe)
{}

static void cx24123_release(struct dvb_frontend *fe)
{}

static int cx24123_tuner_i2c_tuner_xfer(struct i2c_adapter *i2c_adap,
	struct i2c_msg msg[], int num)
{}

static u32 cx24123_tuner_i2c_func(struct i2c_adapter *adapter)
{}

static const struct i2c_algorithm cx24123_tuner_i2c_algo =;

struct i2c_adapter *
	cx24123_get_tuner_i2c_adapter(struct dvb_frontend *fe)
{}
EXPORT_SYMBOL();

static const struct dvb_frontend_ops cx24123_ops;

struct dvb_frontend *cx24123_attach(const struct cx24123_config *config,
				    struct i2c_adapter *i2c)
{}
EXPORT_SYMBOL_GPL();

static const struct dvb_frontend_ops cx24123_ops =;

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