28 u8 buf[3] = {
reg, (val >> 8) & 0xff, (val >> 0) & 0xff };
31 .addr = priv->
cfg->i2c_addr,
42 dev_warn(&priv->
i2c->dev,
"%s: i2c wr failed=%d reg=%02x\n",
43 KBUILD_MODNAME, ret, reg);
99 if (fe->
ops.i2c_gate_ctrl)
100 fe->
ops.i2c_gate_ctrl(fe, 1);
103 ret = tua9001_wr_reg(priv, data[i].reg, data[i].val);
105 goto err_i2c_gate_ctrl;
109 if (fe->
ops.i2c_gate_ctrl)
110 fe->
ops.i2c_gate_ctrl(fe, 0);
113 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
130 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
144 dev_dbg(&priv->
i2c->dev,
"%s: delivery_system=%d frequency=%d " \
145 "bandwidth_hz=%d\n", __func__,
184 if (fe->
ops.i2c_gate_ctrl)
185 fe->
ops.i2c_gate_ctrl(fe, 1);
191 goto err_i2c_gate_ctrl;
195 ret = tua9001_wr_reg(priv, data[i].reg, data[i].val);
197 goto err_i2c_gate_ctrl;
204 goto err_i2c_gate_ctrl;
208 if (fe->
ops.i2c_gate_ctrl)
209 fe->
ops.i2c_gate_ctrl(fe, 0);
212 dev_dbg(&priv->
i2c->dev,
"%s: failed=%d\n", __func__, ret);
217 static int tua9001_get_if_frequency(
struct dvb_frontend *fe,
u32 *frequency)
230 .name =
"Infineon TUA 9001",
232 .frequency_min = 170000000,
233 .frequency_max = 862000000,
237 .release = tua9001_release,
239 .init = tua9001_init,
240 .sleep = tua9001_sleep,
241 .set_params = tua9001_set_params,
243 .get_if_frequency = tua9001_get_if_frequency,
277 "%s: Infineon TUA 9001 successfully attached\n",
280 memcpy(&fe->
ops.tuner_ops, &tua9001_tuner_ops,
286 dev_dbg(&i2c->
dev,
"%s: failed=%d\n", __func__, ret);