From patchwork Mon Jan 3 09:28:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefani Seibold X-Patchwork-Id: 447151 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 p039pZtD031241 for ; Mon, 3 Jan 2011 09:51:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751778Ab1ACJve (ORCPT ); Mon, 3 Jan 2011 04:51:34 -0500 Received: from www84.your-server.de ([213.133.104.84]:45515 "EHLO www84.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460Ab1ACJvd (ORCPT ); Mon, 3 Jan 2011 04:51:33 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 03 Jan 2011 09:51:35 +0000 (UTC) X-Greylist: delayed 1417 seconds by postgrey-1.27 at vger.kernel.org; Mon, 03 Jan 2011 04:51:33 EST Received: from [88.64.4.48] (helo=[192.168.0.4]) by www84.your-server.de with esmtpsa (SSLv3:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PZghn-0004K1-Lu; Mon, 03 Jan 2011 10:27:55 +0100 Subject: [PATCH] fix i810 i2c bug From: Stefani Seibold To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-fbdev@vger.kernel.org, adaplas@gmail.com Date: Mon, 03 Jan 2011 10:28:59 +0100 Message-ID: <1294046939.20021.12.camel@wall-e> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 X-Authenticated-Sender: stefani@seibold.net X-Virus-Scanned: Clear (ClamAV 0.96.5/12471/Mon Jan 3 07:54:50 2011) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org diff -u -N -r -p linux-2.6.35.orig/drivers/video/i810/i810-i2c.c linux-2.6.35/drivers/video/i810/i810-i2c.c --- linux-2.6.35.orig/drivers/video/i810/i810-i2c.c 2010-08-02 00:11:14.000000000 +0200 +++ linux-2.6.35/drivers/video/i810/i810-i2c.c 2010-10-04 12:24:29.000000000 +0200 @@ -45,8 +45,10 @@ static void i810i2c_setscl(void *data, i struct i810fb_par *par = chan->par; u8 __iomem *mmio = par->mmio_start_virtual; - i810_writel(mmio, chan->ddc_base, (state ? SCL_VAL_OUT : 0) | SCL_DIR | - SCL_DIR_MASK | SCL_VAL_MASK); + if (state) + i810_writel(mmio, chan->ddc_base, SCL_DIR_MASK | SCL_VAL_MASK); + else + i810_writel(mmio, chan->ddc_base, SCL_DIR | SCL_DIR_MASK | SCL_VAL_MASK); i810_readl(mmio, chan->ddc_base); /* flush posted write */ } @@ -56,8 +58,10 @@ static void i810i2c_setsda(void *data, i struct i810fb_par *par = chan->par; u8 __iomem *mmio = par->mmio_start_virtual; - i810_writel(mmio, chan->ddc_base, (state ? SDA_VAL_OUT : 0) | SDA_DIR | - SDA_DIR_MASK | SDA_VAL_MASK); + if (state) + i810_writel(mmio, chan->ddc_base, SDA_DIR_MASK | SDA_VAL_MASK); + else + i810_writel(mmio, chan->ddc_base, SDA_DIR | SDA_DIR_MASK | SDA_VAL_MASK); i810_readl(mmio, chan->ddc_base); /* flush posted write */ }