Skip to content

Commit 01b461b

Browse files
Bimow Chenmchehab
authored andcommitted
[media] it913x: init tuner on attach
That register is needed to program very first in order to operate correctly. [[email protected]: returned sequence back, removed sleep, moved reg write earlier to prevent populating tuner ops in case of failure] Cc: <[email protected]> # v3.15+ Signed-off-by: Bimow Chen <[email protected]> Signed-off-by: Antti Palosaari <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 0df6580 commit 01b461b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/media/tuners/tuner_it913x.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ struct dvb_frontend *it913x_attach(struct dvb_frontend *fe,
396396
struct i2c_adapter *i2c_adap, u8 i2c_addr, u8 config)
397397
{
398398
struct it913x_state *state = NULL;
399+
int ret;
399400

400401
/* allocate memory for the internal state */
401402
state = kzalloc(sizeof(struct it913x_state), GFP_KERNEL);
@@ -425,6 +426,11 @@ struct dvb_frontend *it913x_attach(struct dvb_frontend *fe,
425426
state->tuner_type = config;
426427
state->firmware_ver = 1;
427428

429+
/* tuner RF initial */
430+
ret = it913x_wr_reg(state, PRO_DMOD, 0xec4c, 0x68);
431+
if (ret < 0)
432+
goto error;
433+
428434
fe->tuner_priv = state;
429435
memcpy(&fe->ops.tuner_ops, &it913x_tuner_ops,
430436
sizeof(struct dvb_tuner_ops));

0 commit comments

Comments
 (0)