From patchwork Fri Mar 27 11:57:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 6106341 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 28009BF90F for ; Fri, 27 Mar 2015 11:58:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C70A02042B for ; Fri, 27 Mar 2015 11:57:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC30020435 for ; Fri, 27 Mar 2015 11:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752535AbbC0L5g (ORCPT ); Fri, 27 Mar 2015 07:57:36 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:34230 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbbC0L5f (ORCPT ); Fri, 27 Mar 2015 07:57:35 -0400 Received: by lagg8 with SMTP id g8so68397590lag.1 for ; Fri, 27 Mar 2015 04:57: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=6rTQh1CnIjNHNHOASzN1PnsIvN/xU+vapuZiMSO7fVg=; b=WW1e8T7shzJhCF/X/B7FB7782uQgJlfdziwOCHs8XjFI5EO1MIcAZIV/PD5kAyqBZx xAvYj0VuUjzrt+AOM30yfDsUnNIbpHhvADgNjzH+B9wU/z5W9MQIK6dyk8wX22/6gCrB QCMAM6FfYgyvSdoamQ7p0Q9FwqgV3feTVv5CegW1N1T5mS2SdkpDnYx519YiDP89ybfk 5uJeu9V+whF0o/YBYl/LgW9j5hYXH0dMf1mkYIx6/hnrlrzpxUpHjrSQqr+uzR6RYUqx Vi+Ti5vTlSN1h0jL7BHeq1RuS/8POSmpeYvZcOA8b+DQd2XrAPiKcmz72icMucPaj6CN HP7Q== X-Gm-Message-State: ALoCoQnPdOn1Ep8QzsOCwQkAzdnTpec2+VFL4ch0zturEVa7oyxg+xV4L2588x/NAlU3nvi+RgA5 X-Received: by 10.112.141.106 with SMTP id rn10mr17735014lbb.100.1427457454134; Fri, 27 Mar 2015 04:57:34 -0700 (PDT) Received: from dl160.lan (37-33-50-203.bb.dnainternet.fi. [37.33.50.203]) by mx.google.com with ESMTPSA id y8sm300615lad.46.2015.03.27.04.57.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Mar 2015 04:57:33 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: Olli Salonen Subject: [PATCH 2/5] si2168: add support for gapped clock Date: Fri, 27 Mar 2015 13:57:16 +0200 Message-Id: <1427457439-1493-2-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427457439-1493-1-git-send-email-olli.salonen@iki.fi> References: <1427457439-1493-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=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 aadd136..953af7b 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; }; /* firmare command struct */