#include "tda18271-priv.h"
static int tda18271_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
{
struct tda18271_priv *priv = fe->tuner_priv;
enum tda18271_i2c_gate gate;
int ret = 0;
switch (priv->gate) {
case TDA18271_GATE_DIGITAL:
case TDA18271_GATE_ANALOG:
gate = priv->gate;
break;
case TDA18271_GATE_AUTO:
default:
switch (priv->mode) {
case TDA18271_DIGITAL:
gate = TDA18271_GATE_DIGITAL;
break;
case TDA18271_ANALOG:
default:
gate = TDA18271_GATE_ANALOG;
break;
}
}
switch (gate) {
case TDA18271_GATE_ANALOG:
if (fe->ops.analog_ops.i2c_gate_ctrl)
ret = fe->ops.analog_ops.i2c_gate_ctrl(fe, enable);
break;
case TDA18271_GATE_DIGITAL:
if (fe->ops.i2c_gate_ctrl)
ret = fe->ops.i2c_gate_ctrl(fe, enable);
break;
default:
ret = -EINVAL;
break;
}
return ret;
};
static void tda18271_dump_regs(struct dvb_frontend *fe, int extended)
{ … }
int tda18271_read_regs(struct dvb_frontend *fe)
{ … }
int tda18271_read_extended(struct dvb_frontend *fe)
{ … }
static int __tda18271_write_regs(struct dvb_frontend *fe, int idx, int len,
bool lock_i2c)
{ … }
int tda18271_write_regs(struct dvb_frontend *fe, int idx, int len)
{ … }
static int __tda18271_charge_pump_source(struct dvb_frontend *fe,
enum tda18271_pll pll, int force,
bool lock_i2c)
{ … }
int tda18271_charge_pump_source(struct dvb_frontend *fe,
enum tda18271_pll pll, int force)
{ … }
int tda18271_init_regs(struct dvb_frontend *fe)
{ … }
int tda18271_set_standby_mode(struct dvb_frontend *fe,
int sm, int sm_lt, int sm_xt)
{ … }
int tda18271_calc_main_pll(struct dvb_frontend *fe, u32 freq)
{ … }
int tda18271_calc_cal_pll(struct dvb_frontend *fe, u32 freq)
{ … }
int tda18271_calc_bp_filter(struct dvb_frontend *fe, u32 *freq)
{ … }
int tda18271_calc_km(struct dvb_frontend *fe, u32 *freq)
{ … }
int tda18271_calc_rf_band(struct dvb_frontend *fe, u32 *freq)
{ … }
int tda18271_calc_gain_taper(struct dvb_frontend *fe, u32 *freq)
{ … }
int tda18271_calc_ir_measure(struct dvb_frontend *fe, u32 *freq)
{ … }
int tda18271_calc_rf_cal(struct dvb_frontend *fe, u32 *freq)
{ … }
void _tda_printk(struct tda18271_priv *state, const char *level,
const char *func, const char *fmt, ...)
{ … }