From patchwork Wed Feb 26 10:08:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 11405821 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B54D1580 for ; Wed, 26 Feb 2020 10:09:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68E6520838 for ; Wed, 26 Feb 2020 10:09:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="NSzzVbAm"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="AM2dgbkX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68E6520838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D2500166E; Wed, 26 Feb 2020 11:08:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D2500166E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1582711747; bh=EoZNpZ30/7pm1pQdY5ugOn9swXXIqDW64kyuo+YBXwk=; h=From:To:Subject:Date:References:Cc:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=NSzzVbAm0I7xO81tY4fixBd/h1/VWzdZyRnyR3VXW7+uwjnQQAFYZ7rme/Z394Fuk 7I+PvyywdV0o7TK8Hcdp/E9eEj6GEvcbfS+ugex/JqY7KLlSD9ypIJMUwhjTdOUZZx Gxn3N80hO0r9atxctlJJ03iEwbvad2s8p5Dx/dX8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 58356F8014D; Wed, 26 Feb 2020 11:08:23 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B75B3F8016F; Wed, 26 Feb 2020 11:08:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SURBL_BLOCKED, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4327EF800AD for ; Wed, 26 Feb 2020 11:08:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4327EF800AD Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="AM2dgbkX" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200226100815euoutp02a42a11c2976bda471171fa4d40fa92fc~26_axNp-I1468514685euoutp02d for ; Wed, 26 Feb 2020 10:08:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200226100815euoutp02a42a11c2976bda471171fa4d40fa92fc~26_axNp-I1468514685euoutp02d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1582711695; bh=cmpnpBfW2ql8aa9zpAhTcZpr5gmx50tzEyXVFAw4y1k=; h=From:To:Cc:Subject:Date:References:From; b=AM2dgbkXNxKixVk+B6xEXAlWwyLz5SwMsOcdgP5O2YtXXNduzWZYDchjEOM/M4BiZ ManImm4p53kpvDxHLvuOkAt5TvhGUani+hpuPSOtaqpxinlDu6XqRCqBl4u83dNF+c UQfdz6WGjIo6g2dcRB4POioP/0SstTx/wXMoiXrs= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200226100814eucas1p234346167da6caec045e632ca38defc1f~26_akvobp1149011490eucas1p23; Wed, 26 Feb 2020 10:08:14 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 32.E3.60679.E83465E5; Wed, 26 Feb 2020 10:08:14 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200226100814eucas1p1ef5e4d5eb763f37bcd4eceffc798792d~26_aWLOXY0946309463eucas1p1F; Wed, 26 Feb 2020 10:08:14 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200226100814eusmtrp1cce939d30a2ec3adf4954d714b9857da~26_aVigXh1384413844eusmtrp1Y; Wed, 26 Feb 2020 10:08:14 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-88-5e56438e8f64 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 42.8B.07950.E83465E5; Wed, 26 Feb 2020 10:08:14 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200226100814eusmtip12634683c04f9765a6f4fa15635c57896~26_Z13_Qv0611906119eusmtip1E; Wed, 26 Feb 2020 10:08:14 +0000 (GMT) From: Marek Szyprowski To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] mfd: wm8994: Fix driver operation if loaded as modules Date: Wed, 26 Feb 2020 11:08:01 +0100 Message-Id: <20200226100802.16384-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAIsWRmVeSWpSXmKPExsWy7djP87p9zmFxBnd+m1pcuXiIyWLjjPWs FlMfPmGzuP/1KKPF5V1z2CzWHrnLbnH4TTurA7vHhs9NbB6bVnWyedy5tofNo2/LKkaPz5vk AlijuGxSUnMyy1KL9O0SuDK+XWlnLdjPWXH4fS97A+M0ji5GTg4JAROJnsWPWLoYuTiEBFYw SkzYOY0ZwvnCKHFr40GozGdGibN/DzDCtGxq+M0IkVjOKDHtcw8bSAKsZW2TBIjNJmAo0fW2 CywuImAr8XpHA9gkZoGbjBI77vSxgCSEBQIkni54zgRiswioSjz995gdxOYFatg/ZxkrxDZ5 idUbDoDdJCFwmU3idfsdqISLRPuKD1AnCUu8Or6FHcKWkTg9uYcFoqGZUeLhubXsEE4Po8Tl phlQHdYSd879ArqPA+gmTYn1u/Qhwo4Sp7Y9YwYJSwjwSdx4KwgSZgYyJ22bDhXmlehoE4Ko VpOYdXwd3NqDFy4xQ9geEndOLmKHBEqsxP0fB5gnMMrNQti1gJFxFaN4amlxbnpqsVFearle cWJucWleul5yfu4mRmA6OP3v+JcdjLv+JB1iFOBgVOLhfcEZGifEmlhWXJl7iFGCg1lJhHfj V6AQb0piZVVqUX58UWlOavEhRmkOFiVxXuNFL2OFBNITS1KzU1MLUotgskwcnFINjKvnRl9T 5Tc3sEn6EbQrYftWxTNRr/7W/lhyVrev+q/IxWyhWzuUpiVNETparrhps2GjgaVwVqVe5f0y 0RtuvI3LA465NvoKHH/ueH/Te26bIy9vSHM2LJ25Ubns0vXNa0Ue159ZW7wv4pPE1adeB21u XjO74ZosfmPPS8GvC5+uPCaRed1KWUmJpTgj0VCLuag4EQDJpboYAwMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKLMWRmVeSWpSXmKPExsVy+t/xu7p9zmFxBv+uKllcuXiIyWLjjPWs FlMfPmGzuP/1KKPF5V1z2CzWHrnLbnH4TTurA7vHhs9NbB6bVnWyedy5tofNo2/LKkaPz5vk Alij9GyK8ktLUhUy8otLbJWiDS2M9AwtLfSMTCz1DI3NY62MTJX07WxSUnMyy1KL9O0S9DK+ XWlnLdjPWXH4fS97A+M0ji5GTg4JAROJTQ2/GbsYuTiEBJYySvw9M5URIiEjcXJaAyuELSzx 51oXG0TRJ0aJy9+uMoEk2AQMJbregiQ4OUQE7CUe/PoHZjML3GWUuPLaD8QWFvCT2NbxGqye RUBV4um/x+wgNq+ArcT+OcugFshLrN5wgHkCI88CRoZVjCKppcW56bnFRnrFibnFpXnpesn5 uZsYgUG47djPLTsYu94FH2IU4GBU4uF9wRkaJ8SaWFZcmXuIUYKDWUmEd+NXoBBvSmJlVWpR fnxRaU5q8SFGU6DlE5mlRJPzgRGSVxJvaGpobmFpaG5sbmxmoSTO2yFwMEZIID2xJDU7NbUg tQimj4mDU6qBUWrlD5+Ar38Z+W/HaebmHY8+dZzVdarmvooDoiGLfpnn8/7tsq6Qdy3uZu1O 5XRhCRY/eH3nErPtHAv0xLL87r93Yt0R8Fbq6DqmN/tOyq27xuchfPHxw++86y1jLD/WXiu8 r7t6Ue/pI1/bdy8W3hPyYHVzQ1+zfBk/i4xZ+wrlwBky4bODlViKMxINtZiLihMBbdPq61gC AAA= X-CMS-MailID: 20200226100814eucas1p1ef5e4d5eb763f37bcd4eceffc798792d X-Msg-Generator: CA X-RootMTR: 20200226100814eucas1p1ef5e4d5eb763f37bcd4eceffc798792d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200226100814eucas1p1ef5e4d5eb763f37bcd4eceffc798792d References: Cc: Bartlomiej Zolnierkiewicz , Mark Brown , Lee Jones , Sylwester Nawrocki , Marek Szyprowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" WM8994 chip has built-in regulators, which might be used for chip operation. They are controlled by a separate wm8994-regulator driver, which should be loaded before this driver calls regulator_get(), because that driver also provides consumer-supply mapping for the them. If that driver is not yet loaded, regulator core substitute them with dummy regulator, what breaks chip operation, because the built-in regulators are never enabled. Fix this by annotating this driver with MODULE_SOFTDEP() "pre" dependency to "wm8994_regulator" module. Signed-off-by: Marek Szyprowski Acked-by: Charles Keepax --- v2: - replaced request_module() call with MODULE_SOFTDEP() annotation --- drivers/mfd/wm8994-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 1e9fe7d92597..737dede4a95c 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -690,3 +690,4 @@ module_i2c_driver(wm8994_i2c_driver); MODULE_DESCRIPTION("Core support for the WM8994 audio CODEC"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Mark Brown "); +MODULE_SOFTDEP("pre: wm8994_regulator"); From patchwork Wed Feb 26 10:08:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 11405823 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D44BD1580 for ; Wed, 26 Feb 2020 10:10:03 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6A9C520838 for ; Wed, 26 Feb 2020 10:10:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="MSZbdHky"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="izdwBI6U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A9C520838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B86D61693; Wed, 26 Feb 2020 11:09:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B86D61693 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1582711801; bh=z8ADW/XV5r2o51NRA2SPw1RzZ+AeTTl1Ko/NyywtSes=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MSZbdHky5OZhgZF5F2N8p2vbQcHU+7DU0c60k4xAjipOEy18AdvSXYO8U+VEYeggo 7gTOgsHqoWCXPjS1rdUMYPa7vCRYADOQcHIdA3RnPGOUJcV9q+8EOuy3nKggkEgOnx kaR6zLcp3yeyL9rtCN3SyYOTl4Z91cDAIE63cx4c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 70E79F801F2; Wed, 26 Feb 2020 11:08:24 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id DE786F8014E; Wed, 26 Feb 2020 11:08:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6271EF80089 for ; Wed, 26 Feb 2020 11:08:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6271EF80089 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="izdwBI6U" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200226100815euoutp01ef8efd0f677f261d2d327afe9810abbe~26_bTOL1k1266212662euoutp01h for ; Wed, 26 Feb 2020 10:08:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200226100815euoutp01ef8efd0f677f261d2d327afe9810abbe~26_bTOL1k1266212662euoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1582711695; bh=odmVlu3IWMO2MMx78wYMzn/eBqxQI465FK6+timZniI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=izdwBI6U9t7d3eoTy6CoWcpIM36WAiwjc43sL7Ls9kiwmpmY7ZPwLgqeaYOIUML8A kVTMtURN3Otwiex7OQrLdbrJcYP2avOSkd4z/zQj8K2pDIE52t7lh0KQtqM2GqtxWi DCgG/FPJP8atm9hWJ1aX/qc8PL2gmCRJ/Fzpxs1U= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200226100815eucas1p1c2dfb065e617406e9307e106d61c7a6c~26_bAMare1157311573eucas1p1s; Wed, 26 Feb 2020 10:08:15 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id F2.E3.60679.F83465E5; Wed, 26 Feb 2020 10:08:15 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200226100815eucas1p2f4448e3dea078bfc58a8acdc70340c11~26_auDTQA1144611446eucas1p27; Wed, 26 Feb 2020 10:08:15 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200226100815eusmtrp15a775f2d53936094604fe8484e42dec1~26_atbpbX1384413844eusmtrp1Z; Wed, 26 Feb 2020 10:08:15 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-8b-5e56438f08b8 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E2.8B.07950.E83465E5; Wed, 26 Feb 2020 10:08:15 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200226100814eusmtip187073e44d397c1495484d540c13c1121~26_aTCZkw0568105681eusmtip1J; Wed, 26 Feb 2020 10:08:14 +0000 (GMT) From: Marek Szyprowski To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] mfd: wm8994: Fix unbalanced calls to regulator_bulk_disable() Date: Wed, 26 Feb 2020 11:08:02 +0100 Message-Id: <20200226100802.16384-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200226100802.16384-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNIsWRmVeSWpSXmKPExsWy7djP87r9zmFxBhemClpcuXiIyWLjjPWs FlMfPmGzuP/1KKPF5V1z2CzWHrnLbnH4TTurA7vHhs9NbB6bVnWyedy5tofNo2/LKkaPz5vk AlijuGxSUnMyy1KL9O0SuDKmbLzMXvCfu2JOYy9zA+MMri5GTg4JAROJ2zPOs3UxcnEICaxg lOjae4cFwvnCKDFh1VZGCOczo8T3E+uZYFouL2mFalnOKNF0cRtCy6trJ1lAqtgEDCW63nax gdgiArYSr3c0gBUxC9xklNhxpw+sSFggXKLp0jewsSwCqhJHrp0Gs3mBGm5v7GGGWCcvsXrD ASCbg4NTwE7i6fFMiPBrNonVv5QhbBeJOW8nsULYwhKvjm9hh7BlJE5P7gHbKyHQzCjx8Nxa dginh1HictMMRogqa4k7536xgSxgFtCUWL9LHyLsKDHt/BsmkLCEAJ/EjbeCIGFmIHPStunM EGFeiY42IYhqNYlZx9fBrT144RJUiYfE4gZDSPBMZJSYd/IE2wRG+VkIuxYwMq5iFE8tLc5N Ty02ykst1ytOzC0uzUvXS87P3cQITBKn/x3/soNx15+kQ4wCHIxKPLwvOEPjhFgTy4orcw8x SnAwK4nwbvwKFOJNSaysSi3Kjy8qzUktPsQozcGiJM5rvOhlrJBAemJJanZqakFqEUyWiYNT qoGxwe+LkF+jyatzZuc5e//8dLc5I8W7d6egZgg7s1G739bJE+MzEu8duMbscy71dOOmTUkb qrIXL5r0zl+syblT5tevnssB/25HdP1a8MbO7e3/mkvZ+256BxSZyrRqpS23Y3qlfU7zdRd3 eWGpaLz7WdVgm8J3G3xcCxeJnn+uJPHi09xzfg5KLMUZiYZazEXFiQBy8kOvDgMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsVy+t/xu7r9zmFxBl+KLK5cPMRksXHGelaL qQ+fsFnc/3qU0eLyrjlsFmuP3GW3OPymndWB3WPD5yY2j02rOtk87lzbw+bRt2UVo8fnTXIB rFF6NkX5pSWpChn5xSW2StGGFkZ6hpYWekYmlnqGxuaxVkamSvp2NimpOZllqUX6dgl6GVM2 XmYv+M9dMaexl7mBcQZXFyMnh4SAicTlJa1sXYxcHEICSxklOr5tZ4NIyEicnNbACmELS/y5 1gVV9IlRYu+LHmaQBJuAoUTX2y6wBhEBe4kHv/6B2cwCdxklrrz2A7GFBUIlpm+6yQRiswio Shy5dhrM5hWwlbi9EWKOhIC8xOoNB4BsDg5OATuJp8czQcJCQCWrrx1lncDIt4CRYRWjSGpp cW56brGRXnFibnFpXrpecn7uJkZgwG479nPLDsaud8GHGAU4GJV4eF9whsYJsSaWFVfmHmKU 4GBWEuHd+BUoxJuSWFmVWpQfX1Sak1p8iNEU6KaJzFKiyfnAaMoriTc0NTS3sDQ0NzY3NrNQ EuftEDgYIySQnliSmp2aWpBaBNPHxMEp1cC4zNPoSKVT9xZn5Qcyt1YXRFZ88K41vDD9xL7n 11h0BH/ofg18Wbnvw9lPr4trvl0QN1mQf2HebasM1Q8nBd/VZS0NCzilrW564rBEfcjZlSWB HUzXd2kZK86NesHp1LJUpHiz8He+V30eDw0/31hnmq11Jngnm9XEwkshyy98tNm1+qdljUii EktxRqKhFnNRcSIAdJuZPm4CAAA= X-CMS-MailID: 20200226100815eucas1p2f4448e3dea078bfc58a8acdc70340c11 X-Msg-Generator: CA X-RootMTR: 20200226100815eucas1p2f4448e3dea078bfc58a8acdc70340c11 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200226100815eucas1p2f4448e3dea078bfc58a8acdc70340c11 References: <20200226100802.16384-1-m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Mark Brown , Lee Jones , Sylwester Nawrocki , Marek Szyprowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" When runtime PM is enabled, regulators are being controlled by the driver's suspend and resume callbacks. They are also unconditionally enabled at driver's probe(), and disabled in remove() functions. Add more calls to runtime PM framework to ensure that the device's runtime PM state matches the regulators state: 1. at the end of probe() function: set runtime PM state to active, so there will be no spurious call to resume(); 2. in remove(), ensure that resume() is called before disabling runtime PM management and unconditionally disabling the regulators. Signed-off-by: Marek Szyprowski Acked-by: Charles Keepax --- drivers/mfd/wm8994-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 737dede4a95c..69d973ec42bf 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -584,6 +584,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) goto err_irq; } + pm_runtime_set_active(wm8994->dev); pm_runtime_enable(wm8994->dev); pm_runtime_idle(wm8994->dev); @@ -603,7 +604,9 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) static void wm8994_device_exit(struct wm8994 *wm8994) { + pm_runtime_get_sync(wm8994->dev); pm_runtime_disable(wm8994->dev); + pm_runtime_put_noidle(wm8994->dev); wm8994_irq_exit(wm8994); regulator_bulk_disable(wm8994->num_supplies, wm8994->supplies); regulator_bulk_free(wm8994->num_supplies, wm8994->supplies);