From patchwork Tue May 5 16:54:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 6339881 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A64F7BEEE5 for ; Tue, 5 May 2015 16:54:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C99A3201EC for ; Tue, 5 May 2015 16:54:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB288201F2 for ; Tue, 5 May 2015 16:54:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761089AbbEEQyi (ORCPT ); Tue, 5 May 2015 12:54:38 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:35879 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761069AbbEEQyf (ORCPT ); Tue, 5 May 2015 12:54:35 -0400 Received: by lbbqq2 with SMTP id qq2so133480332lbb.3 for ; Tue, 05 May 2015 09:54:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=mZ0px+NORzVPhD6Q7TXodZgxfmVJrl1QcsGelVPNjKY=; b=AfV6dAFmz1vOs7suXO0QpcvhKRkpKSsV5zgkK4Ro/LXQH1U4qTP+qxHEryEM33xFG+ SImKaXCVRQLueCxd9AyN5SiSAEMGpjNdO3O6zgTV63SRX4FD7vru513rsXZ0c+dI07Rp fn0E8beNLBkDtK1/ipoQHsUhH854rjeGYixaz2Si8G7dZdN9T2GvV17jbbJKILZlv31M HB6DRiA9ZpoAMwoKL+gfoq81u2WjRdkd1lKfjo1ZZzco9dLTR46rkcX7s8KCCFCyVWNA zSc+VjBGmcSNKjdDMJO/P8CqPEKmVlVnrEx4gG6BgXv0EPEr5pDuW2E7zWbLin7B+QGZ p7Fg== X-Gm-Message-State: ALoCoQnVfwMFxIwsjT2hu4Tiug8Pkt2ISTOU2R0uaOEVSX7B5iyJLOMVHx2FmIFUptkv4WozucYB X-Received: by 10.112.125.138 with SMTP id mq10mr3831995lbb.35.1430844874245; Tue, 05 May 2015 09:54:34 -0700 (PDT) Received: from dl160.lan (188-67-118-178.bb.dnainternet.fi. [188.67.118.178]) by mx.google.com with ESMTPSA id z1sm4177919laz.48.2015.05.05.09.54.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 May 2015 09:54:33 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: Olli Salonen Subject: [PATCH v4 1/6] si2168: add support for gapped clock Date: Tue, 5 May 2015 19:54:14 +0300 Message-Id: <1430844859-24947-2-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430844859-24947-1-git-send-email-olli.salonen@iki.fi> References: <1430844859-24947-1-git-send-email-olli.salonen@iki.fi> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a parameter in si2168_config to support gapped clock. This might be necessary on some devices with higher bitrates. Signed-off-by: Olli Salonen --- drivers/media/dvb-frontends/si2168.c | 3 +++ drivers/media/dvb-frontends/si2168.h | 3 +++ drivers/media/dvb-frontends/si2168_priv.h | 1 + 3 files changed, 7 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 5db588e..29a5936 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -508,6 +508,8 @@ static int si2168_init(struct dvb_frontend *fe) /* set ts mode */ memcpy(cmd.args, "\x14\x00\x01\x10\x10\x00", 6); cmd.args[4] |= dev->ts_mode; + if (dev->ts_clock_gapped) + cmd.args[4] |= 0x40; cmd.wlen = 6; cmd.rlen = 4; ret = si2168_cmd_execute(client, &cmd); @@ -688,6 +690,7 @@ static int si2168_probe(struct i2c_client *client, *config->fe = &dev->fe; dev->ts_mode = config->ts_mode; dev->ts_clock_inv = config->ts_clock_inv; + dev->ts_clock_gapped = config->ts_clock_gapped; dev->fw_loaded = false; i2c_set_clientdata(client, dev); diff --git a/drivers/media/dvb-frontends/si2168.h b/drivers/media/dvb-frontends/si2168.h index 70d702a..3225d0c 100644 --- a/drivers/media/dvb-frontends/si2168.h +++ b/drivers/media/dvb-frontends/si2168.h @@ -42,6 +42,9 @@ struct si2168_config { /* TS clock inverted */ bool ts_clock_inv; + + /* TS clock gapped */ + bool ts_clock_gapped; }; #endif diff --git a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h index d7efce8..d2589e3 100644 --- a/drivers/media/dvb-frontends/si2168_priv.h +++ b/drivers/media/dvb-frontends/si2168_priv.h @@ -38,6 +38,7 @@ struct si2168_dev { bool fw_loaded; u8 ts_mode; bool ts_clock_inv; + bool ts_clock_gapped; }; /* firmware command struct */