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

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

 



This reduces device IDLE power consumption 180mA.

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 c97ffc6..5b7f2b3 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -1137,6 +1137,16 @@ static int em28xx_dvb_init(struct em28xx *dev)
 				result = -EINVAL;
 				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;
+			}
 		}
 		break;
 	case EM2884_BOARD_CINERGY_HTC_STICK:
-- 
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