From patchwork Fri Dec 14 17:28:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice Chotard X-Patchwork-Id: 1879941 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BCD9EDF230 for ; Fri, 14 Dec 2012 17:28:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756789Ab2LNR2R (ORCPT ); Fri, 14 Dec 2012 12:28:17 -0500 Received: from smtp23.services.sfr.fr ([93.17.128.22]:48437 "EHLO smtp23.services.sfr.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756604Ab2LNR2P (ORCPT ); Fri, 14 Dec 2012 12:28:15 -0500 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2314.sfr.fr (SMTP Server) with ESMTP id C61C07000050; Fri, 14 Dec 2012 18:28:13 +0100 (CET) Received: from [192.168.1.83] (unknown [84.7.13.97]) by msfrf2314.sfr.fr (SMTP Server) with ESMTP id 5A35D70000B1; Fri, 14 Dec 2012 18:28:13 +0100 (CET) X-SFR-UUID: 20121214172813370.5A35D70000B1@msfrf2314.sfr.fr Message-ID: <50CB61A6.7060308@sfr.fr> Date: Fri, 14 Dec 2012 18:28:06 +0100 From: Patrice Chotard User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: linux-media@vger.kernel.org, Mauro Carvalho Chehab CC: =?iso-8859-1?b?RnLpZOlyaWM=?= , Patrice Chotard Subject: [PATCH] [media] ngene: fix dvb_pll_attach failure References: <50B51F7E.2030008@sfr.fr> In-Reply-To: <50B51F7E.2030008@sfr.fr> X-Forwarded-Message-Id: <50B51F7E.2030008@sfr.fr> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Before dvb_pll_attch call, be sure that drxd demodulator was initialized, otherwise, dvb_pll_attach() will always failed. In dvb_pll_attach(), first thing done is to enable the I2C gate control in order to probe the pll by performing a read access. As demodulator was not initialized, every i2c access failed. Reported-by: frederic.mantegazza@gbiloba.org Signed-off-by: Patrice Chotard --- drivers/media/pci/ngene/ngene-cards.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/pci/ngene/ngene-cards.c b/drivers/media/pci/ngene/ngene-cards.c index 96a13ed..e2192db 100644 --- a/drivers/media/pci/ngene/ngene-cards.c +++ b/drivers/media/pci/ngene/ngene-cards.c @@ -328,6 +328,8 @@ static int demod_attach_drxd(struct ngene_channel *chan) return -ENODEV; } + /* initialized the DRXD demodulator */ + chan->fe->ops.init(chan->fe); if (!dvb_attach(dvb_pll_attach, chan->fe, feconf->pll_address, &chan->i2c_adapter, feconf->pll_type)) {