From patchwork Thu Nov 27 19:42:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 5399011 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E9C619F443 for ; Thu, 27 Nov 2014 19:42:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13F78201C8 for ; Thu, 27 Nov 2014 19:42:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 18647201C7 for ; Thu, 27 Nov 2014 19:42:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750879AbaK0Tmg (ORCPT ); Thu, 27 Nov 2014 14:42:36 -0500 Received: from mail-lb0-f180.google.com ([209.85.217.180]:47283 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792AbaK0Tmd (ORCPT ); Thu, 27 Nov 2014 14:42:33 -0500 Received: by mail-lb0-f180.google.com with SMTP id l4so4491676lbv.25 for ; Thu, 27 Nov 2014 11:42:32 -0800 (PST) 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=qJ7HXhJeizPF4HYizmJgF9nMfUnOIVvCzrjw80QAuIg=; b=S6n9Asni679Ox46Fnsk50AluMKv24IAm8UmQY1fISgOKCqylUAnMmUUnFP2Sw4RIP2 RKEppPkIqC2pCZ1IxQeGeF2RRoeZZzZcL9bM65G4NqUWETW/ruQTzLa0Ksgu7FIlPICR /bXPKTf+TYBnctLFJj95XfUpfMxdQz9MBBJ7dRHUH5MU47u9h+WV9dpIHDCTcLfeGKKn z/RGI0fQ0D2H40+x2q8/JzJ1v+saPbzGq9ha8h4sNiehwxae8i3iCaw4rggw2ed089Xi hR9jkkbrybdiA6hGsxAvkzpko6IIjffb1cF0iXJ/nCTdRSEkS3xvLnBTHLZfDx1th2E1 oysQ== X-Gm-Message-State: ALoCoQlRyDr4ENQYNex8jjW4Gk63aYYGH5uVKP4KTU8JT3wVJl/wHCMW0dZn3Lt2glsKfvdN0uIP X-Received: by 10.112.162.101 with SMTP id xz5mr39977059lbb.49.1417117351862; Thu, 27 Nov 2014 11:42:31 -0800 (PST) Received: from dl160.lan (188-67-15-102.bb.dnainternet.fi. [188.67.15.102]) by mx.google.com with ESMTPSA id eg2sm2083915lbb.29.2014.11.27.11.42.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Nov 2014 11:42:30 -0800 (PST) From: Olli Salonen To: linux-media@vger.kernel.org Cc: Olli Salonen Subject: [PATCH 1/2] si2168: debug printout for firmware version Date: Thu, 27 Nov 2014 21:42:22 +0200 Message-Id: <1417117343-1793-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 A debug printout for firmware version. Signed-off-by: Olli Salonen Reviewed-by: Antti Palosaari --- drivers/media/dvb-frontends/si2168.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index bec3aa5..6da38e8 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -489,6 +489,17 @@ static int si2168_init(struct dvb_frontend *fe) if (ret) goto err; + /* query firmware version */ + memcpy(cmd.args, "\x11", 1); + cmd.wlen = 1; + cmd.rlen = 10; + ret = si2168_cmd_execute(s, &cmd); + if (ret) + goto err; + + dev_dbg(&s->client->dev, "firmware version: %c.%c.%d\n", + cmd.args[6], cmd.args[7], cmd.args[8]); + /* set ts mode */ memcpy(cmd.args, "\x14\x00\x01\x10\x10\x00", 6); cmd.args[4] |= s->ts_mode;