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: 4380601 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 609D8BEEAA for ; Thu, 19 Jun 2014 04:55:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 81DD22037E for ; Thu, 19 Jun 2014 04:55:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7CB420340 for ; Thu, 19 Jun 2014 04:55:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757301AbaFSEzH (ORCPT ); Thu, 19 Jun 2014 00:55:07 -0400 Received: from mail-pd0-f202.google.com ([209.85.192.202]:53396 "EHLO mail-pd0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757298AbaFSEzG (ORCPT ); Thu, 19 Jun 2014 00:55:06 -0400 Received: by mail-pd0-f202.google.com with SMTP id r10so219816pdi.1 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=ED8k+MRzjxqgMDElKCW7geQ102ZWd0EsNnvK4fPZmNpnn03LjebX0NUctBmnD6OdS+ ZKZgPKHxbk1KO9KaGgix/86xQUB3OyEQ7QMcK7bpFsy8BVCwixp2pOBDuG6a4SZq8D11 Cx6r6l6lgUqZe+4Z1KJH8XH800IhsJnoIx/l9PCSGVEj78rPp4buuEmTIloFAD8yJdYy LwENtNOjosDdR9IvG4LWekM+80X5qbWtWDhqAeXd2JGlbsYB0qG7cDN6iN/ziCpploNk yoae0hIAg3+HxxCENEfLnK/gGXvm6aS2gsR8RUm6+bt6nBeygz2pLFIGHBP3jQ/Q5bmz HIcA== X-Gm-Message-State: ALoCoQnl4UaYgrK5Ydk0KwDbrpiB9ElZoEJFzkRZD9INoXPumcFCGSEiSaISrZ4PRlfk1DnFUWGD 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 Cc: Tomasz Figa , javier.martinez@collabora.co.uk, Vincent Palatin , Doug Anderson , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org 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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 };