[PATCH 2/3] em28xx: PCTV 290e sleep tda18271 after attach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This reduces device IDLE power consumption 180mA (260mA => 80mA).

I would like to see solution where tda18271 driver puts chips on
sleep by default and leaves it powered according to driver config
option. Michael declined it, as it could cause regression, and
asked to sleep explicitly after attach.

Cc: Michael Krufky <mkrufky@xxxxxxxxxxx>
Signed-off-by: Antti Palosaari <crope@xxxxxx>
---
 drivers/media/usb/em28xx/em28xx-dvb.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index be242ac..c97ffc6 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -1002,6 +1002,16 @@ static int em28xx_dvb_init(struct em28xx *dev)
 				goto out_free;
 			}
 
+			/*
+			 * We should put tda18271 explicitly sleep in order to
+			 * reduce IDLE power consumption 180mA
+			 */
+			result = dvb->fe[0]->ops.tuner_ops.sleep(dvb->fe[0]);
+			if (result) {
+				dvb_frontend_detach(dvb->fe[0]);
+				goto out_free;
+			}
+
 #ifdef CONFIG_GPIOLIB
 			/* enable LNA for DVB-T, DVB-T2 and DVB-C */
 			result = gpio_request_one(dvb->gpio,
-- 
1.7.11.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux