From patchwork Thu Sep 20 01:05:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 1481901 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 0AAE6400EC for ; Thu, 20 Sep 2012 01:06:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751273Ab2ITBGr (ORCPT ); Wed, 19 Sep 2012 21:06:47 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:54606 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751200Ab2ITBGd (ORCPT ); Wed, 19 Sep 2012 21:06:33 -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 1TEVDs-0003Yl-5i; Thu, 20 Sep 2012 04:06:32 +0300 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Antti Palosaari , Michael Krufky Subject: [PATCH 2/3] em28xx: PCTV 290e sleep tda18271 after attach Date: Thu, 20 Sep 2012 04:05:29 +0300 Message-Id: <1348103130-1777-2-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 (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 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 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,