From patchwork Sun Jul 23 10:13:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9858309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 688D260393 for ; Sun, 23 Jul 2017 10:13:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59EE12842A for ; Sun, 23 Jul 2017 10:13:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EE5F28502; Sun, 23 Jul 2017 10:13:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9D502842A for ; Sun, 23 Jul 2017 10:13:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751779AbdGWKNX (ORCPT ); Sun, 23 Jul 2017 06:13:23 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33868 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbdGWKNV (ORCPT ); Sun, 23 Jul 2017 06:13:21 -0400 Received: by mail-wm0-f66.google.com with SMTP id 79so1683952wmg.1 for ; Sun, 23 Jul 2017 03:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YDS5r9mjV7XaPa1tkAZCklKz1MUgsT3Z0Sb2BHNlbe0=; b=uKTwtdk+6yomNzrLTpfI1uND5I5rm1zYV9h6O4zEjhm2PYIXw0rRjRHADbNimEGei3 gcTxeHSx1FptQodwrwP5qYc5uWctEPJxH04ZA5BAB9ioz8sdDrZdDK47ISS4P3Z1iE9U VwRe+Jgyr207MXvuevHd9Y8gvWcWvcQlWfgOBLvM6huTl9u4EJ2muR51zXGXM8FK3Puc L0sqjAYGgiAicuR8Hz5LAJygCzxQxOpYjdP662R+24Mu19RhnPy9/hnz09TxHC7pe3Nb z35oOizpTHY2Vl4Yic4I/TEqSyBig+84GGgQAG7DJ7SPi6OonEzvCOw6F1JLkSmV8XUq CEPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YDS5r9mjV7XaPa1tkAZCklKz1MUgsT3Z0Sb2BHNlbe0=; b=fvwE58nBZZG4Go3XBoxmM1TuySQOSifBF+EPn+LMfskN4aRZZnjZDnGnFB04F+PkyH tYacpBCREti6TqYW/yIzpqJB91cutB5cJSj8tWZsqlafKlmYeA1tjFHlIcRdmFU/pShU xbyNyallSO0Q9q3ZgSZiXse6KplEWwEAPrR5C4vmvh7VmL4cRvj/X/UI2ey7Jak+NyZd CIXH9UL2dAARASB3yinfPllaLYr9t9817lhO2CNd/l0INiajGuqkzpMP31u048sjpc5U 20rQxeRNtT+rTRNtvQrh4UFeq0OeD+FPVS8PeSMsHAF550v/sncExc2YftzKlfr1Uvj+ iIUA== X-Gm-Message-State: AIVw110QkHLOpb/YoTfUZUBgG0jRwaqC+iWXaer5oilxNMFH7onRdj+7 POP+OgcF59bcqvu8 X-Received: by 10.28.203.78 with SMTP id b75mr2612308wmg.50.1500804799961; Sun, 23 Jul 2017 03:13:19 -0700 (PDT) Received: from dvbdev.wuest.de (ip-84-118-193-88.unity-media.net. [84.118.193.88]) by smtp.gmail.com with ESMTPSA id i67sm10905796wri.61.2017.07.23.03.13.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Jul 2017 03:13:19 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Cc: jasmin@anw.at, r.scobie@clear.net.nz Subject: [PATCH 2/7] [media] dvb-frontends/stv0910: implement diseqc_send_burst Date: Sun, 23 Jul 2017 12:13:10 +0200 Message-Id: <20170723101315.12523-3-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170723101315.12523-1-d.scheller.oss@gmail.com> References: <20170723101315.12523-1-d.scheller.oss@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daniel Scheller This implements the diseqc_send_burst frontend op to support sending mini-DISEQC bursts. Picked up from dddvb's driver package where this specific block was disabled via #if 0/#endif, but is still working according to feedback from upstream, so add it. Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/stv0910.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index 4084c142f1e4..bbe609143497 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -1638,6 +1638,27 @@ static int send_master_cmd(struct dvb_frontend *fe, return 0; } +static int send_burst(struct dvb_frontend *fe, enum fe_sec_mini_cmd burst) +{ + struct stv *state = fe->demodulator_priv; + u16 offs = state->nr ? 0x40 : 0; + u8 value; + + if (burst == SEC_MINI_A) { + write_reg(state, RSTV0910_P1_DISTXCFG + offs, 0x3F); + value = 0x00; + } else { + write_reg(state, RSTV0910_P1_DISTXCFG + offs, 0x3E); + value = 0xFF; + } + wait_dis(state, 0x40, 0x00); + write_reg(state, RSTV0910_P1_DISTXFIFO + offs, value); + write_reg(state, RSTV0910_P1_DISTXCFG + offs, 0x3A); + wait_dis(state, 0x20, 0x20); + + return 0; +} + static int sleep(struct dvb_frontend *fe) { struct stv *state = fe->demodulator_priv; @@ -1673,6 +1694,7 @@ static struct dvb_frontend_ops stv0910_ops = { .set_tone = set_tone, .diseqc_send_master_cmd = send_master_cmd, + .diseqc_send_burst = send_burst, }; static struct stv_base *match_base(struct i2c_adapter *i2c, u8 adr)