Received: by 10.192.165.156 with SMTP id m28csp1485855imm; Wed, 11 Apr 2018 20:59:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+HHX8fVlLstsnAL4P3gdF50Tp+1eo6FbdfmfAmcZCd4DCIBQEaUvtmN+Yna8B2MXf1wFqg X-Received: by 2002:a17:902:d882:: with SMTP id b2-v6mr8097068plz.197.1523505571803; Wed, 11 Apr 2018 20:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523505571; cv=none; d=google.com; s=arc-20160816; b=RG7U8n+WhEdbsfVhqP28x8Xo60BBrX7vGTFbzBP/pGah0c4Xs4vK2vMWjAXdZ3UdV0 PZv+EsYiJ+B8weHUB0JQTcChu6KlHc/94op/SNSsZC3T16An2AuJmuQLsPSdOGPOtt8C RMHu6wSYrSCs6JtrzqTYJ9UugMWq2pZoCNPFY7nY7FoemSpPv45TL76NWNz47AC9gm6J 6VWb9/9Z7yxFADIxpqRsN1t+eOQ5LyWQ0qnRgO08uClUz3UvZfTdZFT2dVHrub3A7Hpi nq89i5e61N6nM0MZs5roPfgac+dY+i+HBEuUAP0IyLFwrrJTUXSjHe/krcBhcMTjBeuI iTeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Xl4jUvsowlFWO7Vr4ovXJEq8iG3pF0UM3QHkW73PsWM=; b=bEjPLzy4ayMXeYGY+DRhSZCo1JFNODRqglvsDEEC5F1YMW6BEu7LlpJb+IaLKgO5iB b3AIsTWnKUICYKz9IweHV/sIhsh74SMIPWy0Cxp2eE8MFPy7gluQ8a9AfKZbJaOdPNq+ Fq++26JGRSr04yfU62XdAoMG5lQSReLEzO5TiMWdqKJ0RNLz3947NJ2j96lEHgfHRsiH 38v1XRkFtlmc83kMhYMwPU/iZOKYNMl24d0bjVupCj7p6GGe1w4AfHVF+aX0g/6WjjYr 3PXoAEs+O89slm16e7kEinQfTTyJI00gM3jHbkMEwps+v+8EspYbJeApo3wulsjgJZ63 qY1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fp91NP1R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p64si1924305pfd.393.2018.04.11.20.58.55; Wed, 11 Apr 2018 20:59:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fp91NP1R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753008AbeDLDzp (ORCPT + 99 others); Wed, 11 Apr 2018 23:55:45 -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 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 1.9.1