summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tda8290.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-10-24 08:30:17 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2007-10-24 08:30:17 -0400
commit45e16ceff61bbe8a9d94d5967d909b901bed82bb (patch)
treea17db80f6b97d384349ef115404387a5f88c495d /linux/drivers/media/video/tda8290.c
parent0c2c3851d68bcc621a0e4c3d3b9469da047ed7b7 (diff)
downloadmediapointer-dvb-s2-45e16ceff61bbe8a9d94d5967d909b901bed82bb.tar.gz
mediapointer-dvb-s2-45e16ceff61bbe8a9d94d5967d909b901bed82bb.tar.bz2
tda8290: fill i2c_gate_ctrl callback
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/tda8290.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
Diffstat (limited to 'linux/drivers/media/video/tda8290.c')
-rw-r--r--linux/drivers/media/video/tda8290.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c
index 6cfc8fd92..e4946f9dc 100644
--- a/linux/drivers/media/video/tda8290.c
+++ b/linux/drivers/media/video/tda8290.c
@@ -59,14 +59,15 @@ struct tda8290_priv {
/*---------------------------------------------------------------------*/
-static void tda8290_i2c_bridge(struct dvb_frontend *fe, int close)
+static int tda8290_i2c_bridge(struct dvb_frontend *fe, int close)
{
struct tda8290_priv *priv = fe->analog_demod_priv;
unsigned char enable[2] = { 0x21, 0xC0 };
unsigned char disable[2] = { 0x21, 0x00 };
unsigned char *msg;
- if(close) {
+
+ if (close) {
msg = enable;
tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
/* let the bridge stabilize */
@@ -75,10 +76,12 @@ static void tda8290_i2c_bridge(struct dvb_frontend *fe, int close)
msg = disable;
tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
}
+
+ return 0;
}
#if 1
-static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
+static int tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
{
struct tda8290_priv *priv = fe->analog_demod_priv;
@@ -86,6 +89,7 @@ static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
unsigned char disable[2] = { 0x46, 0x00 };
unsigned char buf[3] = { 0x45, 0x01, 0x00 };
unsigned char *msg;
+
if (close) {
msg = enable;
tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
@@ -104,9 +108,11 @@ static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
msg[1] |= 0x04;
tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
}
+
+ return 0;
}
#else
-static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
+static int tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
{
struct tda8290_priv *priv = fe->analog_demod_priv;
@@ -122,6 +128,8 @@ static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
buf[1] |= 0x80;
tuner_i2c_xfer_send(&priv->i2c_props, buf, 2);
+
+ return 0;
}
#endif
@@ -546,6 +554,7 @@ static struct analog_tuner_ops tda8290_tuner_ops = {
.has_signal = tda8290_has_signal,
.standby = tda8290_standby,
.release = tda829x_release,
+ .i2c_gate_ctrl = tda8290_i2c_bridge,
};
static struct analog_tuner_ops tda8295_tuner_ops = {
@@ -554,6 +563,7 @@ static struct analog_tuner_ops tda8295_tuner_ops = {
.has_signal = tda8295_has_signal,
.standby = tda8295_standby,
.release = tda829x_release,
+ .i2c_gate_ctrl = tda8295_i2c_bridge,
};
int tda8290_attach(struct tuner *t)