From patchwork Thu Jun 19 04:54:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 4380621 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7FA269F26E for ; Thu, 19 Jun 2014 04:59:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AEDB72037E for ; Thu, 19 Jun 2014 04:59:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A05CC2034F for ; Thu, 19 Jun 2014 04:59:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WxUNq-0002nC-1q; Thu, 19 Jun 2014 04:55:34 +0000 Received: from mail-pd0-f202.google.com ([209.85.192.202]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WxUNj-0002hn-FH for linux-arm-kernel@lists.infradead.org; Thu, 19 Jun 2014 04:55:31 +0000 Received: by mail-pd0-f202.google.com with SMTP id r10so220686pdi.5 for ; Wed, 18 Jun 2014 21:55:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xxpS/9+5bRd86Er9oh6kzs/v5Qq3HFis6J6f6fCLGXc=; b=Dunwb1nN/p1F1TCgg1yMUeEcBd/PxYi4EczygyPzpZRFzNxORp2PEa/yU5H7dXzncO OM2al9oW3xlI4QBaGrKjnBcdZQzOvgVtHMHne4dtmHFyXRU+3qPu4OrSkoNd0zoHGeVt OT4Qx6HoX1D1ZYObEo4gWlfkGngSbz/DotP5c6OQSi/OFnZVg5UGOIYpHT1Kdwu0OLKO mqd72iC90DGVjxIPG0S/QsFQQ1zZoE6+x8BGEI5STzJxVrY44DsF377vXCM3jA1Ll5eh k5mFlm0TyICMJ2VVzyyKH0MwsYxDPBSBG5IOlFkqebyfwP6m/agEspOrZoJE9YcrgeGt 9BDg== X-Gm-Message-State: ALoCoQny1DTIaPaE8neTy7SZW+ZQ996a17L1HyMv8KbeLm+VP4JL5FHIqdEOOajpSw6I4yIwreQa X-Received: by 10.66.218.105 with SMTP id pf9mr1414653pac.36.1403153705908; Wed, 18 Jun 2014 21:55:05 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id j43si68482yhh.5.2014.06.18.21.55.05 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Jun 2014 21:55:05 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.72.141]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id CBB8831C52A; Wed, 18 Jun 2014 21:55:00 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id 64517808AF; Wed, 18 Jun 2014 21:55:00 -0700 (PDT) From: Doug Anderson To: Wolfram Sang , Kukjin Kim , Ben Dooks Subject: [PATCH] i2c: s3c2410: resume the I2C controller earlier Date: Wed, 18 Jun 2014 21:54:51 -0700 Message-Id: <1403153691-15606-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.0.0.526.g5318336 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140618_215527_530041_3A8C2F79 X-CRM114-Status: GOOD ( 13.44 ) X-Spam-Score: -0.1 (/) Cc: linux-samsung-soc@vger.kernel.org, Vincent Palatin , linux-kernel@vger.kernel.org, Doug Anderson , Tomasz Figa , linux-i2c@vger.kernel.org, javier.martinez@collabora.co.uk, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vincent Palatin When the wake-up is triggered by the PMIC RTC, the RTC driver is trying to read the PMIC interrupt status over I2C and fails because the I2C controller is not resumed yet. Let's resume the I2C controller earlier in the _noirq phase (as other hardwares are doing), so we can properly get the wake-up condition. Signed-off-by: Vincent Palatin Signed-off-by: Doug Anderson --- drivers/i2c/busses/i2c-s3c2410.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index e828a1d..b904132 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1267,7 +1267,7 @@ static int s3c24xx_i2c_suspend_noirq(struct device *dev) return 0; } -static int s3c24xx_i2c_resume(struct device *dev) +static int s3c24xx_i2c_resume_noirq(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev); @@ -1285,7 +1285,7 @@ static int s3c24xx_i2c_resume(struct device *dev) static const struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = { #ifdef CONFIG_PM_SLEEP .suspend_noirq = s3c24xx_i2c_suspend_noirq, - .resume = s3c24xx_i2c_resume, + .resume_noirq = s3c24xx_i2c_resume_noirq, #endif };