summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/tda827x.c
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2007-04-27 19:31:15 +0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 22:43:36 +0400
commit68717583557341874b2eea4dea36635256e932b6 (patch)
tree1a6d49b3e94ac29929a0cba79e96404643782d37 /drivers/media/dvb/frontends/tda827x.c
parent06be3035f96d73cf64dc20a8ee37c902d7a2ff2d (diff)
downloadlinux-68717583557341874b2eea4dea36635256e932b6.tar.xz
V4L/DVB (5319): Set tda827x to sleep mode after attach
This change sets the tda827x to sleep mode right after attach in dvb mode. It is just to save power. For the same reason, the ADC of the tda10046 gets turned off in sleep mode. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/tda827x.c')
-rw-r--r--drivers/media/dvb/frontends/tda827x.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/tda827x.c b/drivers/media/dvb/frontends/tda827x.c
index cff2d1fa4094..1fa58c5dac0f 100644
--- a/drivers/media/dvb/frontends/tda827x.c
+++ b/drivers/media/dvb/frontends/tda827x.c
@@ -426,6 +426,7 @@ struct dvb_frontend *tda827x_attach(struct dvb_frontend *fe, int addr,
{
struct tda827x_priv *priv = NULL;
u8 data;
+ u8 sb_msg[] = { 0x30, 0xd0 };
struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD,
.buf = &data, .len = 1 };
dprintk("%s:\n", __FUNCTION__);
@@ -446,15 +447,21 @@ struct dvb_frontend *tda827x_attach(struct dvb_frontend *fe, int addr,
priv->i2c_addr = addr;
priv->i2c_adap = i2c;
priv->cfg = cfg;
+
+ msg.flags = 0;
+ msg.buf = sb_msg;
+ msg.len = sizeof(sb_msg);
+
if ((data & 0x3c) == 0) {
dprintk("tda827x tuner found\n");
memcpy(&fe->ops.tuner_ops, &tda827xo_tuner_ops, sizeof(struct dvb_tuner_ops));
} else {
dprintk("tda827xa tuner found\n");
memcpy(&fe->ops.tuner_ops, &tda827xa_tuner_ops, sizeof(struct dvb_tuner_ops));
+ sb_msg[1] = 0x90;
}
fe->tuner_priv = priv;
-
+ i2c_transfer(i2c, &msg, 1);
return fe;
}
EXPORT_SYMBOL(tda827x_attach);