From patchwork Wed Mar 6 13:35:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10841129 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 76C4D1803 for ; Wed, 6 Mar 2019 13:35:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61C122D95F for ; Wed, 6 Mar 2019 13:35:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5578B2D9DD; Wed, 6 Mar 2019 13:35:22 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA7402D95F for ; Wed, 6 Mar 2019 13:35:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726969AbfCFNfV (ORCPT ); Wed, 6 Mar 2019 08:35:21 -0500 Received: from mail-eopbgr30076.outbound.protection.outlook.com ([40.107.3.76]:8937 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726962AbfCFNfU (ORCPT ); Wed, 6 Mar 2019 08:35:20 -0500 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=u4AWxEfbCNuwXMQtv+qabsCDmma0RBdaJOcQinv3KfI=; b=dCMKfM8ZIr01rnPHhjBawv8EiuAsbaPxG6D3FYez4s88lEVKjaMi5FJ0ZUmF05ssi+I/5ircstJjSsj49PNhbk1gw+sni5cIjKqQQ/y8FtQFpMCt2G8cpUArLQ2A8UWTqTB/j5fY/XAZGcOVUY/m1VnwB1LRgxejqDFAoHasnEg= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.92.158) by AM0PR04MB5553.eurprd04.prod.outlook.com (20.178.114.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Wed, 6 Mar 2019 13:35:16 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::50ed:d1b5:c043:3b79]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::50ed:d1b5:c043:3b79%2]) with mapi id 15.20.1686.016; Wed, 6 Mar 2019 13:35:16 +0000 From: Aisheng Dong To: "linux-pm@vger.kernel.org" CC: "linux-arm-kernel@lists.infradead.org" , "dongas86@gmail.com" , dl-linux-imx , "rjw@rjwysocki.net" , "ulf.hansson@linaro.org" , "khilman@kernel.org" , Aisheng Dong Subject: [PATCH 0/2] PM / Domains: Support enter deepest state during suspend and probe failure Thread-Topic: [PATCH 0/2] PM / Domains: Support enter deepest state during suspend and probe failure Thread-Index: AQHU1CFvfsZ7WdIE3USv/6OsS06YHw== Date: Wed, 6 Mar 2019 13:35:16 +0000 Message-ID: <1551878926-8455-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK2PR04CA0052.apcprd04.prod.outlook.com (2603:1096:202:14::20) To AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:5b::30) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f429ed68-b1b1-4ce7-92c2-08d6a2389196 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:AM0PR04MB5553; x-ms-traffictypediagnostic: AM0PR04MB5553: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM0PR04MB5553=3B23=3Atq?= =?iso-8859-1?q?BMuFwPnyJp75sllqgUcCx8Cd4+OTekNq93i2qBVNvK08ChdyzbbSJXvMgSxG?= =?iso-8859-1?q?vgoKAufNv4q2D003rSfmLAGWeOxHKlpAJCMwlsDEjwQstBwbeL5/hx9fCNdb?= =?iso-8859-1?q?Q2beciAvf3pwg4dLWPzgLFpSSyie/j7U374u4fcJNORQI9s5Bl9VH9stWC9b?= =?iso-8859-1?q?rzcRK3L1Wubm5IvysHyfzhobSiEMBqTiUOXo9RT3krjlst/1fH+ScVfzxe+2?= =?iso-8859-1?q?v3y0qQp0h2omb+xFVGpxko/K5eBEHPfk0P4/hszxpOLqQoAhsKCGwOAIanH3?= =?iso-8859-1?q?WTc6pPycos2ki8aa71P49mDKFQDyR0Zm2AyYDNpbn+/NyUQDSX7sIWlQCMcm?= =?iso-8859-1?q?EOgRgir9gB69ph+tgUdio779kFg0mTeY7a+qc6pkwMkDRx6wfXy1J5srxjZz?= =?iso-8859-1?q?R+qsN23A78yt04Ar25pm9e4mJrBojTZ4P56Uyz5e/IdrEAR6U8TbI2Cv7DAr?= =?iso-8859-1?q?ucpQkD7TQS3rVkym/eetcC1V/HMN0lYVH5x1tQ4AGHDyrnwX/eVJidEofp2Q?= =?iso-8859-1?q?+7k0k2NpPVztnEhjDg9hop/j0fU9dR/2mxmn7s4KcJZPKocGO79UyamwOVWH?= =?iso-8859-1?q?C0UPTdFxmjSAGrXA62s6gKXw5+edxsJWsM7Zajla68+upCB2jtdVhoiLhcsB?= =?iso-8859-1?q?COjCzN0wzSEcKqM2TNciQ+rtf0Zf8YySZ4TpxzzaDclImQatJ5oMz7F1CyNh?= =?iso-8859-1?q?0sF/7SCtD7r+T6Dag3LnBk34dgBIksFQXgsreP2x48ICWvscpaO4m+AVgejU?= =?iso-8859-1?q?eWvLbOeA2zqCpSAdfEFsa2l/3bs1wKLgK4e6zDpSrn900O7Mk2GT+kFZSovc?= =?iso-8859-1?q?NtZtVYKkSjreadG2knXxoKEUCv3B5EWb4IndY55d6TN2F1C5D4tDl2RQ+i9q?= =?iso-8859-1?q?mSqXxiTo/skBpIyqGperx+DP9m9uiBXkhv0xEyhJhbc4beY33tZBibbWv8Gg?= =?iso-8859-1?q?GlY5l0SZ3FEi4oE2XYHsjM/13J/qBcSNLF1PXmyhPp1zh1D1Xd6QdGTjnBZQ?= =?iso-8859-1?q?C9IzEdxoI80/CReZ2feZO3M9UyRqLKPQsbhZ7/O6py0b4BNYGUjMs8sDXV4N?= =?iso-8859-1?q?NGczU2KKSy5bWJ/4lhDkCbOAkuoX1pNtyUG/dMTD2ab2T5V9kor86qBeWIBP?= =?iso-8859-1?q?6OCWzCcKXLqmmCVVA8zC7fZFfezIvyBuWl0gWh5AEvo4Ya0zKEs9wsYTpk9S?= =?iso-8859-1?q?fnGveR1/+DLY2erHPoA8K1cI9uOdn9QF4PcbNR15qlraIeJp8IkLQgU8dMd+?= =?iso-8859-1?q?O9tE9u6LxaSs3bG8nl?= x-microsoft-antispam-prvs: x-forefront-prvs: 0968D37274 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(376002)(39860400002)(346002)(396003)(199004)(189003)(36756003)(386003)(6506007)(102836004)(26005)(486006)(44832011)(53936002)(99286004)(54906003)(71200400001)(71190400001)(476003)(6116002)(3846002)(6512007)(68736007)(2501003)(52116002)(4326008)(6486002)(97736004)(5640700003)(25786009)(50226002)(256004)(6436002)(2616005)(106356001)(8676002)(7736002)(6916009)(478600001)(2906002)(316002)(81156014)(81166006)(15650500001)(86362001)(186003)(14444005)(5660300002)(66066001)(2351001)(8936002)(105586002)(305945005)(14454004);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5553;H:AM0PR04MB4211.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: uVaFa/LDcBPlmfGbcEzusOiUuo14UBP04GunbBkYX7qcqouHjA0c8k3sM9gIpShSKHwWvYkp7Oxkx4S52lTj/ifxD5XLAxEVeDiczkgPCovGkmv9fcQvPVkAuA52QQj7II/cvLvs8NgfSFWy/oErB9a7AKaGOnmZqhKk2LcGVOrmq4pnrGQv/4Nq1UCINOIdX5HGZ1IUXTYkqwuNmb2IxDMB2VcrD5rZ/RfZ+sklr9UAaXxZGL9Q/PAITH3vsylrVk7LsZIR+5n1gmG0U4q4FeHSrRgNjmQl6oqjikTfYqJyf7yxWOmdbZXDSdJeTY6q7m+DMkg6qTaza41U8Ll6zQIlFZa2SmxhGOlNBZ4VNFTlOx37sA+O7aOwfGKXi+akbbWxow7F8pZzU4q8TLXRjhJ0TSTcytmVqo8z42tZ6FY= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f429ed68-b1b1-4ce7-92c2-08d6a2389196 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2019 13:35:16.8549 (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: AM0PR04MB5553 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the generic power domain will power off the domain if all devices in it have been stopped during system suspend. It is done by checking if the domain is active in genpd_sync_power_off, then disable it. However, for power domains supporting multiple low power states, it may have already entered an intermediate low power state by runtime PM before system suspend and the status is already GPD_STATE_POWER_OFF which results in then the power domain stay at an intermediate low power state during system suspend. Then genpd_sync_power_off will keep it at the low power state instead of completely gate off it. And for the probe failture case, if there's no devices using it, we can fully gate off the domain instead of enter an intermediate state. Dong Aisheng (2): PM / Domains: Support enter deepest state for multiple states domains PM / Domains: Choose the deepest state to enter if no devices using it drivers/base/power/domain.c | 22 +++++++++++++++++++++- include/linux/pm_domain.h | 1 + 2 files changed, 22 insertions(+), 1 deletion(-)