Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbdFOKGo (ORCPT ); Thu, 15 Jun 2017 06:06:44 -0400 Received: from mail-sn1nam01on0065.outbound.protection.outlook.com ([104.47.32.65]:39488 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750923AbdFOKGj (ORCPT ); Thu, 15 Jun 2017 06:06:39 -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: Thu, 15 Jun 2017 18:06:04 +0800 From: Peter Chen To: Ulf Hansson CC: Peter Chen , Mark Rutland , Heiko Stuebner , Stephen Boyd , , "linux-kernel@vger.kernel.org" , Gary Bisson , Fabio Estevam , Joshua Clayton , Arnd Bergmann , Dmitry Eremin-Solenikov , Vaibhav Hiremath , Krzysztof Kozlowski , , Alan Stern , "devicetree@vger.kernel.org" , "Maciej S. Szmigiero" , Pawel Moll , "linux-pm@vger.kernel.org" , Sascha Hauer , , Rob Herring , "linux-arm-kernel@lists.infradead.org" , , , Greg Kroah-Hartman , Linux USB List , "Rafael J. Wysocki" , Sebastian Reichel , Mark Brown , Philipp Zabel , Shawn Guo , Subject: Re: [PATCH v15 2/7] power: add power sequence library Message-ID: <20170615100604.GC24157@b29397-desktop> References: <1497319166-17287-1-git-send-email-peter.chen@nxp.com> <1497319166-17287-3-git-send-email-peter.chen@nxp.com> <20170614015338.GA4635@b29397-desktop> <20170615065854.GA24157@b29397-desktop> <20170615091131.GB24157@b29397-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-EOPAttributedMessage: 0 X-Matching-Connectors: 131419947967544500;(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)(39450400003)(39400400002)(39840400002)(39410400002)(39860400002)(39850400002)(39380400002)(2980300002)(24454002)(199003)(189002)(9170700003)(81166006)(33656002)(4326008)(76176999)(8676002)(229853002)(87572001)(54356999)(77096006)(50986999)(50466002)(38730400002)(110136004)(498600001)(305945005)(7406005)(8936002)(189998001)(55016002)(83506001)(54906002)(4001350100001)(7416002)(9686003)(39060400002)(83322999)(8656002)(73392002)(6260500002)(86362001)(1076002)(53936002)(106466001)(93886004)(6916009)(105596002)(2950100002)(97756001)(2906002)(356003)(53546009)(6666003)(46406003)(104016004)(76482006)(47776003)(23726003)(82202002)(5660300001)(73972006)(6246003)(81442002)(33716001)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0301MB1192;H:tx30smr01.am.freescale.net;FPR:;SPF:SoftFail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD018;1:EBNsrS93ixEr9qKpNksPJVy73efw6izAkMVxCW3C2nMcBIRi4DaSyBcwCCf3quz1gZI9seNDfcHQjurDVBytncwxn0NrgwTWL+u8Z5WP+zV7NBZ/TXimKaxv8EnZYrmdVYRVkgKYC/0YY2Z0A0IsSGFxjl3sta3RAyZ9Ucgkr6vPQn5d86QqmdP1M1e3P6bXFw/55+GGYEUOkBXnkU+ZThmFWDxoGbLzHeciwYewcjVfu1KWriklFpols+Y4mx59Fr5KfTW4Euukcj5SeHBULo1PvrNvmEv1F3QeoESVHjAGiARb44GQnKzTHUD3FzyQkKgyIqeFb4H1LjoLFk02KzL9oIJQSUIe4gDaz94I0q3gyQR4NdYiHlKqSwr6KTvrZT79txRQHAjARpVAIHtDk0Tbv4LoOF6F1IzHIkzHq/2lPuxuij6Atqkh6J4vjwvmq61VBE+ezELc8E05h6aXAMwznpKv1i+63M5+gs5HRksfZxXGkZfSkrdx+UOmGdWh4KoK7FleQbPDYwabv0O8CKVkDftKz5zFBk3YJEYR0mojui7h4Qr4zYYwbRdf6V2YC80ooegQtUWsXolMy+XU/BmBLoRuiv5qYtCKygrrpIs= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PR0301MB1192: X-MS-Office365-Filtering-Correlation-Id: fb2c5e05-0ba5-4596-1b54-08d4b3d63576 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BY1PR0301MB1192; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1192;3:RfJLaYK2zEqC1ysH5euhnoiuMVmaIIYDcERJSbUzVepz/yOMKP8nUp9etQhO9dlO6om8dg0yj46nWnqOr2HoRvs/L4ynAMEwiZDFcQFAhnrtzPApmiaIRu4h37PPZqWJp3x5L10ImOobGyOVkarvssNxqNqEErWV15CpTQTBRgj7IYHdGj+eVQaoGDpAF4s7ABAP/mMsH7X+HvVEwoBgYdITrD+uF/edai5mM4tmmJDwOte4JBDnjPibLfPLG9Dv/xAPeU9gozrY5ZqwhskOBWSnN4iuH5x0pjjh8F/h0wHim4BhjfJMz84rZ4o7zQISjOo/ZF+g3DxfV1JudfMi6nP3tKqCsKjiKVAA5NBTW55rwkNgAoAL6x401hOoQHkm2haRrIWXcxmaRpsNrP194ERnEf0GN7eg9iQvR6VV3sTOFgrQ5mTpEBfBYYnFqjJn;25:jqjNr7//IPyuUPzOWzfXf3I9uGbrMw3YGSzHIc8qSZcOuKk7KrE+jHNt9FMWQrEDADFEIWn0KTVLwoqGRHfMNNihbUmqxvTsHEnYNASOi5Drgw9Q8MfDgNR3F3Dl9Xz5YkhFyCGKogxI91twufIRSosukizNI6da36DovowjdJqvwz4pPu8TXxb9izE0AGD+Zzo5sScr95NmgpzzxXRm+crlRnePPOKMXonXyJf/CCvDKcmWeSUExPIc5PV5qdakUWuSQFjTrUEHuJoTH0Eaglyag58I83OPI5QjTQHIQ8DdFjnaqkwsjBwJ1Jf36Lku/Um9Pw8/a+FwkDVbLBPZT9OAWuIkCgzrddjv5lovZBAo3+L3VqUKKIsKz4Cg10haiQSnENWCMVHK/5F/lhaZgnBYcYF2cfn+CAgjAmma4S8+97YDvoln0txdMMGJvnhdNPTUTf8vOVTjAqUcEq8i9wHUeC70j05OKiqbA8INQ4I= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1192;31:TRbsA2BRlvvGPSSznn/cS4ZxP+8vpIw0CwMtLWB8pnJPjFtt8suuudccy9uBoEAfd/yyLZFAuYxfbqvNVbioABoKlQ6n57uyez8YsKBGNCcHzM/UXDufsSQOzZH6injOltAnXh3DS0p6Qnrbg/0g4Kb0YDKvu+/wLnUbOOVQ01MyPtHMlnZwwPjtYMtN5eQU396U00V70CQe+btRrr2Z0HiDAu5k72lO2jfWgOf5L2ShFiEHTDP+r3ZIGMED3oKWc4MoMfMcXv9CCRdawXjVVg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(13016025)(8121501046)(13018025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123565025)(20161123563025)(20161123556025)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY1PR0301MB1192;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY1PR0301MB1192; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB1192;4:rRTnZlKD6E86Psk3fQPDNhxTCdXSt0nqLke+2KYa?= =?us-ascii?Q?xPX2Qku17sWXsA3xNJ9Yc8FueIqZHXeKNtooP6j0bH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9ghd2V40+9frH5OVPt4kKObMDJxtHSgqfLpSbP4w1kS7I43SmD62?= =?us-ascii?Q?eWgTyobJMYMZrI7/GrDGi0wEtA17OWpk1DDVxEsqzR5FxS49XhUyvFTY0Rbl?= =?us-ascii?Q?VyRrLL5Bkn5+Rut/Hg/mc2hnyeeZxv5wVuLJleYGjqvULh36NGD6Bi0WLVgY?= =?us-ascii?Q?XVvGOJVZ/z9HFV0L3aOvy/fMXkDOhI7zd3ENqKAII1OZ4xVT9BBcGP3XlXoR?= =?us-ascii?Q?iernoQC8MTuViv949a+4qdKoDZeNvicItp5GrCNiJRY0s82ZYehx2j2Fbg?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0339F89554 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB1192;23:wquFPX8Z4UCJ4tLwoGHn01CAelOP7g0/Ydo9hbx?= =?us-ascii?Q?MBW/ynOztdUnTAHYO4vhvGarvv9aVGImlKD/Puk1PI022LiLEByT2yB18UZP?= =?us-ascii?Q?5ZoXLEAizcjtQPYDjJJp8woonwnPquZqWPehzDfWpuLMNMmnukp3BH96tx+m?= =?us-ascii?Q?XAFL9K7p0abF6ERUEHa0nagyU1Ktc/IwMgfPyjMheQQTDyq7+G3nE8gaouVy?= =?us-ascii?Q?rnCfMQnszJKnb9kw3WQwEXZKGj43mxqTQ5M4DoyupVqDsm5F73SKvudjh5Ll?= =?us-ascii?Q?MRVU85mmFejJwr2V1/2DFrEurZHtoNMmQf94eHr58i/Nxorf0HAxgqB8CiIO?= =?us-ascii?Q?BhWtQl1NeSn/3CRmbpS/rMIINmKbMJrfai6LMdTpR6jAC345CXL97y2injzi?= =?us-ascii?Q?fce0z8tHbRPhX3JLwT2OihvMNkunfrX//r80xx1hdl/lZSfXnkV6eFiZZ4tv?= =?us-ascii?Q?R9DFE/o8GaXIdFb5x1p2L9Macng/zfa7dBpEZA8nfSbwyaM8QlbEpE//axEz?= =?us-ascii?Q?AJZC/JH8ZN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OMjnYHmntbJxQmK+CDLqir?= =?us-ascii?Q?3dGz0Pl5h5pF6nS0OjUU3F2ySeNeMlDdhO2sa2jnf7lfUC1Kz4ar69WQCaVw?= =?us-ascii?Q?mndFg+JeDTJTqYt7PcOYeyPSlfPCO8snfMxeNzQ0YLSVf2hVpyistdpSDPXs?= =?us-ascii?Q?fQB7nVpuyZaZzSv0C2BW8QZKUiXOk+wVm+RXirm/ENL6/TP4JDkbPSCAeWQL?= =?us-ascii?Q?xPodOFdsP2P4OtkIbX03qWaC2KVX2QXBjRFk5sPMYXjg=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB1192;6:0H8rgyPcTWwShY0InLWEBvPq7yY++czjqwp+xhw/?= =?us-ascii?Q?T3ThD8VeW6t0f2yViriv0hOmH9vRbu6/ukp947W13OeLPPVlwJtR/Va1bIZ8?= =?us-ascii?Q?vdzGzG7DBjjA0PdxBZNICApFCTyRvSH6nbBUg3WnlC/qxewJS4LBEnU7d4r3?= =?us-ascii?Q?BCsyvPLWlLk5e14HZ1I9V6xxqS/8hJQEF6yESY1Yd65rCL3EMToHn9CGTRDr?= =?us-ascii?Q?wnMIdxGwuRgQ04V7nPV0C12r71DZgoKEuOdh19/f6+u39iuKCSk517qx8+k5?= =?us-ascii?Q?56sRcXYlr0Glxv2x/nUcjyUZT4nv/QRyPUn0LoEJ1v910iXVszo6zey02hm9?= =?us-ascii?Q?S/yjINNIbXRGY4NaitKXCIawt0cJh6DLJHTJie0tBS7AQmZ2/zM/TP5WCuhy?= =?us-ascii?Q?doGO1PP6r8A7f3LXVDTgHVW/G2ICc0HfF/CNSLAvayazz7fCu4qtOOQ/Q4V4?= =?us-ascii?Q?Ih/0Tg7dwyq452dsKWF92qaFMYe/VRTB1HLwPmbwHeNiQF7P9yZtUy7uGiDe?= =?us-ascii?Q?NApOEdVMicyC+jn+riqjZLe6NgboEmv6aIbyClU8rUSUJH/qTeUsMH241Zw+?= =?us-ascii?Q?6w5jA0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pnyBWin5x7dJF8DKXIJ1p1N5TOZAWwLJd/9c+sJwn0AQrZRFxPCrjCdZO26slYTXYbUTTN97Wmyf/RV9cf1QY1YOYHgUCY3G8A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1192;7:sFt6WG2864gF371zdDuqO34WAP8l9HF+GRC7ElT2wsU658g1WSKn+dVJgiVPC29QYFwaMRbPA0pIK1d4FQz694eqFgJGonIxboRgNzR0Ywsqmz6nx1DIHdrYmqzKCW9JIpM6cFOu1qKlifgLgxwSdoYXWv1MBSxbsTbZC5zz4IDj6ibqX65L7Yjr63jwys5GG3gtRnojmU4pcBlCE2EaRXEyy+9/+eAqIxhrLsGQg4NlPysQEM4INGdGD16F945EePhC5Q+yd1ycgxbZ8G1AlWlt6AzcxaUkPD7gS9I/d3duCBP8JE+QBCqvwOgQLqbMbSYrzsT5fFm/3YuZ71gr4bLuyLw9vM5ce79wX0THK4/fGojvQSNt8BY4sK7h6QO07lBoXSmIqsAgauU6xRTTZ5A0v2ifYBO4qdI+SlFoK57Smj/nyKHJgamieNr6DVXbtPgAnxdIJ6eFLAPJBw0zZdR3pt4FdAT76P88K7eFEDRzbpQMOkCWNgcv4j333MAzAE+pyZAkxq2QomRQPP5rt65UNojrc6AZZBICTWZkR9tbPtDmumq8BWWh43QZPU6UPRTLB9VS8pDj5KpbhsMO0yD65F5TuJkuVoB1FiQbK5Yu4AJ07dRErD0ulJuvTbpq3/j4jKTuCc9dvcCz34dadgQGD77xxln3B/KWlTSOOLfxCLnyxVBft2oNT3vn3ipC3HEwgW2WooHMJddwe9qBLAHOHO/kDRfCP8RT0XVHA/iJFu4Ip4FEETd7E0Bf/i10pt6WIAJx7Ie11BPslOvrtNV54BmBNdlDc2BYMDDsSJY= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2017 10:06:36.2552 (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: BY1PR0301MB1192 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3519 Lines: 79 On Thu, Jun 15, 2017 at 11:35:20AM +0200, Ulf Hansson wrote: > On 15 June 2017 at 11:11, Peter Chen wrote: > > On Thu, Jun 15, 2017 at 10:11:45AM +0200, Ulf Hansson wrote: > >> > Yes, you are right. This is the limitation for this power sequence > >> > library, the registration for the 1st power sequence instance must > >> > be finished before device driver uses it. I am appreciated that > >> > you can supply some suggestions for it. > >> > >> In general this kind of problems is solved by first parsing the DTB, > >> which means you will find out whether there is a resource (a pwrseq) > >> required for the device. Then you try to fetch that resource, and if > >> that fails, it means the resource is not yet available, and hence you > >> want to retry later and should return -EPROBE_DEFER. > >> > >> In this case, of_pwrseq_on() needs to be converted to start looking > >> for a pwrseq compatible in it's child node - I guess. Then if that is > >> found, you try to fetch the instance of the corresponding library. > >> Failing to fetch the library instance should then cause a return > >> -EPROBE_DEFER. > > > > The most difficulty for this is we can't know whether the requested > > pwrseq instance will be registered or not, the kernel configuration > > for this pwrseq library may not be chosen at all. > > In such case it is still correct to return -EPROBE_DEFER, because the > driver that tries to probe its device will fail unless it can run the > needed pwrseq. Right? > Unlike the MMC design, there is no dts entry to indicate whether this device needs pwrseq or not at this design, it will only carry out power on sequence after matching. So, return -EPROBE_DEFER may not work since this device may never need pwrseq. > > > >> > >> > > >> >> Moreover, I have found yet another severe problem but reviewing the code: > >> >> In the struct pwrseq, you have a "bool used", which you are setting to > >> >> "true" once the pwrseq has been hooked up with the device, when a > >> >> driver calls of_pwrseq_on(). Setting that variable to true, will also > >> >> prevent another driver from using the same instance of the pwrseq for > >> >> its device. So, to cope with multiple users, you register a new > >> >> instance of the same pwrseq library that got hooked up, once the > >> >> ->get() callback is about to complete. > >> >> > >> >> The problem the occurs, when there is another driver calling > >> >> of_pwrseq_on() in between, meaning that the new instance has not yet > >> >> been registered. This will simply fail, won't it? > >> > > >> > Yes, you are right, thanks for pointing that, I will add mutex_lock for > >> > of_pwrseq_on. > >> > >> Another option is to entirely skip to two step approach. > >> > >> In other words, make the library to cope with multiple users via the > >> same registered library instance. > >> > > > > No, the pwrseq instance stores dtb information (clock, gpio, etc), it > > needs to be per device. > > I think you misunderstood my suggestion here. Of course you need to > allocate one pwrseq data per device. > > However, my point is that you shouldn't need more than one instance of > the library functions to be registered in the list of available pwrseq > libraries. > This additional instance is used to store compatible information for this pwrseq library, it is used for the next matching between device and pwrseq library, it just likes we need the first pwrseq instance registered at boot stage. -- Best Regards, Peter Chen