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

// SPDX-License-Identifier: GPL-2.0-or-later
/*
    Montage Technology TS2020 - Silicon Tuner driver
    Copyright (C) 2009-2012 Konstantin Dimitrov <[email protected]>

    Copyright (C) 2009-2012 TurboSight.com

 */

#include <media/dvb_frontend.h>
#include "ts2020.h"
#include <linux/regmap.h>
#include <linux/math64.h>

#define TS2020_XTAL_FREQ
#define FREQ_OFFSET_LOW_SYM_RATE

struct ts2020_priv {};

struct ts2020_reg_val {};

static void ts2020_stat_work(struct work_struct *work);

static void ts2020_release(struct dvb_frontend *fe)
{}

static int ts2020_sleep(struct dvb_frontend *fe)
{}

static int ts2020_init(struct dvb_frontend *fe)
{}

static int ts2020_tuner_gate_ctrl(struct dvb_frontend *fe, u8 offset)
{}

static int ts2020_set_tuner_rf(struct dvb_frontend *fe)
{}

static int ts2020_set_params(struct dvb_frontend *fe)
{}

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

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

/*
 * Get the tuner gain.
 * @fe: The front end for which we're determining the gain
 * @v_agc: The voltage of the AGC from the demodulator (0-2600mV)
 * @_gain: Where to store the gain (in 0.001dB units)
 *
 * Returns 0 or a negative error code.
 */
static int ts2020_read_tuner_gain(struct dvb_frontend *fe, unsigned v_agc,
				  __s64 *_gain)
{}

/*
 * Get the AGC information from the demodulator and use that to calculate the
 * tuner gain.
 */
static int ts2020_get_tuner_gain(struct dvb_frontend *fe, __s64 *_gain)
{}

/*
 * Gather statistics on a regular basis
 */
static void ts2020_stat_work(struct work_struct *work)
{}

/*
 * Read TS2020 signal strength in v3 format.
 */
static int ts2020_read_signal_strength(struct dvb_frontend *fe,
				       u16 *_signal_strength)
{}

static const struct dvb_tuner_ops ts2020_tuner_ops =;

struct dvb_frontend *ts2020_attach(struct dvb_frontend *fe,
					const struct ts2020_config *config,
					struct i2c_adapter *i2c)
{}
EXPORT_SYMBOL_GPL();

/*
 * We implement own regmap locking due to legacy DVB attach which uses frontend
 * gate control callback to control I2C bus access. We can open / close gate and
 * serialize whole open / I2C-operation / close sequence at the same.
 */
static void ts2020_regmap_lock(void *__dev)
{}

static void ts2020_regmap_unlock(void *__dev)
{}

static int ts2020_probe(struct i2c_client *client)
{}

static void ts2020_remove(struct i2c_client *client)
{}

static const struct i2c_device_id ts2020_id_table[] =;
MODULE_DEVICE_TABLE(i2c, ts2020_id_table);

static struct i2c_driver ts2020_driver =;

module_i2c_driver();

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