From patchwork Fri Jul 29 13:41:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 1020662 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6TDfGFI028282 for ; Fri, 29 Jul 2011 13:41:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754540Ab1G2Nln (ORCPT ); Fri, 29 Jul 2011 09:41:43 -0400 Received: from na3sys009aog124.obsmtp.com ([74.125.149.151]:51271 "EHLO na3sys009aog124.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753436Ab1G2Nln (ORCPT ); Fri, 29 Jul 2011 09:41:43 -0400 Received: from mail-vw0-f49.google.com ([209.85.212.49]) (using TLSv1) by na3sys009aob124.postini.com ([74.125.148.12]) with SMTP ID DSNKTjK4lgJXbT0y9QeuFxpvkeL6yPlDTvbL@postini.com; Fri, 29 Jul 2011 06:41:43 PDT Received: by mail-vw0-f49.google.com with SMTP id 8so3456178vws.8 for ; Fri, 29 Jul 2011 06:41:42 -0700 (PDT) Received: by 10.52.70.171 with SMTP id n11mr1252931vdu.356.1311946901802; Fri, 29 Jul 2011 06:41:41 -0700 (PDT) Received: from [172.24.190.250] (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id ed4sm964785vdb.45.2011.07.29.06.41.37 (version=SSLv3 cipher=OTHER); Fri, 29 Jul 2011 06:41:40 -0700 (PDT) Message-ID: <4E32B88E.6030508@ti.com> Date: Fri, 29 Jul 2011 19:11:34 +0530 From: Shubhrajyoti User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: balbi@ti.com CC: =?UTF-8?B?IkFuZHkgR3JlZW4gKOael+WuieW7uCki?= , linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, santosh.shilimkar@ti.com Subject: Re: [PATCH] OMAP4: I2C: Enable the wakeup in I2C_WE References: <1311940122-10681-1-git-send-email-shubhrajyoti@ti.com> <20110729120711.GL31013@legolas.emea.dhcp.ti.com> <4E32A75C.5060400@warmcat.com> <20110729123716.GN31013@legolas.emea.dhcp.ti.com> In-Reply-To: <20110729123716.GN31013@legolas.emea.dhcp.ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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]); Fri, 29 Jul 2011 13:41:44 +0000 (UTC) On Friday 29 July 2011 06:07 PM, Felipe Balbi wrote: > Hi, > > On Fri, Jul 29, 2011 at 01:28:12PM +0100, "Andy Green (???)" wrote: >> On 07/29/2011 01:07 PM, Somebody in the thread at some point said: >> >> Hi - >> >>> - omap_i2c_write_reg(dev, OMAP_I2C_WE_REG, dev->westate); >>> + if (dev->rev< OMAP_I2C_REV_ON_3530_4430) >>> + omap_i2c_write_reg(dev, OMAP_I2C_WE_REG, >>> + dev->westate); >>> Andy, can you clarify why you added the revision check which didn't >>> exist before ? >>> >>> [1] http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=commitdiff;h=a3a7acbcc3df4e9ecc12aa1fc435534d74ebbdf4 >>> >> At the time I wrote the patches back in March, the code there was >> different: there was a pre-extant test avoiding that line on 4430, >> and the patch is simply converting it to the new scheme. You can see >> it here: >> >> http://permalink.gmane.org/gmane.linux.ports.arm.omap/54940 >> >> @@ -379,7 +379,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev) >> * REVISIT: Some wkup sources might not be needed. >> */ >> dev->westate = OMAP_I2C_WE_ALL; >> - if (dev->rev< OMAP_I2C_REV_ON_4430) >> + if (dev->rev< OMAP_I2C_REV_ON_3530_4430) >> omap_i2c_write_reg(dev, OMAP_I2C_WE_REG, >> dev->westate); >> } >> >> I guess since March and before this got committed for 3.1, someone >> got a patch in first removing the test, so when my patchset was >> uplevelled for commit against 3.1-rc this conflict was dealt with by >> re-introducing the test. >> >> Long story short, it's there from me as a mechanical 1:1 renaming >> action as part of the fix that 3530 and 4430 (different) IPs return >> the same rev number. Despite how it now looks I didn't add it, so if >> Shubhrajyoti has reasons to think it should be gone again I have >> nothing against that at all. > yeah, looks like a bad conflict resolution. Shubhrajyoti, care to respin > the patch and update commit log stating that it is fixing a bad conflict > resolution or something ? I wasn't aware of the conflict resolution part. Actually came across this piece of code as per the discussion on the reset implementation patch will update the changelogs. How about, From: Shubhrajyoti D Currently for OMAP4 the I2C_WE is not programmed. This patch enables the programming for OMAP4. Fixes a conflict resolution of Andy's patches. Reported-by: Santosh Shilimkar Signed-off-by: Shubhrajyoti D --- TODO: Currently all the wakeup sources are enabled. There is scope of optimising the same. Will revisit it. Rebased on Kevin's wip/i2c branch Tested on OMAP4430. drivers/i2c/busses/i2c-omap.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" 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/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index d05efe7..18cc0af 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -313,9 +313,8 @@ static int omap_i2c_init(struct omap_i2c_dev *dev) * REVISIT: Some wakeup sources might not be needed. */ dev->westate = OMAP_I2C_WE_ALL; - if (dev->rev< OMAP_I2C_REV_ON_3530_4430) - omap_i2c_write_reg(dev, OMAP_I2C_WE_REG, - dev->westate); + omap_i2c_write_reg(dev, OMAP_I2C_WE_REG, + dev->westate); } omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);