aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tda8290.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-10-24 08:30:17 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:01:14 -0500
commita72dd305f99f6c6e4eff01478ae53fc80ce98fb1 (patch)
tree03f53efd4e97240ab08816b6183d98fd85adcb47 /drivers/media/video/tda8290.c
parent2be1b48fd27a3b6878db034288ed571b03df3a5c (diff)
V4L/DVB (6448): tda8290: fill i2c_gate_ctrl callback
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tda8290.c')
-rw-r--r--drivers/media/video/tda8290.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c
index 1b19b93eabec..5975c548b8a6 100644
--- a/drivers/media/video/tda8290.c
+++ b/drivers/media/video/tda8290.c
@@ -50,14 +50,15 @@ struct tda8290_priv {
50 50
51/*---------------------------------------------------------------------*/ 51/*---------------------------------------------------------------------*/
52 52
53static void tda8290_i2c_bridge(struct dvb_frontend *fe, int close) 53static int tda8290_i2c_bridge(struct dvb_frontend *fe, int close)
54{ 54{
55 struct tda8290_priv *priv = fe->analog_demod_priv; 55 struct tda8290_priv *priv = fe->analog_demod_priv;
56 56
57 unsigned char enable[2] = { 0x21, 0xC0 }; 57 unsigned char enable[2] = { 0x21, 0xC0 };
58 unsigned char disable[2] = { 0x21, 0x00 }; 58 unsigned char disable[2] = { 0x21, 0x00 };
59 unsigned char *msg; 59 unsigned char *msg;
60 if(close) { 60
61 if (close) {
61 msg = enable; 62 msg = enable;
62 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2); 63 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
63 /* let the bridge stabilize */ 64 /* let the bridge stabilize */
@@ -66,9 +67,11 @@ static void tda8290_i2c_bridge(struct dvb_frontend *fe, int close)
66 msg = disable; 67 msg = disable;
67 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2); 68 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
68 } 69 }
70
71 return 0;
69} 72}
70 73
71static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close) 74static int tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
72{ 75{
73 struct tda8290_priv *priv = fe->analog_demod_priv; 76 struct tda8290_priv *priv = fe->analog_demod_priv;
74 77
@@ -76,6 +79,7 @@ static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
76 unsigned char disable[2] = { 0x46, 0x00 }; 79 unsigned char disable[2] = { 0x46, 0x00 };
77 unsigned char buf[3] = { 0x45, 0x01, 0x00 }; 80 unsigned char buf[3] = { 0x45, 0x01, 0x00 };
78 unsigned char *msg; 81 unsigned char *msg;
82
79 if (close) { 83 if (close) {
80 msg = enable; 84 msg = enable;
81 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2); 85 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
@@ -94,6 +98,8 @@ static void tda8295_i2c_bridge(struct dvb_frontend *fe, int close)
94 msg[1] |= 0x04; 98 msg[1] |= 0x04;
95 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2); 99 tuner_i2c_xfer_send(&priv->i2c_props, msg, 2);
96 } 100 }
101
102 return 0;
97} 103}
98 104
99/*---------------------------------------------------------------------*/ 105/*---------------------------------------------------------------------*/
@@ -517,6 +523,7 @@ static struct analog_tuner_ops tda8290_tuner_ops = {
517 .has_signal = tda8290_has_signal, 523 .has_signal = tda8290_has_signal,
518 .standby = tda8290_standby, 524 .standby = tda8290_standby,
519 .release = tda829x_release, 525 .release = tda829x_release,
526 .i2c_gate_ctrl = tda8290_i2c_bridge,
520}; 527};
521 528
522static struct analog_tuner_ops tda8295_tuner_ops = { 529static struct analog_tuner_ops tda8295_tuner_ops = {
@@ -525,6 +532,7 @@ static struct analog_tuner_ops tda8295_tuner_ops = {
525 .has_signal = tda8295_has_signal, 532 .has_signal = tda8295_has_signal,
526 .standby = tda8295_standby, 533 .standby = tda8295_standby,
527 .release = tda829x_release, 534 .release = tda829x_release,
535 .i2c_gate_ctrl = tda8295_i2c_bridge,
528}; 536};
529 537
530int tda8290_attach(struct tuner *t) 538int tda8290_attach(struct tuner *t)