From patchwork Fri Feb 5 22:48:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 77433 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o15Mn6dT013917 for ; Fri, 5 Feb 2010 22:49:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934004Ab0BEWtB (ORCPT ); Fri, 5 Feb 2010 17:49:01 -0500 Received: from mail-in-07.arcor-online.net ([151.189.21.47]:37882 "EHLO mail-in-07.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933982Ab0BEWs5 (ORCPT ); Fri, 5 Feb 2010 17:48:57 -0500 Received: from mail-in-15-z2.arcor-online.net (mail-in-15-z2.arcor-online.net [151.189.8.32]) by mx.arcor.de (Postfix) with ESMTP id 56E5C3CA2C6; Fri, 5 Feb 2010 23:48:54 +0100 (CET) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mail-in-15-z2.arcor-online.net (Postfix) with ESMTP id 492977245B6; Fri, 5 Feb 2010 23:48:54 +0100 (CET) Received: from localhost.localdomain (dslb-188-103-200-186.pools.arcor-ip.net [188.103.200.186]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-05.arcor-online.net (Postfix) with ESMTPA id 6732C3328C3; Fri, 5 Feb 2010 23:48:53 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-05.arcor-online.net 6732C3328C3 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1265410133; bh=3jkqOsSqpcRHr7Pzaie2EuOHF+X/MWmIV7bx+AHm+CQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=YKPuLPMAvJIOYtzwxKaQ318e+i5dCg1DRN0rw903iYimvDcLh6PADWOABVBiFYEYa KKvAMPJFQN8DeHkh1NIW3eUU9ExNKBGWB6Yc1X3bAq/W7BUSwSFOw72J3KW30Hogq/ Y0xZT1wdLhze0v2vKGHVOd7X15A/PZ9MynUTMM1k= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, dheitmueller@kernellabs.com, Stefan Ringel Subject: [PATCH 4/12] tm6000: adding special usb request to quiting tuner transfer Date: Fri, 5 Feb 2010 23:48:09 +0100 Message-Id: <1265410096-11788-4-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1265410096-11788-3-git-send-email-stefan.ringel@arcor.de> References: <1265410096-11788-1-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-2-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-3-git-send-email-stefan.ringel@arcor.de> 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.3 (demeter.kernel.org [140.211.167.41]); Fri, 05 Feb 2010 22:49:06 +0000 (UTC) diff --git a/drivers/staging/tm6000/tm6000-i2c.c b/drivers/staging/tm6000/tm6000-i2c.c index 4da10f5..3e43ad7 100644 --- a/drivers/staging/tm6000/tm6000-i2c.c +++ b/drivers/staging/tm6000/tm6000-i2c.c @@ -86,6 +86,11 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, msgs[i].len == 1 ? 0 : msgs[i].buf[1], msgs[i + 1].buf, msgs[i + 1].len); i++; + + if ((dev->dev_type == TM6010) && (addr == 0xc2)) { + tm6000_set_reg(dev, 0x32, 0,0); + tm6000_set_reg(dev, 0x33, 0,0); + } if (i2c_debug >= 2) for (byte = 0; byte < msgs[i].len; byte++) printk(" %02x", msgs[i].buf[byte]); @@ -99,6 +104,12 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, REQ_16_SET_GET_I2C_WR1_RDN, addr | msgs[i].buf[0] << 8, 0, msgs[i].buf + 1, msgs[i].len - 1); + + + if ((dev->dev_type == TM6010) && (addr == 0xc2)) { + tm6000_set_reg(dev, 0x32, 0,0); + tm6000_set_reg(dev, 0x33, 0,0); + } } if (i2c_debug >= 2) printk("\n"); @@ -198,7 +209,7 @@ static struct i2c_algorithm tm6000_algo = { static struct i2c_adapter tm6000_adap_template = { .owner = THIS_MODULE, - .class = I2C_CLASS_TV_ANALOG, + .class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, .name = "tm6000", .id = I2C_HW_B_TM6000, .algo = &tm6000_algo,