]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] it913x: fix tuner sleep power leak
authorAntti Palosaari <crope@iki.fi>
Sat, 9 Aug 2014 03:15:05 +0000 (00:15 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 21 Sep 2014 20:22:11 +0000 (17:22 -0300)
IT913x tuner driver disables own clock, provided by demod core, as
very a first operation when tuner is put on *sleep*. That likely
causes failure of all the rest commands on sleep sequence, which
leads situation where tuner is not actually on sleep, but consuming
a lot of power.

I measured 102mA current consumption from the USB before change
and after change it was only 32mA. Used device was single tuner
IT9135 BX.

Second reason to remove that register from tuner driver is reason
it is simply on wrong driver (demod vs. tuner), breaking the
principle of correct driver.

Clock is now provided more correctly af9033 demod driver as a
config option.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/tuners/tuner_it913x.c
drivers/media/tuners/tuner_it913x_priv.h

index 3d83c425bccf704a4ff174c4bab6b505d4a9ee3a..3265d9ab3c671b943a7576f6e3b686cded99c9e3 100644 (file)
@@ -202,7 +202,6 @@ static int it913x_init(struct dvb_frontend *fe)
 
        /* Power Up Tuner - common all versions */
        ret = it913x_wr_reg(state, PRO_DMOD, 0xec40, 0x1);
-       ret |= it913x_wr_reg(state, PRO_DMOD, 0xfba8, 0x0);
        ret |= it913x_wr_reg(state, PRO_DMOD, 0xec57, 0x0);
        ret |= it913x_wr_reg(state, PRO_DMOD, 0xec58, 0x0);
 
index ce652108aa5dc9c555361d3fd807296af38277c9..8e85a61ea5f9aacf7af5bacb18c3d9ab40435730 100644 (file)
@@ -38,7 +38,6 @@ struct it913xset {    u32 pro;
 
 /* Tuner setting scripts (still keeping it9137) */
 static struct it913xset it9137_tuner_off[] = {
-       {PRO_DMOD, 0xfba8, {0x01}, 0x01}, /* Tuner Clock Off  */
        {PRO_DMOD, 0xec40, {0x00}, 0x01}, /* Power Down Tuner */
        {PRO_DMOD, 0xec02, {0x3f, 0x1f, 0x3f, 0x3f}, 0x04},
        {PRO_DMOD, 0xec06, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,