dev_dbg(&priv->client->dev, "%s:\n", __func__);
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
-
/* dummy I2C to ensure I2C wakes up */
ret = e4000_wr_reg(priv, 0x02, 0x40);
if (ret < 0)
goto err;
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
priv->active = true;
-
- return 0;
err:
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
+ if (ret)
+ dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
- dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
priv->active = false;
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
-
ret = e4000_wr_reg(priv, 0x00, 0x00);
if (ret < 0)
goto err;
-
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
- return 0;
err:
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
+ if (ret)
+ dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
- dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
__func__, c->delivery_system, c->frequency,
c->bandwidth_hz);
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
-
/* gain control manual */
ret = e4000_wr_reg(priv, 0x1a, 0x00);
if (ret < 0)
ret = e4000_wr_reg(priv, 0x1a, 0x17);
if (ret < 0)
goto err;
-
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
- return 0;
err:
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
+ if (ret)
+ dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
- dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
struct e4000_priv *priv = fe->tuner_priv;
int ret;
u8 u8tmp;
+
dev_dbg(&priv->client->dev, "%s: lna auto=%d->%d val=%d->%d\n",
__func__, priv->lna_gain_auto->cur.val,
priv->lna_gain_auto->val, priv->lna_gain->cur.val,
priv->lna_gain->val);
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
-
if (priv->lna_gain_auto->val && priv->if_gain_auto->cur.val)
u8tmp = 0x17;
else if (priv->lna_gain_auto->val)
if (ret)
goto err;
}
-
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
- return 0;
err:
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
+ if (ret)
+ dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
- dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
struct e4000_priv *priv = fe->tuner_priv;
int ret;
u8 u8tmp;
+
dev_dbg(&priv->client->dev, "%s: mixer auto=%d->%d val=%d->%d\n",
__func__, priv->mixer_gain_auto->cur.val,
priv->mixer_gain_auto->val, priv->mixer_gain->cur.val,
priv->mixer_gain->val);
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
-
if (priv->mixer_gain_auto->val)
u8tmp = 0x15;
else
if (ret)
goto err;
}
-
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
- return 0;
err:
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
+ if (ret)
+ dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
- dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
int ret;
u8 buf[2];
u8 u8tmp;
+
dev_dbg(&priv->client->dev, "%s: if auto=%d->%d val=%d->%d\n",
__func__, priv->if_gain_auto->cur.val,
priv->if_gain_auto->val, priv->if_gain->cur.val,
priv->if_gain->val);
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
-
if (priv->if_gain_auto->val && priv->lna_gain_auto->cur.val)
u8tmp = 0x17;
else if (priv->lna_gain_auto->cur.val)
if (ret)
goto err;
}
-
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
- return 0;
err:
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
+ if (ret)
+ dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
- dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
return ret;
}
if (priv->active == false)
return 0;
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
-
ret = e4000_rd_reg(priv, 0x07, &u8tmp);
if (ret)
goto err;
priv->pll_lock->val = (u8tmp & 0x01);
err:
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
if (ret)
dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret);
struct dvb_frontend *fe = priv->fe;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int ret;
+
dev_dbg(&priv->client->dev,
"%s: id=%d name=%s val=%d min=%d max=%d step=%d\n",
__func__, ctrl->id, ctrl->name, ctrl->val,
int ret;
u8 chip_id;
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 1);
-
priv = kzalloc(sizeof(struct e4000_priv), GFP_KERNEL);
if (!priv) {
ret = -ENOMEM;
v4l2_set_subdevdata(&priv->sd, client);
i2c_set_clientdata(client, &priv->sd);
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
-
return 0;
err:
- if (fe->ops.i2c_gate_ctrl)
- fe->ops.i2c_gate_ctrl(fe, 0);
+ if (ret) {
+ dev_dbg(&client->dev, "%s: failed=%d\n", __func__, ret);
+ kfree(priv);
+ }
- dev_dbg(&client->dev, "%s: failed=%d\n", __func__, ret);
- kfree(priv);
return ret;
}
struct dvb_frontend *fe = priv->fe;
dev_dbg(&client->dev, "%s:\n", __func__);
+
v4l2_ctrl_handler_free(&priv->hdl);
memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
fe->tuner_priv = NULL;