Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3233322imm; Fri, 24 Aug 2018 13:03:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdawAhby+j7iAuPuqF/NaiisR5eDiWmdxe7YPec1MEc2oUhuSVtwui8qudJyoeBuhb4UOsCa X-Received: by 2002:a63:f002:: with SMTP id k2-v6mr2968242pgh.8.1535141033273; Fri, 24 Aug 2018 13:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535141033; cv=none; d=google.com; s=arc-20160816; b=rNSBaxY0D8D7Kr1Ng6JJh5D3lBjLYpPJglyuK9unDSVDJ07TaDTVOLJzvtOKyjV0eY RqtSYZRyoFgoKTnX4uASCFcgiPAeiUIjGG290HiiyZymhKK4XmuX5Zr6TGHDY9ECs1uR da+2gs1YnD0yVUDBou+xL8/EJO4TjXZXSiKgsiZYcDvFG/+9TUtgM75P+puq/d01rLMS cK6866mKpOu7sCaCbOr2I5RdrB3zZGES+nCB5NuvucZXdR+LZijBcHBRMBadhUIJqhUS 5hGL83uB7LMlHrBr+KdtjZpVQvm6nge+9flwRNXBgyJeFwoavs2TIZVnCKs+SalGGWoG Nx6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=EzEXd7BIoUyy6HAKUt4jXCFDBuWLEQ3znYjh1HNXIHc=; b=fhOOqfDo7x4xti9YbZjlTXtGxBVCxBQc2S1D79EI1K+T5F9Hy/zwKhqj89Z3cIGx3I GMshUSqwvtWr6m4Dx9jGEYotHmGmejDsKdakNq+OZAA2Y8rkKd2AYb4oH0LzY4iCDyrE 0H7CTydR95JpksRD7j4lmcQNePJ3erBcJXuKJfevNWOwsWipuIVpuIih5/4b2I5cCcrL MSmdZUivcsIMcg5u2ACaJ68d3u9cvnQHDbjM3VdZNhkTvZxRlVNNocL6ItZc6MwgdwJq +6OtvtX41ovnrW2xQJ9n85u/G2kt7yB1QE3p537njGcle7ACUagco9zG4as6PDHB92Gz gtqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=VA1X6fuJ; dkim=pass header.i=@codeaurora.org header.s=default header.b=jUATfI+b; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si6977440pgp.551.2018.08.24.13.03.37; Fri, 24 Aug 2018 13:03:53 -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=@codeaurora.org header.s=default header.b=VA1X6fuJ; dkim=pass header.i=@codeaurora.org header.s=default header.b=jUATfI+b; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727761AbeHXXie (ORCPT + 99 others); Fri, 24 Aug 2018 19:38:34 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:49728 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726989AbeHXXib (ORCPT ); Fri, 24 Aug 2018 19:38:31 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2FEA860712; Fri, 24 Aug 2018 20:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535140947; bh=ZXkLPLrX41Roj7lssuCvbjZNE8mkYqo8klJ56eMnlxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VA1X6fuJprgOlUUlBjE1TTSnTxSynSRd4PRuN4LgbTrUBBvoWUSsdyqcPQEsK924M sxn1irhaCmYrYajtvUmCKFVw1h7nrKhsA7A626lxU0DMAPA66KCChidjIyUNxKeJLF Fd8NkNIRx5YsO2UNwQOQahakmCZEp08hDwER6FCM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 99D79605FF; Fri, 24 Aug 2018 20:02:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535140946; bh=ZXkLPLrX41Roj7lssuCvbjZNE8mkYqo8klJ56eMnlxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jUATfI+bstvoIeEosIGUilulVSTMqJ5wNeFM6BLLW9qUxSyy0W6OPEoed562ClDSm I6/87Xk9yRRR0Kc8YSpAJdTVKpv0+rlqERm1r63/OJsMYM+CcoMqttUU8+qxG5u9Un /Lrfn60JQQMxwW1eCc2lG+iVevZs6F2ZEEzMs4nI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 99D79605FF Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org From: Lina Iyer To: marc.zyngier@arm.com, bjorn.andersson@linaro.org, sboyd@kernel.org, evgreen@chromium.org, linus.walleij@linaro.org Cc: rplsssn@codeaurora.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, rnayak@codeaurora.org, devicetree@vger.kernel.org, andy.gross@linaro.org, dianders@chromium.org, Lina Iyer Subject: [PATCH v2 4/5] drivers: pinctrl: qcom: sdm845: support GPIO wakeup from suspend Date: Fri, 24 Aug 2018 14:01:56 -0600 Message-Id: <20180824200157.9993-5-ilina@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180824200157.9993-1-ilina@codeaurora.org> References: <20180824200157.9993-1-ilina@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable TLMM IRQs to be sensed by PDC when we enter suspend. It is possible that the TLMM may be powered off and not detect GPIOs that are configured as wake up interrupts. By hooking into suspend callbacks, we allow PDC IRQs to take over and wake up the system if wakeup interrupts are triggered. Signed-off-by: Lina Iyer --- drivers/pinctrl/qcom/pinctrl-sdm845.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c index 2ab7a8885757..cc333b8afb99 100644 --- a/drivers/pinctrl/qcom/pinctrl-sdm845.c +++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c @@ -1297,10 +1297,16 @@ static const struct of_device_id sdm845_pinctrl_of_match[] = { { }, }; +static const struct dev_pm_ops msm_pinctrl_dev_pm_ops = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(msm_pinctrl_suspend_late, + msm_pinctrl_resume_late) +}; + static struct platform_driver sdm845_pinctrl_driver = { .driver = { .name = "sdm845-pinctrl", .of_match_table = sdm845_pinctrl_of_match, + .pm = &msm_pinctrl_dev_pm_ops, }, .probe = sdm845_pinctrl_probe, .remove = msm_pinctrl_remove, -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project