From patchwork Mon Sep 17 02:26:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 1464811 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 71CEE3FCFC for ; Mon, 17 Sep 2012 02:27:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819Ab2IQC11 (ORCPT ); Sun, 16 Sep 2012 22:27:27 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:42341 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752805Ab2IQC10 (ORCPT ); Sun, 16 Sep 2012 22:27:26 -0400 Received: from dyn3-82-128-184-7.psoas.suomi.net ([82.128.184.7] helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TDR3V-00015I-70; Mon, 17 Sep 2012 05:27:25 +0300 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Antti Palosaari Subject: [PATCH 3/3] af9033: sleep on attach Date: Mon, 17 Sep 2012 05:26:57 +0300 Message-Id: <1347848817-18607-3-git-send-email-crope@iki.fi> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1347848817-18607-1-git-send-email-crope@iki.fi> References: <1347848817-18607-1-git-send-email-crope@iki.fi> X-SA-Exim-Connect-IP: 82.128.184.7 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 power consumption 10mA. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9033.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c index 0979ada..56e9611 100644 --- a/drivers/media/dvb-frontends/af9033.c +++ b/drivers/media/dvb-frontends/af9033.c @@ -909,6 +909,15 @@ struct dvb_frontend *af9033_attach(const struct af9033_config *config, "OFDM=%d.%d.%d.%d\n", KBUILD_MODNAME, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]); + /* sleep */ + ret = af9033_wr_reg(state, 0x80004c, 1); + if (ret < 0) + goto err; + + ret = af9033_wr_reg(state, 0x800000, 0); + if (ret < 0) + goto err; + /* configure internal TS mode */ switch (state->cfg.ts_mode) { case AF9033_TS_MODE_PARALLEL: