From patchwork Mon Mar 25 13:59:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 10869239 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 01C5A1390 for ; Mon, 25 Mar 2019 14:00:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E67A9285B3 for ; Mon, 25 Mar 2019 13:59:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DADA429148; Mon, 25 Mar 2019 13:59:59 +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 87433285B3 for ; Mon, 25 Mar 2019 13:59:59 +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=HhDT2i4UY3zO0N xbHZ1x3D49CnL75PPKI2xv+UP97wVG5AJ0kMEnoxrTNnAV/ixo2lGe2/5aG7MsxP4G3eLPd/hP6B3 cots9Bp6AEkV2+4Al4kGYzrDgckxM5giKcB8IXa63sDcYPAR2CI9wZBq7Rd3NG+3VzKgD4W7inb+/ cB9eXjh0esbdGa/BkLk3oe8X6q2UEs9i3xl+hcPB07VBit5bZVkNMh8hrefLO6CKVqPpRh0pEwmyF aJhyeN4wET+87nsI+FA0bXUrrvvL/Ce6xx/DyN0nQvBYyhczxwOTafr/3U3wgVP4Qss+92wUIAeCk aMjYSiV99jN9NV9J8yYQ==; 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 1h8Q8r-0005dn-Ov; Mon, 25 Mar 2019 13:59:57 +0000 Received: from mail-eopbgr40059.outbound.protection.outlook.com ([40.107.4.59] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8Q8V-0005EC-DD for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2019 13:59:38 +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=ve+cfDI2qbopJssZRHTNKpTAzimWZKBWfdXNbws9NUcB4pAzGPSIRVqYukkE2qpdlXR0QQpshcVzrNEK+CplgZAeA+woQT4C0ei7suxthp2kgIzxsl5pYWBhvHc3UM+6Q6dwtR60HXg3R306aLis0fyGJJ35ouSf/Wl0ySPk2KU= Received: from AM0PR04MB5779.eurprd04.prod.outlook.com (20.178.202.151) by AM0PR04MB3970.eurprd04.prod.outlook.com (52.134.92.143) 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:59:30 +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:59:30 +0000 From: Abel Vesa To: Robin Gong , Aisheng Dong , Fabio Estevam , Shawn Guo , Stefan Agner , Linus Walleij , Sascha Hauer Subject: [PATCH v2 2/2] pinctrl: pinctrl-imx8mq: Add support PM operations Thread-Topic: [PATCH v2 2/2] pinctrl: pinctrl-imx8mq: Add support PM operations Thread-Index: AQHU4xL3K5ykV9hQfk+63lOvEQ+eXQ== Date: Mon, 25 Mar 2019 13:59:30 +0000 Message-ID: <1553522352-20214-2-git-send-email-abel.vesa@nxp.com> References: <1553522352-20214-1-git-send-email-abel.vesa@nxp.com> In-Reply-To: <1553522352-20214-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: VE1PR03CA0051.eurprd03.prod.outlook.com (2603:10a6:803:118::40) 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: f8326015-4d4a-4c83-2707-08d6b12a19f0 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:AM0PR04MB3970; x-ms-traffictypediagnostic: AM0PR04MB3970: x-microsoft-antispam-prvs: x-forefront-prvs: 0987ACA2E2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(366004)(396003)(136003)(346002)(189003)(199004)(99286004)(86362001)(4326008)(53936002)(106356001)(11346002)(446003)(97736004)(105586002)(14454004)(486006)(68736007)(81166006)(8676002)(36756003)(81156014)(6486002)(7736002)(305945005)(50226002)(476003)(478600001)(2616005)(14444005)(8936002)(256004)(76176011)(6436002)(66066001)(6512007)(5660300002)(25786009)(71200400001)(71190400001)(316002)(44832011)(386003)(6506007)(102836004)(26005)(6116002)(186003)(3846002)(54906003)(110136005)(2906002)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB3970; H:AM0PR04MB5779.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: JnH+CXiREC7m2uoHE3keSwAHec7NmvkgxoLeL/sFuikrcpNkSxaVAHkOrBHHXotrlKHOgtfnLwzvfpTPas6kPfZdhY3ilqG+aVB5P9AooKBfnw6hVRV1nX7ewVeQrIFqaybXDqwcGxmblv6ukSnx5n7Y3x6zFFTG0bU9kS9szYr92L/zCXYdda/cbPIhCRHglmj8eetfia2oAoHXParPzXMZSDXRZKL2feIuhulSPFkRPtWoawfr710mw4YYqlaOw7eHRUCaGvjOuR9YXJsLgR+P9uHxCU0j0icDa9fx69UdGmcSAS7QOTnx7iEUpftGkLfXJ0nBOaZM7vI39R7yr8866WNSQUucMLQrev9cXDcsMAtuuYZQYLOg5ufnMpPZIJLjwvhT66lP9l27LKoG/ERCTYz4j+qeW/e3uSt9kjY= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8326015-4d4a-4c83-2707-08d6b12a19f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2019 13:59:30.4227 (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: AM0PR04MB3970 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190325_065935_445517_FEFC23C8 X-CRM114-Status: GOOD ( 11.29 ) 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: "linux-gpio@vger.kernel.org" , Abel Vesa , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List 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,