From patchwork Wed Feb 3 20:18:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 2584 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Wed, 03 Feb 2010 20:19:08 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Wed, 03 Feb 2010 18:21:49 -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 1Nclgq-0000yK-1t; Wed, 03 Feb 2010 20:19:08 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757872Ab0BCUTG (ORCPT + 1 other); Wed, 3 Feb 2010 15:19:06 -0500 Received: from mail-in-07.arcor-online.net ([151.189.21.47]:48648 "EHLO mail-in-07.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757867Ab0BCUTE (ORCPT ); Wed, 3 Feb 2010 15:19:04 -0500 Received: from mail-in-06-z2.arcor-online.net (mail-in-06-z2.arcor-online.net [151.189.8.18]) by mx.arcor.de (Postfix) with ESMTP id 784503CA328; Wed, 3 Feb 2010 21:19:02 +0100 (CET) Received: from mail-in-06.arcor-online.net (mail-in-06.arcor-online.net [151.189.21.46]) by mail-in-06-z2.arcor-online.net (Postfix) with ESMTP id 6CBCA5C147; Wed, 3 Feb 2010 21:19:02 +0100 (CET) Received: from [192.168.2.102] (dslb-188-103-200-201.pools.arcor-ip.net [188.103.200.201]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-06.arcor-online.net (Postfix) with ESMTPA id 20D8439A5D7; Wed, 3 Feb 2010 21:19:02 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-06.arcor-online.net 20D8439A5D7 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1265228342; bh=ASxLijaZQCWrd6+2UkMrBTOEn2TE1yHXdTAu/hyoA+Y=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=CZ2uhr1UmfH4CumhXoM1rLwg7IY9RaRx0J64igMDdnO17CggUknlVeDtzhApqlGy6 reGG3js6R2iBd9+3jxPuhAEab9O+Yk3pj2KQ8afM4GYU0Uta3PHT96V7pZZXq2d35y 0yuxQL0Ow7mUyeFMun8rzEwWCSBlY+W6vW/uPnLo= Message-ID: <4B69DA18.8040201@arcor.de> Date: Wed, 03 Feb 2010 21:18:32 +0100 From: Stefan Ringel User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0 MIME-Version: 1.0 To: Mauro Carvalho Chehab CC: linux-media@vger.kernel.org, Devin Heitmueller Subject: [PATCH 5/15] - tm6000 bugfix i2c transfer References: <4B673790.3030706@arcor.de> <4B673B2D.6040507@arcor.de> <4B675B19.3080705@redhat.com> <4B685FB9.1010805@arcor.de> <4B688507.606@redhat.com> <4B688E41.2050806@arcor.de> <4B689094.2070204@redhat.com> <4B6894FE.6010202@arcor.de> <4B69D83D.5050809@arcor.de> <4B69D8CC.2030008@arcor.de> In-Reply-To: <4B69D8CC.2030008@arcor.de> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org signed-off-by: Stefan Ringel --- 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