From patchwork Fri Apr 15 17:29:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 8854351 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9CF86BF29F for ; Fri, 15 Apr 2016 17:53:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 307362021F for ; Fri, 15 Apr 2016 17:53:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E58420218 for ; Fri, 15 Apr 2016 17:53:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751078AbcDORxO (ORCPT ); Fri, 15 Apr 2016 13:53:14 -0400 Received: from mail-by2on0064.outbound.protection.outlook.com ([207.46.100.64]:18798 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750776AbcDORxN (ORCPT ); Fri, 15 Apr 2016 13:53:13 -0400 Received: from BY2PR03CA012.namprd03.prod.outlook.com (10.255.93.29) by BN1PR0301MB0708.namprd03.prod.outlook.com (10.160.78.14) with Microsoft SMTP Server (TLS) id 15.1.453.26; Fri, 15 Apr 2016 17:37:42 +0000 Received: from BY2FFO11FD007.protection.gbl (10.255.93.4) by BY2PR03CA012.outlook.office365.com (10.255.93.29) with Microsoft SMTP Server (TLS) id 15.1.453.26 via Frontend Transport; Fri, 15 Apr 2016 17:37:41 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD007.mail.protection.outlook.com (10.1.14.128) with Microsoft SMTP Server (TLS) id 15.1.453.6 via Frontend Transport; Fri, 15 Apr 2016 17:37:41 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u3FHb2HN019919; Fri, 15 Apr 2016 10:37:39 -0700 From: Dong Aisheng To: CC: , , , , , , , Subject: [PATCH 12/23] mmc: sdhci-esdhc-imx: add esdhc specific suspend resume callback Date: Sat, 16 Apr 2016 01:29:36 +0800 Message-ID: <1460741387-23815-13-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460741387-23815-1-git-send-email-aisheng.dong@nxp.com> References: <1460741387-23815-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131052154618620181; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(2351001)(229853001)(105606002)(33646002)(36756003)(11100500001)(104016004)(6806005)(5008740100001)(50986999)(230783001)(106466001)(76176999)(92566002)(15650500001)(110136002)(81166005)(77096005)(4326007)(189998001)(2950100001)(586003)(87936001)(2906002)(50466002)(85426001)(19580395003)(48376002)(19580405001)(5003940100001)(47776003)(1220700001)(1096002)(50226001)(86362001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0708; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD007; 1:mMfSBgYImLYENwSdH4wkQArNa8V5veQc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kbH2CSPqIz0Geza5qW3fMHcediBTtHcIwIAW/D3xekv54Rwm1JI/m5N5bp+JsVDW1MQ= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0708; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0708; 25:R7jdaqvooKJ889OWTbPKQRtTHjftzFl1NqSEUBGH28/pjwl/BrdN29wY8iWnEMPdgfbwKHwpYOMVFsyJ1iz0gQH3U5o5jHDpT5k3llhW/hl9FSJT/lVtnZvxhJ03B/akW4KtrLmlDWf5QFhsajPjxQqf89Ot/oI4elTsZIwVllvPcpbMGp9K0Gwlqop8iIP2c+98j95NSeAuMiRFGKxKV8SvmxSnILcvAhnGqkFeMe126uSiyw1QFBcZJBvG4I0vFXvMOJjMVPK7tMp+/nEetVNdiNoxRdjjNlq9S/EE/K3n3A+mOvkePfKcFjTDitHnOOGMOBC4uusSsF1XZ+ueXg2xN2PYTrZ4BLRJZIwGdXdnfCa7/KrFRRN9BYuvB7j83YvOQdQzbMbhwIw42wX4ZLKM6s59by8+QGaLA2tVhXB0zx6l/GbZPEDlcCvUPr4VX/YuIqvpso98zvvPTp+MHR65UZX/Klq9jbozFDmvwp1uQBANMa66yr8TWXPjrF6U3XvHt1VXJk+BL/43To9c+HW9HT0kStSteI6lAohXN6r4Aa3GgfWzT6ZR6e1QM+BcKTef/iaO+NBNcqhVBzQEV6hXt2lDrORbsyaJT/AShx2+K5L/wCWHCT09NYZdM2uXP94phzrdGRXqXOKitRk26JC3H9n9kGU+sKi+6t/bcvWuu5YLMD3NGRx4DIq2zrv0 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13018025)(13017025)(5005006)(8121501046)(13023025)(13015025)(13024025)(3002001)(10201501046)(6055026); SRVR:BN1PR0301MB0708; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0708; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0708; 4:w5fXn5mCM214y/aI8Y9RKDAsyAoVH+N9BRTjGQ6aiDlAVrCDTB2GG/MFeAup2wfNy/dbwR3mIZY97AK7kWyXLmv7WroSVGWJGGnn++p33+k7N2AoN1O9SlJwX/9tCno/o11tl1iZ9JXkHU9uqSBfZ+AT7cTqH91/2Toxq4bNDObIwqTX2S7PZV8HBmLjQlI/9Grydb3GTF1SfU7ZLRcr36M5YVtXQi/a9gMGnrweLaZpQmsgVdML6fDVSfdpgS1WZ9t+bSUU2zsIys+UEXi+RFNhqPTIerAWQixj5zWe6no8S6DIAmVDQN2+C8hWRuhSFYt55dg27d5rWe9nrABhhb9b5FYb6mQPlIfRbDe5p2I43Boj47b2SNyGlubkHIt6syh3OkITtE1IcRGVSm7u9pOw7v720Wn9uxYvxtMLu30/Wi72DXXK/IIv6KorPUWW230IcvL40lZctYpvf91XCprfmAwSzyn3qrYxTncZFIc= X-Forefront-PRVS: 0913EA1D60 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0708; 23:wt/KM/BhGyEE6sLrBQTd6jkpmnwBhZq24DgxZd3?= =?us-ascii?Q?2u58iaRMdAyWURlq0MCAuXP8rZoNAAQ9FWJLQdVKSjbnCFq1jTn5g9BlxzlF?= =?us-ascii?Q?5uwN2aim4ru1U96yFBvu6UUb8sVy1nqDqV3lmWs0Tbcp8Y00NPTO3Dlu8Esv?= =?us-ascii?Q?6ksAo+d0ZJ80RCgzlz/3//XIQfCzIQjpWWHkfUykDfJsSjK4RGG7bIti+u72?= =?us-ascii?Q?2sewDx3u/A9YqXq+CZKkjzizZMUm/YLV1+tAarxn5T4oDbiSYEvxAC6Kryk1?= =?us-ascii?Q?PDMAvp9Kzr8LOXjGpnxpMum0p+bftGzD5qUoFrmtcG8+KRt0n3T1+EanNCOj?= =?us-ascii?Q?zR7C62iGF1c6gfzdac1hIRVnQk8E2XGDKyFEGBy5uSgFsgPgJ/i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qaGrtOKLlFkp0Y3iAIxc6DYT/x2sttUHr+uD6pZcqddC/SH7hLg6IwlyYkJeaK+8=; 24:Js5mGv4pMxpAoGK1jp8g40AV8ZPgQMrX4WuYagQ0atucGQ0MG7o2cnqOnEl72Ng6xtUvVUWCR40grLydbspd7XTUyzX5PphSW5s8Sm2CkTc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2016 17:37:41.7372 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0708 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It will be used for platform specific suspend/resume state save/restore work for some low power mode like Mega/Fast or LPSR mode. Signed-off-by: Dong Aisheng Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-esdhc-imx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 03980db..6fef6bc 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1254,6 +1254,16 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) } #ifdef CONFIG_PM +static int sdhci_esdhc_suspend(struct device *dev) +{ + return sdhci_pltfm_suspend(dev); +} + +static int sdhci_esdhc_resume(struct device *dev) +{ + return sdhci_pltfm_resume(dev); +} + static int sdhci_esdhc_runtime_suspend(struct device *dev) { struct sdhci_host *host = dev_get_drvdata(dev); @@ -1289,7 +1299,7 @@ static int sdhci_esdhc_runtime_resume(struct device *dev) #endif static const struct dev_pm_ops sdhci_esdhc_pmops = { - SET_SYSTEM_SLEEP_PM_OPS(sdhci_pltfm_suspend, sdhci_pltfm_resume) + SET_SYSTEM_SLEEP_PM_OPS(sdhci_esdhc_suspend, sdhci_esdhc_resume) SET_RUNTIME_PM_OPS(sdhci_esdhc_runtime_suspend, sdhci_esdhc_runtime_resume, NULL) };