From patchwork Thu May 19 18:16:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoel Pinheiro X-Patchwork-Id: 798782 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4JIHo52015034 for ; Thu, 19 May 2011 18:17:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934052Ab1ESSRM (ORCPT ); Thu, 19 May 2011 14:17:12 -0400 Received: from blu0-omc2-s25.blu0.hotmail.com ([65.55.111.100]:17537 "EHLO blu0-omc2-s25.blu0.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933907Ab1ESSRJ (ORCPT ); Thu, 19 May 2011 14:17:09 -0400 Received: from BLU0-SMTP25 ([65.55.111.71]) by blu0-omc2-s25.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 19 May 2011 11:17:08 -0700 X-Originating-IP: [189.78.51.20] X-Originating-Email: [pinusdtv@hotmail.com] Message-ID: Received: from atl2700.localnet ([189.78.51.20]) by BLU0-SMTP25.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 19 May 2011 11:17:07 -0700 From: Manoel PN To: linux-media@vger.kernel.org, lgspn@hotmail.com Subject: [PATCH] saa7134-dvb.c kworld_sbtvd Date: Thu, 19 May 2011 15:16:57 -0300 User-Agent: KMail/1.13.5 (Linux/2.6.39-rc7+; KDE/4.4.5; x86_64; ; ) MIME-Version: 1.0 X-OriginalArrivalTime: 19 May 2011 18:17:07.0868 (UTC) FILETIME=[F6ADC5C0:01CC1650] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 19 May 2011 18:17:50 +0000 (UTC) The correct place to put i2c_gate_ctrl is before calling tda18271_attach, because the driver tda18271 will use it to enable or disable the i2c-bus from the demodulator to the tuner. And thus eliminate the error message: "Unknown device (255) detected @ 1-00c0, device not supported" in the driver tda18271. In the device kworld_sbtvd (hybrid analog and digital TV) the control of the i2c-bus to tuner is done in the analog demodulator and not in the digital demodulator. Signed-off-by: Manoel Pinheiro --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index f65cad2..c1a18d1 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c @@ -1666,10 +1666,10 @@ static int dvb_init(struct saa7134_dev *dev) dvb_attach(tda829x_attach, fe0->dvb.frontend, &dev->i2c_adap, 0x4b, &tda829x_no_probe); + fe0->dvb.frontend->ops.i2c_gate_ctrl = kworld_sbtvd_gate_ctrl; dvb_attach(tda18271_attach, fe0->dvb.frontend, 0x60, &dev->i2c_adap, &kworld_tda18271_config); - fe0->dvb.frontend->ops.i2c_gate_ctrl = kworld_sbtvd_gate_ctrl; } /* mb86a20s need to use the I2C gateway */