From patchwork Wed May 16 05:40:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 10402591 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 3B39B601F9 for ; Wed, 16 May 2018 05:41:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29E5C28761 for ; Wed, 16 May 2018 05:41:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E3C428763; Wed, 16 May 2018 05:41:13 +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 98DB428762 for ; Wed, 16 May 2018 05:41:12 +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=fEuu+w7jPCS1Mkzfnx1fLa3pglpNPtItvJZ1n9sXrjk=; b=sY1LfLp11XRtga 8iwlqvS7HkyOA6phxGkHA4Vfewamf6fAMOYXf6jzbN9WMpPhRpyjVOgaO7/JA0MgRuJsqfwRR1q9H HMDQm8yELpY3DIQYT1eSI1WO0Eca/dEueZkbDMdPaTM49DTeheGf217GkG59n0gOp8TWFSX6/xTwc gGz5/fbkh+QBEyE6Pn2s6wzwrCl0wixXgOJX2ae0i/BVdGmihiUsh0LhWd0NQJ9PlLX8pCVIM7koI w+4C7/hlIL+fp0PrVeMuUTNfFHd46jWepJRc6b9iRW8/Guq66EATfmqatZFdEWrO6RZpd2QvOzRXu NaVdiCDtkhgyekv6Smkw==; 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 1fIpBS-0006xs-PY; Wed, 16 May 2018 05:41:06 +0000 Received: from fllnx210.ext.ti.com ([198.47.19.17]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIpBO-0006wn-AB for linux-arm-kernel@lists.infradead.org; Wed, 16 May 2018 05:41:03 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4G5emUW008233; Wed, 16 May 2018 00:40:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1526449248; bh=LI4k8FpvPQn17fugQfzKBUCdUYbjgUkhFdw1b6UrMR8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=caIYdBVw2V+CwQzt8b/SLABzAMfZLSa/NImLXQtQ/5eQ/IMn/9YYSZTNXxvx0lZ+s /lMlHpSSFtn2cNh5VSrznN7imRFDvfdpZlH1upwfhH43Ga7EDtBdtxCZnWVPPAfVCt vusc9q9IMS6u+DWl6t5SUBk9JLJYS10SIVx/jYkg= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4G5emVI022979; Wed, 16 May 2018 00:40:48 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 16 May 2018 00:40:47 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 16 May 2018 00:40:47 -0500 Received: from ula0393675.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4G5egd7008219; Wed, 16 May 2018 00:40:45 -0500 From: Keerthy To: Subject: [PATCH 1/2] arm: mach-omap2: pdata-quirks: Add a quirk function to convey off mode state Date: Wed, 16 May 2018 11:10:29 +0530 Message-ID: <1526449230-27618-2-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526449230-27618-1-git-send-email-j-keerthy@ti.com> References: <1526449230-27618-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-20180515_224102_440364_873C984B X-CRM114-Status: GOOD ( 18.43 ) 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: j-keerthy@ti.com, linus.walleij@linaro.org, t-kristo@ti.com, linux-gpio@vger.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 Add a quirk function to convey off mode state. This can be used to perform additional save/restore during off mode. Signed-off-by: Keerthy --- arch/arm/mach-omap2/pdata-quirks.c | 6 ++++++ include/linux/platform_data/pinctrl-single.h | 1 + 2 files changed, 7 insertions(+) diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 7f02743..f2e16e3 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -35,6 +35,7 @@ #include "omap-secure.h" #include "soc.h" #include "hsmmc.h" +#include "pm.h" static struct omap_hsmmc_platform_data __maybe_unused mmc_pdata[2]; @@ -489,12 +490,17 @@ static int ti_sysc_shutdown_module(struct device *dev, .shutdown_module = ti_sysc_shutdown_module, }; +int context_may_be_lost(void) +{ + return enable_off_mode; +} static struct pcs_pdata pcs_pdata; void omap_pcs_legacy_init(int irq, void (*rearm)(void)) { pcs_pdata.irq = irq; pcs_pdata.rearm = rearm; + pcs_pdata.context_may_be_lost = context_may_be_lost; } /* diff --git a/include/linux/platform_data/pinctrl-single.h b/include/linux/platform_data/pinctrl-single.h index 1cf36fd..f07c1f2 100644 --- a/include/linux/platform_data/pinctrl-single.h +++ b/include/linux/platform_data/pinctrl-single.h @@ -10,4 +10,5 @@ struct pcs_pdata { int irq; void (*rearm)(void); + int (*context_may_be_lost)(void); };