Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752801AbdGELyl (ORCPT ); Wed, 5 Jul 2017 07:54:41 -0400 Received: from mail-sn1nam02on0087.outbound.protection.outlook.com ([104.47.36.87]:47171 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751637AbdGELyg (ORCPT ); Wed, 5 Jul 2017 07:54:36 -0400 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=gmail.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=gmail.com; Date: Wed, 5 Jul 2017 19:54:00 +0800 From: Peter Chen To: "Rafael J. Wysocki" CC: Peter Chen , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v16 2/7] power: add power sequence library Message-ID: <20170705115400.GA17226@b29397-desktop> References: <1498027328-25078-1-git-send-email-peter.chen@nxp.com> <1498027328-25078-3-git-send-email-peter.chen@nxp.com> <1868803.ffQpiaMTN5@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1868803.ffQpiaMTN5@aspire.rjw.lan> User-Agent: Mutt/1.5.24 (2015-08-30) X-EOPAttributedMessage: 0 X-Matching-Connectors: 131437292737291250;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39840400002)(39380400002)(39400400002)(39410400002)(39860400002)(39450400003)(39850400002)(2980300002)(24454002)(189002)(377454003)(199003)(9170700003)(626005)(8936002)(83506001)(356003)(4001350100001)(47776003)(81166006)(73972006)(73392002)(46406003)(8676002)(97756001)(83322999)(106466001)(5660300001)(7406005)(4326008)(77096006)(7416002)(6260500002)(53546010)(498600001)(229853002)(86362001)(33716001)(9686003)(104016004)(53936002)(76176999)(54356999)(23726003)(110136004)(8656002)(305945005)(1076002)(87572001)(50466002)(189998001)(33656002)(38730400002)(6666003)(2906002)(50986999)(6916009)(82202002)(105596002)(6246003)(54906002)(76482006)(2950100002)(39060400002)(55016002)(81442002)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0608;H:tx30smr01.am.freescale.net;FPR:;SPF:SoftFail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD013;1:vKG3iKgeljFmZqSh9BJHF6kqLz3l222d6EvqjSyXiNyCcY4zHJJEaPz9L2+eba7xEaPYYD3k6elcvKLYarFOZV+QlOcQ97xofhCBpihx3pEF+HOAm+b5khYJ4w01UBdH+FtH5XbI//HZPKRTuvBg0GCfBOeaBYiwI374ZbGlRd/h8NG8iAo4qNvOhflxyLpboUMaIVv6XWP0yf1ljpcVhjazMRAhGLdAvd5/ieENwVDA5w1JH4H883DX2tgZekHWplzh6g21mgH362+roGV5YLpECKB3X1w8Yk3RUe/QsAKeIZq7Q4tQodWJNWpeVenorA6xe6e/GARSsQAZruyL4XaXX2EIubknRsM4Lby/3/B8ypjppYyH3PcC6Y5JcNIWghOtY3snZsU2OIljzHZcP3senDq+6pcHYZuhot7slW1o53rGxGaQ3Fn1tm67Y3D1wj4an0MT4YCjMu0+/x6fllXl/r6yEOVH5BziAF/TNEA7Ebc/h50RHiDXknnqp9666E/hkQsn9jDWKYawRd4VRKYCxjkSMpdFKj76eHjkf4q4GGg+8uwvWtONEKiBNLI0Xv7YqsTZQ4giN38+Rchz/OHmcMxfewR0Z1TjM4YCcVZTcH/sTOIx1SzH45+aEw/Y2918ZkxPIVKTePhXtl0SazG80m57L441F1CRT8CzwIEra4DwvuwpaIcxk1MDH0OSW1GwGwKSAhLs96B4L5QkoFrEifQCALJ3Us4vOFKJuZZWDjdgaxCzRDqsJ8wQoYmHRiowfL6Awp+l6EWEqdH5cf9ib5gKXKNVgAR7rTnEFYTi8jMVQVFb78a8i1gnHXE+6blSM0K9ZxpCKTSJM5y9Qqv+wr54I/eaTS8GjmNMMIOoELKElvYqThJaN0FFD/0yICL3EIs2vWT8uXC6KaC9WVBNQcbwbWdVqFX9HsJIJPs= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef5c6518-402f-4472-63f2-08d4c39c9a4f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM2PR0301MB0608; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;3:YLQq+7cn891g3sfuxBKJodQ1ekM1AQErnGlmJmYwjAm8tGzeeCJE7UVmO0cZeBwIjSH2OP6bc2Nr2xmxuvhjw9i31l2WbXpxbngOn2oK587aDKiY1LgyMO3He4Rn4Sv2dyjXXsmj1vc7c12p47RQssfgry7N+tWuTfO+6EeYhavMyP6C+bzCAaNaEFMeyoDYJf+WREBtavO03pir7JXeJ0eeyzxqJz2VTGIv47PyBNiEbnhpH6rOWBTojwkwaHO7mIDdRv3ELVWyck6eY3+vCxL2fsMWSbsL58mZVrqornmQWR9HOwASIop1lKihgAWfyCb4wDY8GNaJ9nwNX+X2/tsUoOcUS69LfiY6IT78Zf9ao17cVHh8Sojvzv2gNS4FamzByWgB/GTsWKXJwTDIAYxiNYgIYAS12Xlt+EIuefybWV9uWFSGYmerjvKQEQ2R8Ee96ixbc2VBF5/wz7cyK7o2Bo/px7SmK2v8mbEsuLzty7rdttVWLo6iDpzvLER0LHg0PXKUoAFlkDRVcslPGRwJfkzPUxRaX5JwFimcm4PyMR3OfXt3ncwvsYtsTGi64vFNq4DpYuOno42Z/RX9NquQnkydgQv3yAuBwQPYcqi9mgEr3ymkc7RZxVrbK3LR5cNDpt8HfhySOd0sAVBp7qv58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RCavfWWQeuPE4y0JpHD92wZlnWNVqskL0iWpwWLuXXNsqSLwumpI4zPDWXbqIt4oe6ND/6vLLg2MqYscSWB1x7Z4BZhQq+6Xf/Bv+oGDmpitRlB5+7KIgy4xeWKu/U76OMVLCdo7tMshzymVff5nnH06bmrKWvFLb4OqlPUjTk= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;31:dGeV3CLr9hcsQ7JQCj+NtPnk/shNEoQx6xE0aWboCEJRmzMeVCs6h0wjt9GxYs2IMy1QB4UO+5w+fukMvnHNj0uY6HngEYG5tBfe4U0/5DI8h8gthtq1Leb+crr4o3RiSP0gytIrczWmZ6D2zn28Pdg4fCZq36J4o2epQbOXswbeGiqJsH1TjxnHpnuFV16BnR2KOVa0IaymY/c8hPF8J2oelhq0aKDtemozVKH9nxW+JtfjCGAUAVySYQBEFcB1uHMSKMF52UcFyBJW+jPerz5JLZKXaUK2T/0InEVk481FO1AtpXZWs9f9ztaJWU5U+ZPFapMcyn8QJnWm0ab3qBpC8VkGEu5b4CxbBWK8HRAFu3NByBUvdKc+NPtXEkr+926w4p9TRBt+Vi8NMfWRQY1nklGgViIepIZfoBRXgDzxZg8ROgBiLfm049XGL7jKoOXKtTHHW07f8AyXsY7DIB7hfvK7eMnaEMWJBerYo0CFts6ukRK2uZexrf9Y0W6aNbhTGXDdkvy3TdbJBdHT4YKXBvLGE5gVKU+aQytwVDOG1jOnZAyFv5V6e4gc04vyScDU5bYVtaEUT6HGsjfwSp+8US+sCZH0uW6nzq6lm6w9s4ixK3/wzErbbsJHWj8FHPmNO0yMb47iTs1rk+yP1Y9kH58m+rlJ9CCRotlO7igJkrI5sF0kY/Aj2QyU2D/U7yShwiEkeLcTDmGRGt+K1g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(185117386973197)(148574349560750)(247924648384137); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(13016025)(2017060910033)(13018025)(5005006)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(20161123563025)(20161123556025)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123561025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR0301MB0608;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR0301MB0608; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0608;4:3gcGUOGD6ZyS1t++C5VFggIzTIy/atvx3BKy5bTG?= =?us-ascii?Q?IP8UQcGdAZuS3Ro27a2yEsmwbnT07sgD9gzAE1iwrZyHa3/U5+QHBB+fVOAc?= =?us-ascii?Q?Qb14qw6i5XD5NUwKyQiyEN1G9El7SNfwm/MmVb9So64l4Cndf4KAi03RHmW7?= =?us-ascii?Q?+XQ7KUJmNV5muHhY5PM54p0NRrTon8qJutch7n2PhacJW1MnIg3YEE7BhVkp?= =?us-ascii?Q?cU1yfGH7e8EEmObeHX1ZtOGslfcymw5qaMHaz2WYYPTT3HwFbjuD3Rl49o94?= =?us-ascii?Q?0f4ovNFqKslsqTC7ukfrHHtQv4I6hNwsoQk+ns/AIRqA9KzqNpFZ02S2L1OG?= =?us-ascii?Q?tFoa4jPldigoC7BceAwJOzVhnjIgP4ZF3O/Xg/qVBCqcBl7HbrSCJu/ad8H3?= =?us-ascii?Q?3CJk6AsrEBz8CI4o3jZIj4Tf3nwBCCp1yZhnqggOmtvbJBpgR+cINhsQop1F?= =?us-ascii?Q?kXqCgCPQds7nPTwZezRBfVDS8k6rk+sH8ADjaPaQuFBKo4J1zEr+YEuhgooo?= =?us-ascii?Q?RO/gsNdFvMKfGa93rX+tBKuLdO+p0oLbGiw0vsL6IXE0yvTDLQW+0Z7c0kpO?= =?us-ascii?Q?wmYk9vYVzoBZyrvlvNtklBT9ercfagv0n/vlAj28B7zwB1YKzCmnx419bL3k?= =?us-ascii?Q?PDOhtk3CJw9Yoz6sSGMSiA3qw8/Pb34p37G0LFVhHUoX1PBeh9AdFOUIESNh?= =?us-ascii?Q?nS1MUjDkRWIV0GGAQ2up8imBKLush/gofgL1sa0qU8izeHY2EY0HeSL3tysh?= =?us-ascii?Q?V95A2Odgj0vwtzal3KWXCI5Qo3JwbBObhs5dn6ACNHoVcIc6kFl8SJD6Tg+v?= =?us-ascii?Q?AdGcbefqEov415Ciexkh8CsCe0DbOLMKOUiyJDHhlUnb/nPrOcubA/o4reHc?= =?us-ascii?Q?hpq6GqoItBC4GM1mRTPVOAbEM5VW3mA1oypZtlopeNRGMw7KQyrzlMFJHpK4?= =?us-ascii?Q?gIIsy929F55dVY2WnpEzWz7FeOZSQJMYWCbhw1iLCVB1cSNiWw64ygFb3gQi?= =?us-ascii?Q?YgIgcojvWQF9vfrbDwvl28+rAuh3IKuIT7BwK9WJFNzcUT+/jPNYKqfikiTI?= =?us-ascii?Q?elr2w8AvW9whM0CQMS0m3uc9hyrnuMTtTttgaNDJdnv0Fqe6XZc2295am/aq?= =?us-ascii?Q?yBjzEhFTOpRGnqENXG/kzmEpwmy80TMJUFFYjGCJcJTMs+72zaQ6Fjfot+EK?= =?us-ascii?Q?qmyOM+Im5Z6qmF5HfXNj/ln87a5sLwAMUKKMvgwZ+0owDHQuezs+eTTW9+wL?= =?us-ascii?Q?MXLr6Hp4SCKz4QIjSnUOZS/pCYIuJe06aN7uwItgVcYzHfki7Y7GagpuyCiD?= =?us-ascii?Q?P8DN/Bq0GBzlO41WFUTvHHZQJXQg+/7zgMprhzrHDn45zsrcbujoPwJvkWb4?= =?us-ascii?Q?RhWwXFVugd/g4gViDScK6Rrv0M6vjPiCWTFWJZZWquT+3w6t?= X-Forefront-PRVS: 0359162B6D X-Microsoft-Exchange-Diagnostics: =?us-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fO3HYd+VSA1zQd02j7bLkHHdAB4gKVQjihuib/eEifXZ3oTQVxBB0te5?= =?us-ascii?Q?2k78H9UeK4YmGxippijF/ZoJ73ceNOAnArlCAAfmiyIvEnXB/ISrt92i94ek?= =?us-ascii?Q?4EY=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;5:0nSlCY1imUnsyBvgPHOcElIqHPgv8iUJoaDJKukhmCPY5okaiqxpJWVkK3GpFpgHtLD8gm50uwhyFUAvY4KcBPQdbiuSaNBdptXB4CMQD4dlj4VQs63ensI09vwZFhvco4OuXzrcEaKBWUvQaq/If1xSjhAIoRD7M/itl7SAcg9hbg7kpEb9WDvZbpNtV36K7+yymha3JLv3PWBuBlCXGwnk6JYlhEGaQ93xLWqkleiM4YlfTxWfCb2+zsP8TA2CEAbPK5XbV6021EwyyMHDBiVniGfzXzrk3ndbhd8hKbiNsRBA/JAUXSxrGOLSDF3wtd08Idz3hFK8Bw7z8J8iJzmW75wDieN7vpdwlC+hSnvX5n2Sstg4COtKDzmIZgHEdJz/QQgB8sOQjckNhduA773q7eiCseHaZ3bcI4N5eDb/393+hvAIE/saROJTt8eNj/sGalClDlJWWcmm93nevyMVMx9GVvKV6GxoLoRTMTxL14+JXA2BRe7mi28nEWLCCESvyBesbblgT1fJUWDlzg==;24:5upANZFCRI+SBHVjsYox4I4APzMWAACPhrHUDCDkKuMqDQpEA9FFmcr2uMy5YOUPhWTCN1Uhc0VG4Aijml0dCglugboU95c0InA66AU35D0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;7:OilX6VfRwdx6ziZtREsoEoTsSa2Glec0qvqJUwcQ6T60nOtnXtMfi20TQ/rxtz6YFwDepE5FjaLRVAXJ5XlW2/oT+Q1B3wcGNsfmj0PEBkeP0ZCIoF8cbFzdYtiKsROeDtndsclmyc73D6LTcr0WIdYCrYr2u4GmY+ysg/NoQYy8vIsFVeCk7vcqpeipai8KNNuPOpeFl3ohVzzfK6sU9veYFLvmMJLLOn7+fmwCE1vBzwvKwF+rBYRhMU/piOWfQCnN4K/ewmyw6fr1oFwow4+98VlewwHT9uzUwJTH9S0CGmso0tR7K2oPqAPvIGfpsZaU6KyqWSQTzdu9cZf2B9ZhbzWe7U1X+xf41ogMp25tQulY5MeVDuDuOqGFFWpM1G1k6NHx4qfT+ILhBux0sg8OPKVRsG1+VpXXi3gR99IATh21C5xrVAbDzDRi8OGVh0SkJD720na1pZNKFJalFGLPYDN7YHwmv3LLL7XhIphDquO17sSZ8F/nRk/LckTBoJ7OW6VlE/ShCdKxiwNQndgo73VIhbpjhlpb/E1ZhwiLeEZ4webODcxxMroa4kKgjKylCU7ZRTiG5RgOgr4H1eieYJQuKDtTqxfm+xAZHYZOWT8/wkvAQGrGVId2GgjT7lYAh4Aka8fsPeKU7v1T7elic+7g4GjrNTtIUkKjBwMPOXKMu/jxLj7nnrUFRq6cQ7/v8SDdLzN7Av10Wx1e9ETcFL+TuHOUFY1rpBew69iqneyz62QGXSfX/UvoC3GLbtPfR/s8F+H3gsItANE2kxRp45MvEp29oQ0KT/UcXXs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2017 11:54:33.4171 (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.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0608 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 11601 Lines: 244 On Wed, Jul 05, 2017 at 02:44:56AM +0200, Rafael J. Wysocki wrote: > On Wednesday, June 21, 2017 02:42:03 PM Peter Chen wrote: > > We have an well-known problem that the device needs to do some power > > sequence before it can be recognized by related host, the typical > > example like hard-wired mmc devices and usb devices. > > > > This power sequence is hard to be described at device tree and handled by > > related host driver, so we have created a common power sequence > > library to cover this requirement. The core code has supplied > > some common helpers for host driver, and individual power sequence > > libraries handle kinds of power sequence for devices. The pwrseq > > librares always need to allocate extra instance for compatible > > string match. > > > > pwrseq_generic is intended for general purpose of power sequence, which > > handles gpios and clocks currently, and can cover other controls in > > future. The host driver just needs to call of_pwrseq_on/of_pwrseq_off > > if only one power sequence is needed, else call of_pwrseq_on_list > > /of_pwrseq_off_list instead (eg, USB hub driver). > > > > For new power sequence library, it needs to add its compatible string > > and allocation function at pwrseq_match_table_list, then the pwrseq > > core will match it with DT's, and choose this library at runtime. > > > > Signed-off-by: Peter Chen > > Tested-by: Maciej S. Szmigiero > > Tested-by Joshua Clayton > > Reviewed-by: Matthias Kaehlcke > > Tested-by: Matthias Kaehlcke > > The executive summary here is that I'm not going to apply this patch (and the > following series depending on it), because in my opinion it is misguided and > I quite fundamentally disagree with the basic concept. > > The code has problems too, but we first need to agree on the basics. > Thanks for valuable comments, let's agree on the concept and design first. > > --- > > Documentation/power/power-sequence/design.rst | 54 +++++ > > MAINTAINERS | 9 + > > drivers/power/Kconfig | 1 + > > drivers/power/Makefile | 1 + > > drivers/power/pwrseq/Kconfig | 20 ++ > > drivers/power/pwrseq/Makefile | 2 + > > drivers/power/pwrseq/core.c | 293 ++++++++++++++++++++++++++ > > drivers/power/pwrseq/pwrseq_generic.c | 210 ++++++++++++++++++ > > include/linux/power/pwrseq.h | 84 ++++++++ > > 9 files changed, 674 insertions(+) > > create mode 100644 Documentation/power/power-sequence/design.rst > > create mode 100644 drivers/power/pwrseq/Kconfig > > create mode 100644 drivers/power/pwrseq/Makefile > > create mode 100644 drivers/power/pwrseq/core.c > > create mode 100644 drivers/power/pwrseq/pwrseq_generic.c > > create mode 100644 include/linux/power/pwrseq.h > > > > diff --git a/Documentation/power/power-sequence/design.rst b/Documentation/power/power-sequence/design.rst > > new file mode 100644 > > index 0000000..554608e > > --- /dev/null > > +++ b/Documentation/power/power-sequence/design.rst > > @@ -0,0 +1,54 @@ > > +==================================== > > +Power Sequence Library > > +==================================== > > + > > +:Date: Feb, 2017 > > +:Author: Peter Chen > > + > > + > > +Introduction > > +============ > > + > > +We have an well-known problem that the device needs to do a power > > +sequence before it can be recognized by related host, the typical > > +examples are hard-wired mmc devices and usb devices. The host controller > > +can't know what kinds of this device is in its bus if the power > > +sequence has not done, since the related devices driver's probe calling > > +is determined by runtime according to eunumeration results. Besides, > > +the devices may have custom power sequence, so the power sequence library > > +which is independent with the devices is needed. > > In other words, devices can be in different power states and there are power > states in which they are not accessible to software. In order to be accessed > by software, they need to be put into power states in which that is actually > possible. > > That has been known for over 20 years and by no means it is limited to MMC > or USB. > > Moreover, power states of devices generally depend on the platform and if > the same IP block is used in two different platforms (or even in two different > SoCs for that matter), the power states of it can be defined differently in > each case. > > It also is quite well known how to define a power state of a device. There > usually is a list of power resources (clocks, regulators, etc) that have to > be "on" for the device to be in the given power state. In addition to that, > it may be necessary to carry out some operations after turning those > power resources "on" in order to trigger the power state change (like > toggling a GPIO or writing to a specific register etc). > > Now, of course, it is not generally guaranteed that devices will be in > software-accessible power states initially, so it is necessary to put them > into those power states before trying to access them. > > Again, this isn't anything new, but it has always been about power states. > > By defining a "power sequence" you generally define two power states for > the device, say "on" and "off", and a way to switch between them, but what > about simply treating power states as the primary concept in the first place? > > That would be more general, because there are platforms with more than > two power states per device. In those cases, the power state choice may > depend on additional factors, like say during system suspend it may matter > whether or not the device is a wakeup one (and it may not be able to > generate wakeup signals from certain power states). Using a single "power > sequence" would not be sufficient then. I agree on the concept of "power state" for it, but I have several questions for above: - Can I write new code for it or I need to depend on something? I find there is already "power state" concept at documentation. Documentation/ABI/testing/sysfs-devices-power_state - If I can write the new code for it, except the problems I want to fix, are there any other use cases I need to consider? > > > + > > +Design > > +============ > > + > > +The power sequence library includes the core file and customer power > > +sequence library. The core file exports interfaces are called by > > +host controller driver for power sequence and customer power sequence > > +library files to register its power sequence instance to global > > +power sequence list. The custom power sequence library creates power > > +sequence instance and implement custom power sequence. > > The above paragraph is really hard to decode. > > There is no explanation of basic concepts at all. What exactly do you mean by > "power sequence"? What is a "power sequence instance"? What do you mean > by "custom power sequence"? "power sequence" means the sequence for power on/off device "power sequence instance" means when carry out power on, it need to allocate one "power sequence" structure, and this structure includes all operations during power on/off sequence. "custom power sequence" means different devices need different power on sequence, eg, one may need to open regulator before toggle gpio, but another may need opposite sequence. > > > + > > +Since the power sequence describes hardware design, the description is > > +located at board description file, eg, device tree dts file. And > > +a specific power sequence belongs to device, so its description > > +is under the device node, please refer to: > > +Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt > > This, again, is really difficult to understand, especially the difference between > "the power sequence" and "a specific power sequence" is quite unclear. > "a specific power sequence" for one custom power sequence > > + > > +Custom power sequence library allocates one power sequence instance at > > +bootup periods using postcore_initcall, this static allocated instance is > > +used to compare with device-tree (DT) node to see if this library can be > > +used for the node or not. > > Same here. > > > When the result is matched, the core API will > > +try to get resourses (->get, implemented at each library) for power > > +sequence, if all resources are got, it will try to allocate another > > +instance for next possible request from host driver. > > + > > +Then, the host controller driver can carry out power sequence on for this > > +DT node, the library will do corresponding operations, like open clocks, > > +toggle gpio, etc. The power sequence off routine will close and free the > > +resources, and is called when the parent is removed. And the power > > +sequence suspend and resume routine can be called at host driver's > > +suspend and resume routine if needed. > > Let me try to say what I understood from this. > > If there is a DT node with a matching "compatible" string, the initialization > code will try to acquire resources needed for "power sequencing" of the > corresponding device. It is expected that host controller drivers will > then use the provided helper functions to turn the subordinate devices > "on" during enumeration and "off" on the (host controller) driver removal. > They also are expected to use the "suspend" and "resume" helpers when > the host controller is suspended or resumed, respectively. > > If the above is what you intended, then it is not the right model IMO. > > In particular, I don't see why the controller driver suspend and resume > should operate "power sequences" of subordinate devices directly as the > subordinate devices are expected to be suspended (in which case they > also should have been turned "off" already) when the controller is > suspending and the controller resume need not affect the subordinate > devices at all. For example, one device's clock needs to be opened before it can be seen by the controller, but the device's clock isn't controlled by controller driver, controller driver only operate its own clocks. So, after the controller suspends the device, it can turn off device's clock for power consumption, and when the controller resumes, it needs to turn on the device's clock before talking to device. > > Moreover, it assumes that all of the platforms including the IP block driven > by the controller driver in question will use the "power sequences" model, > but what if there are more generally defined power domains on them? No, the IP block doesn't need this "power sequence", the power stuffs (clock, gpio, regulator) are described at firmware (eg, DT), and power operations are carried out during the probe, the device and driver match happens before power operation. But for devices on the bus (bus is controlled by controller), the match information (eg, product id/vendor id) is stored at device's firmware, the controller device needs to talk with its child first to get the match information before the child device's probe. > > It looks like the power management should really be carried out by an > additional layer of code to avoid imposing platform dependencies on > controller drivers. > > Further, what if there are "power sequences" for the host controllers > themselves? Who's expected to operate those "power sequences" then? See above. -- Best Regards, Peter Chen