From patchwork Sun Apr 9 19:38:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9671741 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 4B22B600CB for ; Sun, 9 Apr 2017 19:39:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3752126E8A for ; Sun, 9 Apr 2017 19:39:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C41A27F10; Sun, 9 Apr 2017 19:39:01 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 310E626E8A for ; Sun, 9 Apr 2017 19:39:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752644AbdDITi7 (ORCPT ); Sun, 9 Apr 2017 15:38:59 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33424 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440AbdDITit (ORCPT ); Sun, 9 Apr 2017 15:38:49 -0400 Received: by mail-wm0-f65.google.com with SMTP id o81so6391284wmb.0 for ; Sun, 09 Apr 2017 12:38:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oqz88nxNN4aWI3scl0NpXU+a5HiApPyiLMXWA6xCplY=; b=kNI945/1CIDjfhrt9uSMDEr8g6j+gAsdA+H939DXQgwNCAwiQGsRYzUzmnKveMDurC H9E9IOAjrfAGlcxJIOjCmC9L7aVPygQrZa2xtPUXZwwKQcQmbe5GnL5t1kLbZoqwYyxR eZRe6rwXDkIHrMDBnktIhrpcVHUes+lwXmu6GVwjRRboZJrFHO3gXXVrTFnNSgsLShWS hHJTpiaMVKAKcocTyRKa/wb+swt3ANCotKK9270rAIWZvR3eML2Z8KpD3bIaLHwS/eD/ Dc71qPC58G/rJxPh0Zo2dHR1pmE5qpXxwX8bCVS3FTVdIcqhjz2hffmg+NW7F71fR8GQ J6bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oqz88nxNN4aWI3scl0NpXU+a5HiApPyiLMXWA6xCplY=; b=Lr/ctM/tnqtULVnpPuRp7Fra03F5P9rXHeSjJ40f/bmUxLnjHK+5cq6nCGjtdqvXMS M7M/qCpZknzgtiqEowJtXJUpjHjX4CWLH+/G/x/cRwI5CLqD2/sf1nAoVXbvbDgC5Em1 PxMQcmQDnDhttU9ho/Z+BME5L0tBQu9U2tBqhKDPCKeFblKhhLIEXKu2L9cnsXf4jspX oS2oT/KcdxurkhtOj3ZRQn3V4h/iaIMLrtHmOJnHa3IM+CW2cefTNzcEnZ4XSAaJCmV7 gSf6CYcwJMBez5bpVUtLFto0n7a0MfrqQeDwC2kf+4qzrYzqqXm/j6KcyrFUp5wO+/zT n0Pg== X-Gm-Message-State: AN3rC/6uKB1whcFf1zhr7zhZAWiZZiEjOnktb2cbp6vLJEAFMLq7/SRi MYPHtK/KaQingz6A X-Received: by 10.28.209.13 with SMTP id i13mr581770wmg.31.1491766723033; Sun, 09 Apr 2017 12:38:43 -0700 (PDT) Received: from dvbdev.wuest.de (ip-37-24-178-151.hsi14.unitymediagroup.de. [37.24.178.151]) by smtp.gmail.com with ESMTPSA id f135sm7441407wmd.7.2017.04.09.12.38.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 09 Apr 2017 12:38:42 -0700 (PDT) From: Daniel Scheller To: aospan@netup.ru, serjk@netup.ru, mchehab@kernel.org, linux-media@vger.kernel.org Cc: rjkm@metzlerbros.de Subject: [PATCH 13/19] [media] dvb-frontends/cxd2841er: configurable IFAGCNEG Date: Sun, 9 Apr 2017 21:38:22 +0200 Message-Id: <20170409193828.18458-14-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170409193828.18458-1-d.scheller.oss@gmail.com> References: <20170409193828.18458-1-d.scheller.oss@gmail.com> 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 From: Daniel Scheller Adds a flag to enable or disable the IFAGCNEG bit in cxd2841er_init_tc(). Signed-off-by: Daniel Scheller Acked-by: Abylay Ospan --- drivers/media/dvb-frontends/cxd2841er.c | 5 +++-- drivers/media/dvb-frontends/cxd2841er.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c index 67d4399..67bd13c 100644 --- a/drivers/media/dvb-frontends/cxd2841er.c +++ b/drivers/media/dvb-frontends/cxd2841er.c @@ -3783,9 +3783,10 @@ static int cxd2841er_init_tc(struct dvb_frontend *fe) dev_dbg(&priv->i2c->dev, "%s() bandwidth_hz=%d\n", __func__, p->bandwidth_hz); cxd2841er_shutdown_to_sleep_tc(priv); - /* SONY_DEMOD_CONFIG_IFAGCNEG = 1 */ + /* SONY_DEMOD_CONFIG_IFAGCNEG = 1 (0 for NO_AGCNEG */ cxd2841er_write_reg(priv, I2C_SLVT, 0x00, 0x10); - cxd2841er_set_reg_bits(priv, I2C_SLVT, 0xcb, 0x40, 0x40); + cxd2841er_set_reg_bits(priv, I2C_SLVT, 0xcb, + ((priv->flags & CXD2841ER_NO_AGCNEG) ? 0x00 : 0x40), 0x40); /* SONY_DEMOD_CONFIG_IFAGC_ADC_FS = 0 */ cxd2841er_write_reg(priv, I2C_SLVT, 0xcd, 0x50); /* SONY_DEMOD_CONFIG_PARALLEL_SEL = 1 */ diff --git a/drivers/media/dvb-frontends/cxd2841er.h b/drivers/media/dvb-frontends/cxd2841er.h index d77b59f..4f94422 100644 --- a/drivers/media/dvb-frontends/cxd2841er.h +++ b/drivers/media/dvb-frontends/cxd2841er.h @@ -30,6 +30,7 @@ #define CXD2841ER_ASCOT 8 /* bit 3 */ #define CXD2841ER_EARLY_TUNE 16 /* bit 4 */ #define CXD2841ER_NO_WAIT_LOCK 32 /* bit 5 */ +#define CXD2841ER_NO_AGCNEG 64 /* bit 6 */ enum cxd2841er_xtal { SONY_XTAL_20500, /* 20.5 MHz */