From patchwork Thu Sep 20 01:05:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 1481911 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B9EB740113 for ; Thu, 20 Sep 2012 01:06:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751200Ab2ITBGs (ORCPT ); Wed, 19 Sep 2012 21:06:48 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:41150 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213Ab2ITBGf (ORCPT ); Wed, 19 Sep 2012 21:06:35 -0400 Received: from dyn3-82-128-186-237.psoas.suomi.net ([82.128.186.237] helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TEVDt-0003Yl-PS; Thu, 20 Sep 2012 04:06:33 +0300 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Antti Palosaari , Michael Krufky Subject: [PATCH 3/3] em28xx: PCTV 520e sleep tda18271 after attach Date: Thu, 20 Sep 2012 04:05:30 +0300 Message-Id: <1348103130-1777-3-git-send-email-crope@iki.fi> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1348103130-1777-1-git-send-email-crope@iki.fi> References: <1348103130-1777-1-git-send-email-crope@iki.fi> X-SA-Exim-Connect-IP: 82.128.186.237 X-SA-Exim-Mail-From: crope@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Signed-off-by: Antti Palosaari --- 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: