From patchwork Fri Sep 18 08:24:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 7213841 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A265FBEEC1 for ; Fri, 18 Sep 2015 08:48:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A852208E6 for ; Fri, 18 Sep 2015 08:48:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4B1E320515 for ; Fri, 18 Sep 2015 08:48:47 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A2E81265AEA; Fri, 18 Sep 2015 10:48:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 1BE832650FE; Fri, 18 Sep 2015 10:48:38 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id AB6412659B0; Fri, 18 Sep 2015 10:48:36 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by alsa0.perex.cz (Postfix) with ESMTP id 583F02604D3 for ; Fri, 18 Sep 2015 10:48:29 +0200 (CEST) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.15.0.59/8.15.0.59) with SMTP id t8I8mSC4015475; Fri, 18 Sep 2015 03:48:28 -0500 Received: from mail1.cirrus.com (mail1.cirrus.com [141.131.3.20]) by mx0b-001ae601.pphosted.com with ESMTP id 1x0a2g0dcp-1; Fri, 18 Sep 2015 03:48:27 -0500 Received: from EX12.ad.cirrus.com (unknown [172.19.9.182]) by mail1.cirrus.com (Postfix) with ESMTP id 57F1B34049; Fri, 18 Sep 2015 03:48:45 -0500 (CDT) Received: from imbe.wolfsonmicro.main (172.20.9.178) by EX12.ad.cirrus.com (172.19.9.182) with Microsoft SMTP Server id 14.3.174.1; Fri, 18 Sep 2015 09:48:26 +0100 Received: from ck-lbox ([172.22.20.70]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id t8I8mOAO032491; Fri, 18 Sep 2015 09:48:25 +0100 Date: Fri, 18 Sep 2015 09:24:46 +0100 From: Charles Keepax To: Inha Song Message-ID: <20150918082446.GD7694@ck-lbox> References: <1442478527-29304-1-git-send-email-ideal.song@samsung.com> <20150917082542.GB7694@ck-lbox> <20150917180530.346232ce@songinha-Samsung-DeskTop-System> <20150917091632.GC7694@ck-lbox> <20150918154903.549cf6d0@songinha-Samsung-DeskTop-System> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150918154903.549cf6d0@songinha-Samsung-DeskTop-System> User-Agent: Mutt/1.5.20 (2009-06-14) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151, 1.0.33, 0.0.0000 definitions=2015-09-18_03:2015-09-17, 2015-09-18, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1508030000 definitions=main-1509180134 Cc: alsa-devel@alsa-project.org, sameo@linux.intel.com, patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, broonie@kernel.org, lee.jones@linaro.org Subject: Re: [alsa-devel] [PATCH] mfd: arizona: Call the runtime PM function if the state is runtime resumed X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Sep 18, 2015 at 03:49:03PM +0900, Inha Song wrote: > Hi, > > I just change dev_err() to dev_info() in arizona-core. > > > root@localhost:~# aplay test.wav > [ 42.731358] arizona spi1.0: Leaving AoD mode > .... > [ 42.823514] s3c64xx_spi_runtime_resume > [ 42.828270] arizona spi1.0: ASRC underclocked > [ 42.828281] s3c64xx_spi_runtime_suspend > .... > -> suspend () > [ 72.398152] arizona spi1.0: Suspend, disabling IRQ > [ 72.410471] s3c64xx_spi_runtime_resume > [ 72.429045] s3c64xx_spi_suspend > -> spi suspended > [ 72.429905] PM: suspend of devices complete after 67.309 msecs > [ 72.440084] arizona spi1.0: Late suspend, reenabling IRQ > -> try to access spi irq after spi suspend() > [ 72.440165] arizona spi1.0: Failed to read IRQ status: -108 > [ 72.440174] arizona spi1.0: Failed to read main IRQ status: -108 > [ 72.440242] arizona spi1.0: Failed to read IRQ status: -108 > [ 72.440249] arizona spi1.0: Failed to read main IRQ status: -108 > [ 72.440275] arizona spi1.0: Failed to read IRQ status: -108 > [ 72.440282] arizona spi1.0: Failed to read main IRQ status: -108 > [ 72.440304] arizona spi1.0: Failed to read IRQ status: -108 Ok so looking at the system PM code I think the problem here is there is currently a small window between when we enable this IRQ and when the suspend proceedure disables IRQs and this IRQ is sneaking in at that point. Can you try the following diff and let me know what happens: Thanks, Charles --- a/drivers/mfd/arizona-core.c +++ b/drivers/mfd/arizona-core.c @@ -727,7 +727,7 @@ const struct dev_pm_ops arizona_pm_ops = { NULL) SET_SYSTEM_SLEEP_PM_OPS(arizona_suspend, arizona_resume) #ifdef CONFIG_PM_SLEEP - .suspend_late = arizona_suspend_late, + .suspend_noirq = arizona_suspend_late, .resume_noirq = arizona_resume_noirq, #endif