From patchwork Mon Mar 25 13:48:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 10869173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1FB71390 for ; Mon, 25 Mar 2019 13:49:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9509229311 for ; Mon, 25 Mar 2019 13:49:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85E4A2931B; Mon, 25 Mar 2019 13:49:10 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 E4C8E29311 for ; Mon, 25 Mar 2019 13:49:09 +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: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:In-Reply-To:References: List-Owner; bh=UNfSAuAoKuRJ5ZU9hJXfIivDrQQARMev3rWqYitBQYI=; b=sdQHf64Mgho8v0 OF5HmbxLkzi65fMTCHimSy2J1rBcykqY9yYZNM1xRgOL7E07d+DNk2PPPNHVY5UapG8rQIqrTSRY4 uEfkDuOvi6a2ZWlu3ku+a/jj2LAM9k50iYhwrRRX5m/eOIDxw0/MZtLy+CJTnMMadQfpdwEU2quW/ Ng+iq7Ub2M7VBQP1dcy67D+Lzc3UdMhzAzFLY4gqvvu79klr4heafEPnl2G821ycv72pXN0Sy6nEp v9qksjyeLeIsA0FIrP9huW7xobtn3ptfmDLFnmTI6d3j2oddpE80ctJ5bp3PX/POMh8U5f9sUKx5o c4NRhgspwj7ZVNI45QqA==; 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 1h8PyH-0003J4-VB; Mon, 25 Mar 2019 13:49:01 +0000 Received: from mail-eopbgr40073.outbound.protection.outlook.com ([40.107.4.73] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8PyE-0003HK-84 for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2019 13:49:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tyvOG3qdSShuQxeiLD1HrKePK8DQCchjIjUGrmtWseg=; b=e5DB+k8oJDQm2SHV+0zHWYAkYmlsG0thCLZSJD32l680Kjs6HZ3cqC8HOLWdpWbxf4Qvzk1pMACGYihgRiNj95LNDhIR8qyGu7frVh7q2tbWLUtqshbgLGyEJAZ4oCeKcroi55dqoPcDeGMe5hCrxeHTUx1lKznWjHsMaD6hu2c= Received: from AM0PR04MB5779.eurprd04.prod.outlook.com (20.178.202.151) by AM0PR04MB5779.eurprd04.prod.outlook.com (20.178.202.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.18; Mon, 25 Mar 2019 13:48:50 +0000 Received: from AM0PR04MB5779.eurprd04.prod.outlook.com ([fe80::9579:32ab:898e:6769]) by AM0PR04MB5779.eurprd04.prod.outlook.com ([fe80::9579:32ab:898e:6769%2]) with mapi id 15.20.1730.019; Mon, 25 Mar 2019 13:48:50 +0000 From: Abel Vesa To: Aisheng Dong , Fabio Estevam , Shawn Guo , Stefan Agner , Linus Walleij , Sascha Hauer Subject: [PATCH 1/2] pinctrl: pinctrl-imx: Add suspend/resume for LPSR Thread-Topic: [PATCH 1/2] pinctrl: pinctrl-imx: Add suspend/resume for LPSR Thread-Index: AQHU4xF5dEldeuWdf0qD0BEcN/OvIA== Date: Mon, 25 Mar 2019 13:48:49 +0000 Message-ID: <1553521721-12061-1-git-send-email-abel.vesa@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0501CA0024.eurprd05.prod.outlook.com (2603:10a6:800:92::34) To AM0PR04MB5779.eurprd04.prod.outlook.com (2603:10a6:208:131::23) x-originating-ip: [212.146.100.6] authentication-results: spf=none (sender IP is ) smtp.mailfrom=abel.vesa@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6e8292cc-cc23-49a4-acfc-08d6b1289c2f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB5779; x-ms-traffictypediagnostic: AM0PR04MB5779: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0987ACA2E2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(136003)(376002)(346002)(396003)(199004)(189003)(316002)(71200400001)(4326008)(110136005)(53936002)(14454004)(36756003)(102836004)(186003)(105586002)(106356001)(71190400001)(2906002)(81166006)(3846002)(81156014)(54906003)(68736007)(8676002)(6116002)(26005)(6506007)(386003)(52116002)(97736004)(256004)(8936002)(6486002)(50226002)(15650500001)(66066001)(5660300002)(7736002)(86362001)(6436002)(99286004)(305945005)(25786009)(6512007)(2616005)(44832011)(478600001)(476003)(14444005)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB5779; H:AM0PR04MB5779.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: It7onICsc1p1h+fEqo2X7rEj4Xdj5E6tbnq2Wwi66RtdPOvu9JCkG9ls9d7lprMMKqRNHcbqX63zhpjUJH4aliJJkxdGU5oILAtkrWxmaIcNXudU8AXfpw2+5ZD4zbAdiMXqJvsyqzX9Yj+O5igGDlNyd0IB0/XH9kKczLK1W/DzBd4sLdFU9KUHIziSJ51LpZ0ICENxDQQsmEiQoStUmsq0dC1i+HuXe5SZdq187XSBNgBQUAFIeoklHmR1p4U4rP8xDXZ0sTicW0QSaNDLcQGriamhj9bK9QKlxUZWqvblUfwFsF1Pfi9tp0bUmadb9XDNByRJtn7t4sKOXytPIZywrx763QN5OzLpWuyHMM2hF57puhxdNIFm52iKwDxbATJFL5SoFhwAakiL4UXDBPG4YlcHD/XRAcD7Uxzocrc= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e8292cc-cc23-49a4-acfc-08d6b1289c2f X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2019 13:48:50.2055 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5779 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190325_064858_284616_03D4D89E X-CRM114-Status: GOOD ( 10.68 ) 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: Abel Vesa , "b38343@freescale.com" , Linux Kernel Mailing List , "linux-gpio@vger.kernel.org" , dl-linux-imx , "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 From: Robin Gong To support pinctl hog restore after LPSR resume back, add suspend/resume in pinctrl driver. Signed-off-by: Robin Gong Signed-off-by: Abel Vesa --- drivers/pinctrl/freescale/pinctrl-imx.c | 20 ++++++++++++++++++++ drivers/pinctrl/freescale/pinctrl-imx.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index 188001b..93c0253 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -887,3 +887,23 @@ int imx_pinctrl_probe(struct platform_device *pdev, return ret; } + +int imx_pinctrl_suspend(struct device *dev) +{ + struct imx_pinctrl *ipctl = dev_get_drvdata(dev); + + if (!ipctl) + return -EINVAL; + + return pinctrl_force_sleep(ipctl->pctl); +} + +int imx_pinctrl_resume(struct device *dev) +{ + struct imx_pinctrl *ipctl = dev_get_drvdata(dev); + + if (!ipctl) + return -EINVAL; + + return pinctrl_force_default(ipctl->pctl); +} diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h index 98a4889..795669c 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.h +++ b/drivers/pinctrl/freescale/pinctrl-imx.h @@ -136,6 +136,9 @@ struct imx_pinctrl { int imx_pinctrl_probe(struct platform_device *pdev, const struct imx_pinctrl_soc_info *info); +int imx_pinctrl_suspend(struct device *dev); +int imx_pinctrl_resume(struct device *dev); + #ifdef CONFIG_PINCTRL_IMX_SCU #define BM_PAD_CTL_GP_ENABLE BIT(30) #define BM_PAD_CTL_IFMUX_ENABLE BIT(31) From patchwork Mon Mar 25 13:48:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 10869175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A04431669 for ; Mon, 25 Mar 2019 13:49:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8750128EDA for ; Mon, 25 Mar 2019 13:49:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7890728F01; Mon, 25 Mar 2019 13:49:20 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 6DA2028EDA for ; Mon, 25 Mar 2019 13:49:19 +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:In-Reply-To:References: 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=zn5JCJ7rqTZYLQmpRrig5mBbZz73mbReF8PsEt2po1Y=; b=iQPqUIiQx+QKDm dtxfL4P63VHobRQK1tT/90oqpfPsDVxV+yu55y9lcLun/IJ38gWIe2Ifm2wAMotzXV+HT3QfLiLIo g4GyAN1wRWhCZwXeKNFewRB4D6gS8WGHmASYK93dxz9KsmkqaPTsVY3ZfBR4jmoHB8wDIA7Ny2DJv LNyTm2UlCquUT+rz4NpvwkOoY3oDowSsnvTwkSTCqMHGib+n175GeRWHPIF812D8lWruOwxx2cd25 XYV+nU8T511LM6aBK+jqiAPj3YbOdCSdhZq7blTujH29EBFjBx2vsbeXNgWNo28Re9ZbRA+p+nDkt bw0yZ7iBRE4zFC366V9g==; 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 1h8PyS-0003Uo-Lg; Mon, 25 Mar 2019 13:49:12 +0000 Received: from mail-eopbgr10086.outbound.protection.outlook.com ([40.107.1.86] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8PyE-0003HN-MH for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2019 13:49:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JfoZ9EE3stKLHv402uHMNSBwu2grPs8tEeDeo+bSsHI=; b=ncU3Uc3yH4riCNwqrZ9apPtNzwJrpKUUE0ECTC6ilRdE2KJk8F5NzByofPRvKWLX1adWoQAhV4VZtiXT4MPf+8SMS1eTZmFuGA9PJg0IJCQOdttqAp+dl7ujVMr+5tjcbAnCHravrFXXiSEZHacYyiP55HhZ9Q/Dyns/ACJQl38= Received: from AM0PR04MB5779.eurprd04.prod.outlook.com (20.178.202.151) by AM0PR04MB6097.eurprd04.prod.outlook.com (20.179.36.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.15; Mon, 25 Mar 2019 13:48:51 +0000 Received: from AM0PR04MB5779.eurprd04.prod.outlook.com ([fe80::9579:32ab:898e:6769]) by AM0PR04MB5779.eurprd04.prod.outlook.com ([fe80::9579:32ab:898e:6769%2]) with mapi id 15.20.1730.019; Mon, 25 Mar 2019 13:48:51 +0000 From: Abel Vesa To: Aisheng Dong , Fabio Estevam , Shawn Guo , Stefan Agner , Linus Walleij , Sascha Hauer Subject: [PATCH 2/2] pinctrl: pinctrl-imx8mq: Add support PM operations Thread-Topic: [PATCH 2/2] pinctrl: pinctrl-imx8mq: Add support PM operations Thread-Index: AQHU4xF6fE34vAFLP0y+ttoOUtgHUw== Date: Mon, 25 Mar 2019 13:48:51 +0000 Message-ID: <1553521721-12061-2-git-send-email-abel.vesa@nxp.com> References: <1553521721-12061-1-git-send-email-abel.vesa@nxp.com> In-Reply-To: <1553521721-12061-1-git-send-email-abel.vesa@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0501CA0024.eurprd05.prod.outlook.com (2603:10a6:800:92::34) To AM0PR04MB5779.eurprd04.prod.outlook.com (2603:10a6:208:131::23) x-originating-ip: [212.146.100.6] authentication-results: spf=none (sender IP is ) smtp.mailfrom=abel.vesa@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cdc42648-6ab5-47d4-f76f-08d6b1289cfd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB6097; x-ms-traffictypediagnostic: AM0PR04MB6097: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0987ACA2E2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(346002)(396003)(366004)(39860400002)(199004)(189003)(66066001)(8936002)(50226002)(99286004)(6506007)(4326008)(71190400001)(386003)(71200400001)(52116002)(478600001)(54906003)(76176011)(53936002)(86362001)(7736002)(256004)(316002)(110136005)(14444005)(6436002)(6486002)(6116002)(3846002)(14454004)(97736004)(6512007)(26005)(476003)(68736007)(102836004)(305945005)(36756003)(25786009)(2616005)(5660300002)(11346002)(8676002)(2906002)(446003)(44832011)(186003)(486006)(81166006)(81156014)(106356001)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB6097; H:AM0PR04MB5779.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: yk5HPz7a6qDwAn8EOa5D3RX+i1Z0WWEDFcjMnePqA4sCSzRbiZSatRoNgjZtl+73Yxsm/TDkCUXSLeoomtsWQKf+viL6gW2+fSNCke6ROM5z5hDS+F0rqZhhWsHee7m6VXp7RwvtdMbLHYGOM1QWMclV/rm0P97+Ed15PlzqPj73bQc9mpJVBQpPXtXoy/F2FQE7z/U15cZBEiREc6HnOMBzi+4ihUgZ47s1MXtBkoUUXGrGKU+yzaWPzJ6xs6GopG1GdvNaF2cKcg+E6r0SxR6SuVJXxTc7TN+1d/W1t1MjODMFNAZ9z3xsZWcw7I5UUxSqmXFeWjd/n4mBTPY0ybT2V/q2BV3v4Fc3+umj4cf91wZG0wZZjlJsstloSq5E6Nq6f0jmxMwvYsgiXYAgG8NitC+3pHbZVvmhMwPtXgw= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cdc42648-6ab5-47d4-f76f-08d6b1289cfd X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2019 13:48:51.6796 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6097 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190325_064858_725885_7061478F X-CRM114-Status: GOOD ( 12.31 ) 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: Abel Vesa , "b38343@freescale.com" , Linux Kernel Mailing List , "linux-gpio@vger.kernel.org" , dl-linux-imx , "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 suspend/resume pm ops to the pinctrl i.MX8MQ driver. Make the suspend late and the resume early since some of the pins might be needed active very late. These call the pinctrl-imx generic handlers. Signed-off-by: Abel Vesa --- drivers/pinctrl/freescale/pinctrl-imx8mq.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/pinctrl/freescale/pinctrl-imx8mq.c b/drivers/pinctrl/freescale/pinctrl-imx8mq.c index 8d39af5..2a212bc 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx8mq.c +++ b/drivers/pinctrl/freescale/pinctrl-imx8mq.c @@ -335,10 +335,26 @@ static int imx8mq_pinctrl_probe(struct platform_device *pdev) return imx_pinctrl_probe(pdev, &imx8mq_pinctrl_info); } +static int imx8mq_pinctrl_suspend(struct device *dev) +{ + return imx_pinctrl_suspend(dev); +} + +static int imx8mq_pinctrl_resume(struct device *dev) +{ + return imx_pinctrl_resume(dev); +} + +static const struct dev_pm_ops imx8mq_pinctrl_pm_ops = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(imx8mq_pinctrl_suspend, + imx8mq_pinctrl_resume) +}; + static struct platform_driver imx8mq_pinctrl_driver = { .driver = { .name = "imx8mq-pinctrl", .of_match_table = of_match_ptr(imx8mq_pinctrl_of_match), + .pm = &imx8mq_pinctrl_pm_ops, .suppress_bind_attrs = true, }, .probe = imx8mq_pinctrl_probe,