]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] af9033: sleep on attach
authorAntti Palosaari <crope@iki.fi>
Mon, 17 Sep 2012 01:26:57 +0000 (22:26 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 27 Sep 2012 07:27:30 +0000 (04:27 -0300)
This reduces power consumption 10mA.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb-frontends/af9033.c

index 0979ada2a20ad762cd0a77a4a1e5deff1aef2c3d..56e9611c0abb33d8d4fd5962ee1be0faaf2d2cb0 100644 (file)
@@ -909,6 +909,15 @@ struct dvb_frontend *af9033_attach(const struct af9033_config *config,
                        "OFDM=%d.%d.%d.%d\n", KBUILD_MODNAME, buf[0], buf[1],
                        buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
 
+       /* sleep */
+       ret = af9033_wr_reg(state, 0x80004c, 1);
+       if (ret < 0)
+               goto err;
+
+       ret = af9033_wr_reg(state, 0x800000, 0);
+       if (ret < 0)
+               goto err;
+
        /* configure internal TS mode */
        switch (state->cfg.ts_mode) {
        case AF9033_TS_MODE_PARALLEL: