From patchwork Thu Apr 12 03:53:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 10337863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B1492604D4 for ; Thu, 12 Apr 2018 04:03:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2FA22656B for ; Thu, 12 Apr 2018 04:03:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9669627FA3; Thu, 12 Apr 2018 04:03:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B3F42656B for ; Thu, 12 Apr 2018 04:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zxeb0MNvYDcri4biNCGBn9pmcwLR8DrM0+YL/BFzlmU=; b=rEnMZwdM0Pst92 d6YS8CT7L8ztA9hhXhe+Iy2ZUuSvDo6GNUdVpaaiezZHmk4R4MtDHyXZ48Z4Xq3LkMcxpLGMeNDwi 0LeGkTpNIG4DaD7cKeMRDD708rqr1EefBVK289KzP0W9qwnS3j0Uf6cUjxktWH799a7Jutt7OpWRX GosjLUb1AXTsUU8Tcc8zleK4V3kpHHf1+3aGCiFhHiUXns+74/stAKFw6Bmgws4VaWv3HvzDLHO2k ksBKjFaLhE8KCawckW8lGgK9V6zuevNGow4v0GNV4eb5XN2yMuWmZ6T6tKlHLdYk3QT6pzpEC1Trx SM+FXIbo1NeGcmFciyoQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6TRl-0005XL-Fp; Thu, 12 Apr 2018 04:02:53 +0000 Received: from lelnx193.ext.ti.com ([198.47.27.77]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6TKY-0000Vy-Rj for linux-arm-kernel@lists.infradead.org; Thu, 12 Apr 2018 03:55:29 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3C3tBgP005581; Wed, 11 Apr 2018 22:55:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1523505311; bh=deQiRLViBezuqSX/MA+Sc2aROsGkIQy7NeEGbYF3Rgc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fp91NP1Ri8loBB19gbD1gna7NX9EktFwbZh0RDTJbs0vcz/vi1MzTGR28VrzEt3j7 KRdd+VzaLMkzYNUpnOV2Co5Y7BRWbwfwnUk+ulck2mK6QLjciHSaiFO7yHqQU/Bopg eCeH/w33RS5RQhoaRLpLLZ33dPcz2u7RYrbCg5Wk= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3C3tBaW008418; Wed, 11 Apr 2018 22:55:11 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 11 Apr 2018 22:55:11 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 11 Apr 2018 22:55:11 -0500 Received: from ula0393675.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3C3sQps010150; Wed, 11 Apr 2018 22:55:07 -0500 From: Keerthy To: , , Subject: [PATCH 11/14] gpio: omap: Restore power_mode configuration at resume time Date: Thu, 12 Apr 2018 09:23:56 +0530 Message-ID: <1523505239-16229-12-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1523505239-16229-1-git-send-email-j-keerthy@ti.com> References: <1523505239-16229-1-git-send-email-j-keerthy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180411_205527_013415_05B7EED8 X-CRM114-Status: GOOD ( 14.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: d-gerlach@ti.com, j-keerthy@ti.com, linux-kernel@vger.kernel.org, t-kristo@ti.com, Russ.Dill@ti.com, haojian.zhuang@linaro.org, ssantosh@kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dave Gerlach Commit 2dc983c565e0 ("gpio/omap: cleanup prepare_for_idle and resume_after_idle") introduces omap2_gpio_prepare_for_idle and omap2_gpio_resume_after_idle to properly configure gpios that are used as wake sources. When entering off mode, omap2_gpio_prepare_for_idle can set a flag indicating off-mode entry is desired, however once this flag is set it is never cleared, so any additional calls to this function, regardless of the mode, have this flag set. This patch restores the pwr_mode flag to 0 in omap2_gpio_resume_after_idle to ensure the flag is not misconfigured during non off-mode operation. Signed-off-by: Dave Gerlach Signed-off-by: Keerthy --- drivers/gpio/gpio-omap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 34fde30..84d664b 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1476,6 +1476,8 @@ void omap2_gpio_resume_after_idle(void) continue; pm_runtime_get_sync(bank->chip.parent); + + bank->power_mode = 0; } } #endif