|
@@ -223,6 +223,7 @@ static int af9033_init(struct dvb_frontend *fe)
|
|
|
{ 0x80f986, state->ts_mode_parallel, 0x01 },
|
|
|
{ 0x00d827, 0x00, 0xff },
|
|
|
{ 0x00d829, 0x00, 0xff },
|
|
|
+ { 0x800045, state->cfg.adc_multiplier, 0xff },
|
|
|
};
|
|
|
|
|
|
/* program clock control */
|
|
@@ -322,6 +323,14 @@ static int af9033_init(struct dvb_frontend *fe)
|
|
|
len = ARRAY_SIZE(tuner_init_fc0012);
|
|
|
init = tuner_init_fc0012;
|
|
|
break;
|
|
|
+ case AF9033_TUNER_IT9135_38:
|
|
|
+ case AF9033_TUNER_IT9135_51:
|
|
|
+ case AF9033_TUNER_IT9135_52:
|
|
|
+ case AF9033_TUNER_IT9135_60:
|
|
|
+ case AF9033_TUNER_IT9135_61:
|
|
|
+ case AF9033_TUNER_IT9135_62:
|
|
|
+ len = 0;
|
|
|
+ break;
|
|
|
default:
|
|
|
dev_dbg(&state->i2c->dev, "%s: unsupported tuner ID=%d\n",
|
|
|
__func__, state->cfg.tuner);
|
|
@@ -498,12 +507,7 @@ static int af9033_set_frontend(struct dvb_frontend *fe)
|
|
|
if (spec_inv == -1)
|
|
|
freq_cw = 0x800000 - freq_cw;
|
|
|
|
|
|
- /* get adc multiplies */
|
|
|
- ret = af9033_rd_reg(state, 0x800045, &tmp);
|
|
|
- if (ret < 0)
|
|
|
- goto err;
|
|
|
-
|
|
|
- if (tmp == 1)
|
|
|
+ if (state->cfg.adc_multiplier == AF9033_ADC_MULTIPLIER_2X)
|
|
|
freq_cw /= 2;
|
|
|
|
|
|
buf[0] = (freq_cw >> 0) & 0xff;
|
|
@@ -933,14 +937,18 @@ struct dvb_frontend *af9033_attach(const struct af9033_config *config,
|
|
|
"OFDM=%d.%d.%d.%d\n", KBUILD_MODNAME, buf[0], buf[1],
|
|
|
buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
|
|
|
|
|
|
- /* sleep */
|
|
|
- ret = af9033_wr_reg(state, 0x80004c, 1);
|
|
|
- if (ret < 0)
|
|
|
- goto err;
|
|
|
|
|
|
- ret = af9033_wr_reg(state, 0x800000, 0);
|
|
|
- if (ret < 0)
|
|
|
- goto err;
|
|
|
+ /* FIXME: Do not abuse adc_multiplier for detecting IT9135 */
|
|
|
+ if (state->cfg.adc_multiplier != AF9033_ADC_MULTIPLIER_2X) {
|
|
|
+ /* sleep */
|
|
|
+ ret = af9033_wr_reg(state, 0x80004c, 1);
|
|
|
+ if (ret < 0)
|
|
|
+ goto err;
|
|
|
+
|
|
|
+ ret = af9033_wr_reg(state, 0x800000, 0);
|
|
|
+ if (ret < 0)
|
|
|
+ goto err;
|
|
|
+ }
|
|
|
|
|
|
/* configure internal TS mode */
|
|
|
switch (state->cfg.ts_mode) {
|