From patchwork Wed Apr 29 16:36:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 6297071 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6BEF49F32B for ; Wed, 29 Apr 2015 16:37:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7831A201CD for ; Wed, 29 Apr 2015 16:37:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 034AB201BB for ; Wed, 29 Apr 2015 16:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753844AbbD2QhN (ORCPT ); Wed, 29 Apr 2015 12:37:13 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:36585 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753777AbbD2QhM (ORCPT ); Wed, 29 Apr 2015 12:37:12 -0400 Received: by lagv1 with SMTP id v1so24438331lag.3 for ; Wed, 29 Apr 2015 09:37:11 -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; bh=Jyk9QJ6ZgYZdxrQSK1CDlDEjhn3QdbeJZ9eBbzzJPg0=; b=Xpjaaf9rU/0BEq/aAXeTgnAlNJCqANHPnjVzTRLgm8dk9ymiAJnnuur0t7qHFCWIqy zIF1CuGbuEiXCBhJH6doxqQSXGf9P6C315Xvn1htLMstc1K0QuuafbCTHR7Mbl8g2W6g W+f0jIvTfFaAQ27a3PvYAMusUW/k82sM7u+LRIR0Lt4TgR7IIDb7DcJN4ZfQcyB7uRbY pEAuv9Emb1m4ogRAn2QLe1eZ1rJMjReRCH29c+xco3anhVJ3Sm3GVaBpWopQzNzSJM/7 iHo85HhQHL+1QpLPEf3d/Uc1vgi5owizUDG1Ohp5s/0cq6Eo0YWgtoVKDhBKi7TWj+td b3BA== X-Gm-Message-State: ALoCoQn4ExERCu3xgHSS6jOiAQ8KarsK5Xs2YzWtrHrELTtkiweek6fQ/eOg1yGlVXwCERIGi680 X-Received: by 10.152.197.2 with SMTP id iq2mr19835307lac.103.1430325431207; Wed, 29 Apr 2015 09:37:11 -0700 (PDT) Received: from dl160.lan (188-67-118-178.bb.dnainternet.fi. [188.67.118.178]) by mx.google.com with ESMTPSA id s5sm6484936lbr.18.2015.04.29.09.37.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 09:37:10 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: Olli Salonen Subject: [PATCHv2 1/5] si2168: add support for gapped clock Date: Wed, 29 Apr 2015 19:36:50 +0300 Message-Id: <1430325414-9977-1-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 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=unavailable 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 */