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: 10337805 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 BD3A7603B5 for ; Thu, 12 Apr 2018 03:55:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B09772857E for ; Thu, 12 Apr 2018 03:55:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A57E1285A4; Thu, 12 Apr 2018 03:55:47 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CE932857E for ; Thu, 12 Apr 2018 03:55:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752956AbeDLDzo (ORCPT ); Wed, 11 Apr 2018 23:55:44 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:16735 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752906AbeDLDza (ORCPT ); Wed, 11 Apr 2018 23:55:30 -0400 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: , , CC: , , , , , , , , 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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