From patchwork Thu Apr 23 21:11:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 6265361 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 5B736BF4A6 for ; Thu, 23 Apr 2015 21:12:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A0DE2037C for ; Thu, 23 Apr 2015 21:12:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE8C5201F2 for ; Thu, 23 Apr 2015 21:12:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031079AbbDWVMI (ORCPT ); Thu, 23 Apr 2015 17:12:08 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:35311 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031026AbbDWVLa (ORCPT ); Thu, 23 Apr 2015 17:11:30 -0400 Received: by labbd9 with SMTP id bd9so21975639lab.2 for ; Thu, 23 Apr 2015 14:11:28 -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=kK5/NYhqSoi/eZTJK6/8QyHFaBNW20K5+NU8WJrGUxM=; b=EJIlx4UEtjk3YF5v3gP7FRj+EyUwM6fSvPrdtlv0kbVZdKHyKXKAYdfl+0RMyp53dI GbVG3Gfj+a9lnbcw8RWV/mZq+Ag2ZIBmwsXzqoELNlNLdjP7G4205woekrTTwxzN2+JX Ff8N4JMygPL3xoeKIDft3qg32GvlIkCI8E7DuE0YwhT1zyGBaRzVJQYCOuzvnTmXSZTZ eDI4iZTYT7NRmpBt8Vove4EoT0Zq6RTKtLIFzYH5OsnrV2MQNnojMwAz5gkZ9fyvxwqV flM4VowyzFTdRUIq/i77Z1Dmg3t/rZA/sN4oZsPNZE73TJ9kB/mbV0WWwC8jXEtwk8VY Xuvg== X-Gm-Message-State: ALoCoQlOvBNNaOCfCvqLJrmwftC5MbL9lA3KtNvk7JzdFL80yHVcHl8ZVvEid1jDkkIX8+OrWoCd X-Received: by 10.112.148.101 with SMTP id tr5mr2237922lbb.0.1429823488725; Thu, 23 Apr 2015 14:11:28 -0700 (PDT) Received: from dl160.lan (188-67-88-189.bb.dnainternet.fi. [188.67.88.189]) by mx.google.com with ESMTPSA id i3sm2121712lbs.21.2015.04.23.14.11.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Apr 2015 14:11:27 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: Olli Salonen Subject: [PATCH 01/12] si2168: add support for gapped clock Date: Fri, 24 Apr 2015 00:11:00 +0300 Message-Id: <1429823471-21835-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. 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 */