From patchwork Sun May 3 12:53:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 6320851 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 1B98DBEEE1 for ; Sun, 3 May 2015 12:54:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 276E7203AC for ; Sun, 3 May 2015 12:54:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 473FB203A1 for ; Sun, 3 May 2015 12:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751162AbbECMy2 (ORCPT ); Sun, 3 May 2015 08:54:28 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:33932 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbbECMy1 (ORCPT ); Sun, 3 May 2015 08:54:27 -0400 Received: by lbcga7 with SMTP id ga7so89569104lbc.1 for ; Sun, 03 May 2015 05:54:25 -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=bZZ2+Nfnz/PEzF28gUqqYiBOS/D+4J5d0EmJG9K+iC5W57Q8UfexOk1mmoTlg69xOV 3vmIZvexWR8ULTf6UHHRSXvwsPQmxbt1C56C8C9L6lsfOxSGd1b5YwS3k9OP6csbjw3r lxWyWJCvKxSsIIufdK43q1mLcovC4XJiaMdrhp8pc7LccFjDV0FdDIGnQiVDVBR05x7H A5UsfhHhCTuSkYbBN/s4KpI6rSduTJpPXgY7vghmKKXlRcBT9Q2rHJ8K0Cmp8IKTAyOw WwRegaFdGj138PazJubxkxANP6y4sAgjs/Q+M1eBQHJXQfpkFewi2AGzhRGvkrk0pKuG X2WQ== X-Gm-Message-State: ALoCoQkRe0mlDDXMkjjUHcgB9sxAVY8Wcg6p5UwM//ZikFJWI4VWG24Tvk/Q8qvyr0v4bY3noqM7 X-Received: by 10.152.5.194 with SMTP id u2mr9096469lau.3.1430657665587; Sun, 03 May 2015 05:54:25 -0700 (PDT) Received: from dl160.lan (188-67-118-178.bb.dnainternet.fi. [188.67.118.178]) by mx.google.com with ESMTPSA id s1sm2665369lae.46.2015.05.03.05.54.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 May 2015 05:54:24 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: Olli Salonen Subject: [PATCH v3 1/6] si2168: add support for gapped clock Date: Sun, 3 May 2015 15:53:58 +0300 Message-Id: <1430657643-17454-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 */