summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorBimow Chen <Bimow.Chen@ite.com.tw>2014-08-05 00:14:47 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-09-04 12:23:22 -0300
commit01b461bbe74b89da8941f4c95711777d87b9172e (patch)
tree18b09209390672de8d89061a98fe32bc4081e04e /drivers/media
parent0df6580c5fc115034de29aa52af5cf6bd83d37d8 (diff)
[media] it913x: init tuner on attach
That register is needed to program very first in order to operate correctly. [crope@iki.fi: returned sequence back, removed sleep, moved reg write earlier to prevent populating tuner ops in case of failure] Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: Bimow Chen <Bimow.Chen@ite.com.tw> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/tuners/tuner_it913x.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/tuners/tuner_it913x.c b/drivers/media/tuners/tuner_it913x.c
index 6f30d7e535b..3d83c425bcc 100644
--- a/drivers/media/tuners/tuner_it913x.c
+++ b/drivers/media/tuners/tuner_it913x.c
@@ -396,6 +396,7 @@ struct dvb_frontend *it913x_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c_adap, u8 i2c_addr, u8 config)
{
struct it913x_state *state = NULL;
+ int ret;
/* allocate memory for the internal state */
state = kzalloc(sizeof(struct it913x_state), GFP_KERNEL);
@@ -425,6 +426,11 @@ struct dvb_frontend *it913x_attach(struct dvb_frontend *fe,
state->tuner_type = config;
state->firmware_ver = 1;
+ /* tuner RF initial */
+ ret = it913x_wr_reg(state, PRO_DMOD, 0xec4c, 0x68);
+ if (ret < 0)
+ goto error;
+
fe->tuner_priv = state;
memcpy(&fe->ops.tuner_ops, &it913x_tuner_ops,
sizeof(struct dvb_tuner_ops));