From patchwork Thu Jun 15 03:31:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 9787963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7FF3660231 for ; Thu, 15 Jun 2017 03:31:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76AB1285A0 for ; Thu, 15 Jun 2017 03:31:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B792285A9; Thu, 15 Jun 2017 03:31:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A0F4285A0 for ; Thu, 15 Jun 2017 03:31:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbdFODbk (ORCPT ); Wed, 14 Jun 2017 23:31:40 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:42385 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752042AbdFODbg (ORCPT ); Wed, 14 Jun 2017 23:31:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=l62tizbuFClarK3gJICznyg85F00ZY6iPMil0JJ0QxY=; b=svbo+V8etR9epOCYhrEEu9nPgUubCS10eENatU5Girdi645N20+qZVaSLMU7kXCpwDoG/YgWW0nrp4aOix753nrL5iVhrVtfOyZ5EF9YxFBNQuiWvL62TT2bOZN0onMBjLPhmcuUMNI1jLKG9KTANAbl8T9a4pHnlFQgMPbYKgT8khrwXeeHBkIJ4AuaMapx38wxI5HPhio2r5Tf7QojxDPs2MtmGJg69cZ4MQTR8XDTmxWtScUKmPvccxxpWK95qRLzsgy0z1wyehs0PR8jF7ksjwo2cjjwSovFaKdNXlHdrnappJkIIue8ZifcODuFDMJwCTvnJNIgw3cvVDpxBg==; Received: from dyn3-82-128-189-68.psoas.suomi.net ([82.128.189.68] helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLLVO-0001Yv-Ou; Thu, 15 Jun 2017 06:31:34 +0300 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Antti Palosaari Subject: [PATCH 12/15] af9013: remove unneeded register writes Date: Thu, 15 Jun 2017 06:31:02 +0300 Message-Id: <20170615033105.13517-12-crope@iki.fi> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170615033105.13517-1-crope@iki.fi> References: <20170615033105.13517-1-crope@iki.fi> X-SA-Exim-Connect-IP: 82.128.189.68 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 X-Virus-Scanned: ClamAV using ClamSMTP Removed register writes are already chip defaults, are not required, are set later or belong to AF9015 USB interface. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 42 ------------------------------------ 1 file changed, 42 deletions(-) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index 6b86437..63c532a 100644 --- a/drivers/media/dvb-frontends/af9013.c +++ b/drivers/media/dvb-frontends/af9013.c @@ -894,11 +894,6 @@ static int af9013_init(struct dvb_frontend *fe) if (ret) goto err; - /* enable ADC */ - ret = regmap_write(state->regmap, 0xd73a, 0xa4); - if (ret) - goto err; - /* write API version to firmware */ ret = regmap_bulk_write(state->regmap, 0x9bf2, state->api_version, 4); if (ret) @@ -935,43 +930,6 @@ static int af9013_init(struct dvb_frontend *fe) if (ret) goto err; - /* set I2C master clock */ - ret = regmap_write(state->regmap, 0xd416, 0x14); - if (ret) - goto err; - - /* set 16 embx */ - ret = regmap_update_bits(state->regmap, 0xd700, 0x02, 0x02); - if (ret) - goto err; - - /* set no trigger */ - ret = regmap_update_bits(state->regmap, 0xd700, 0x04, 0x00); - if (ret) - goto err; - - /* set read-update bit for constellation */ - ret = regmap_update_bits(state->regmap, 0xd371, 0x02, 0x02); - if (ret) - goto err; - - /* settings for mp2if */ - if (state->ts_mode == AF9013_TS_MODE_USB) { - /* AF9015 split PSB to 1.5k + 0.5k */ - ret = regmap_update_bits(state->regmap, 0xd50b, 0x04, 0x04); - if (ret) - goto err; - } else { - /* AF9013 set mpeg to full speed */ - ret = regmap_update_bits(state->regmap, 0xd502, 0x10, 0x10); - if (ret) - goto err; - } - - ret = regmap_update_bits(state->regmap, 0xd520, 0x10, 0x10); - if (ret) - goto err; - /* load OFSM settings */ dev_dbg(&client->dev, "load ofsm settings\n"); len = ARRAY_SIZE(ofsm_init);