From patchwork Fri Feb 5 22:57:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 2623 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Fri, 05 Feb 2010 22:58:01 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Sat, 06 Feb 2010 23:31:14 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NdX7h-0000XK-FX; Fri, 05 Feb 2010 22:58:01 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933988Ab0BEW57 (ORCPT + 1 other); Fri, 5 Feb 2010 17:57:59 -0500 Received: from mail-in-04.arcor-online.net ([151.189.21.44]:44577 "EHLO mail-in-04.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933950Ab0BEW5t (ORCPT ); Fri, 5 Feb 2010 17:57:49 -0500 Received: from mail-in-16-z2.arcor-online.net (mail-in-16-z2.arcor-online.net [151.189.8.33]) by mx.arcor.de (Postfix) with ESMTP id 1954933A7A4; Fri, 5 Feb 2010 23:57:47 +0100 (CET) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mail-in-16-z2.arcor-online.net (Postfix) with ESMTP id 0B21825471F; Fri, 5 Feb 2010 23:57:47 +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 A3B4D33279F; Fri, 5 Feb 2010 23:57:46 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-05.arcor-online.net A3B4D33279F DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1265410666; bh=L0lEfU6TnuuI1V1VTMYIQpk5ND7OOwyN8mu3VIXVt9I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=aOT8XdDIErMHq8+c1WpnnMU4IlccRxD8MsSvK/X+feWqFu3gkGXpwRlALAc0NkUZl EoFvRu0KRXElG53cVvUGj+9IOciucxRLz4U2vE6WRL8Rhq0wyBUcZDvQxRwjv8JXCa Abvj6/hEU0rlcEjwGEzGAwdUnVehTGGMB5l9fq1c= 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:57:04 +0100 Message-Id: <1265410631-11955-4-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1265410631-11955-3-git-send-email-stefan.ringel@arcor.de> References: <1265410631-11955-1-git-send-email-stefan.ringel@arcor.de> <1265410631-11955-2-git-send-email-stefan.ringel@arcor.de> <1265410631-11955-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 From: Stefan Ringel Signed-off-by: Stefan Ringel --- drivers/staging/tm6000/tm6000-i2c.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) 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,