Commit 71b1e827 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] fc0012: add RF loop through

Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Acked-by: default avatarHans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ad3a758b
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
struct fc0012_priv { struct fc0012_priv {
struct i2c_adapter *i2c; struct i2c_adapter *i2c;
const struct fc0012_config *cfg;
u8 addr; u8 addr;
u8 dual_master; u8 dual_master;
u8 xtal_freq; u8 xtal_freq;
......
...@@ -101,6 +101,9 @@ static int fc0012_init(struct dvb_frontend *fe) ...@@ -101,6 +101,9 @@ static int fc0012_init(struct dvb_frontend *fe)
if (priv->dual_master) if (priv->dual_master)
reg[0x0c] |= 0x02; reg[0x0c] |= 0x02;
if (priv->cfg->loop_through)
reg[0x09] |= 0x01;
if (fe->ops.i2c_gate_ctrl) if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */
...@@ -445,6 +448,7 @@ struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe, ...@@ -445,6 +448,7 @@ struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
return NULL; return NULL;
priv->i2c = i2c; priv->i2c = i2c;
priv->cfg = cfg;
priv->dual_master = cfg->dual_master; priv->dual_master = cfg->dual_master;
priv->addr = cfg->i2c_address; priv->addr = cfg->i2c_address;
priv->xtal_freq = cfg->xtal_freq; priv->xtal_freq = cfg->xtal_freq;
...@@ -453,6 +457,9 @@ struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe, ...@@ -453,6 +457,9 @@ struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
fe->tuner_priv = priv; fe->tuner_priv = priv;
if (priv->cfg->loop_through)
fc0012_writereg(priv, 0x09, 0x6f);
memcpy(&fe->ops.tuner_ops, &fc0012_tuner_ops, memcpy(&fe->ops.tuner_ops, &fc0012_tuner_ops,
sizeof(struct dvb_tuner_ops)); sizeof(struct dvb_tuner_ops));
......
...@@ -36,6 +36,11 @@ struct fc0012_config { ...@@ -36,6 +36,11 @@ struct fc0012_config {
enum fc001x_xtal_freq xtal_freq; enum fc001x_xtal_freq xtal_freq;
int dual_master; int dual_master;
/*
* RF loop-through
*/
bool loop_through;
}; };
#if defined(CONFIG_MEDIA_TUNER_FC0012) || \ #if defined(CONFIG_MEDIA_TUNER_FC0012) || \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment