Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbdFOG7i (ORCPT ); Thu, 15 Jun 2017 02:59:38 -0400 Received: from mail-cys01nam02on0080.outbound.protection.outlook.com ([104.47.37.80]:4986 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750791AbdFOG7d (ORCPT ); Thu, 15 Jun 2017 02:59:33 -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 14:58:54 +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: <20170615065854.GA24157@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> 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: 131419835677945512;(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)(39380400002)(39850400002)(39410400002)(39840400002)(39860400002)(39450400003)(39400400002)(2980300002)(24454002)(189002)(199003)(9170700003)(2906002)(97756001)(6916009)(105596002)(2950100002)(6666003)(356003)(53546009)(53936002)(106466001)(86362001)(1076002)(93886004)(6246003)(73972006)(33716001)(76482006)(81442002)(47776003)(46406003)(104016004)(5660300001)(23726003)(82202002)(38730400002)(50466002)(110136004)(498600001)(33656002)(76176999)(4326008)(81166006)(50986999)(229853002)(8676002)(54356999)(77096006)(87572001)(39060400002)(83506001)(54906002)(9686003)(7416002)(4001350100001)(189998001)(55016002)(73392002)(8656002)(83322999)(7406005)(6260500002)(305945005)(8936002)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0301MB1192;H:tx30smr01.am.freescale.net;FPR:;SPF:SoftFail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD029;1:KmIJkbE2a/NODScdvaSNKYUVgjCJZTO2pr1S0PdQE19Ynf5lneE7EAlhortkoQmtpSG6ZsVp1ABdVIN64MSeLyHJyfxvUNybQDozzbEwVI/AknI+V/0N1XuGUXOFsHHfZuAe+xVhwzZiiNzRBG6IjvJHDUpkNooh4EkVYdxGxwjaPXaE4ZfHKX4o8BzsLwg3hXwcDRloWaLXHn4bRXMBSYLHu39QTiQxtjmj7tFZSzO30xX3pv8Fm1IdHotyXtpocPXN9dISkZbQWIx306dKnHfnBBpVcQKwp05oWD+pi1Cw7Os0UqsHRKy9xU9TxjbtSFBVFVsLyOisxLtNBo1JOdzg+jl8InpV3PcyuTBKqscu0gKBDdQ6G1c+Aa8O1IKYyOAnyEw+EtnYuod1QJs72F+qfAkuJvusnzLDx/dJ0Kbh8GpnOEO+fB6G4PcauayL9ehXGgCy7YmJMT16+DmMU0JfCTGv0pn5SHQJ0qzgs16YNlbgpgl3b2YEgoPQHqeHyNFr+4LWOCsMR7R1sLi782+W6sx98NU9wlrNtRfc4Ojv6rhDJ972VXKFJagSqHAWC6TByZKL0j7kD8TPcPJENrUhQYn/a50UPD6OHghfdbE= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PR0301MB1192: X-MS-Office365-Filtering-Correlation-Id: fd4b539a-e613-46ef-2ea8-08d4b3bc107d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BY1PR0301MB1192; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1192;3:2SmCwtQes7ZyujtUzFMBE4KwuuUsIhnQ9dZohDz6dIyM1KMg+Ao/2cY3XMEHniu1q9x2+uqpq3qevVw3S2I1Yitc5u7V2qiNTRxstTTB8jf2TiOxIDytK9ciP1Amt1IF2p5yzN38zwEx635YpO2jiZzTISBX6HbBzG9zYcC2pQ/HafZP72b/DjNLybKUmdk5riv425WYZ3A6x5+YH9qcIDtXpfuZvi2U6CgUQ9Z+9csEqgTJv9egh4Ckc0MRO6TAsa4lIusFhets72QlpNsTwVWxd7gRmVlzfjdbwp+d7e7Irp93PzoTNyzZQpE4FLwQp43RLQm4aUfM1qnGp6rQMX8lBT6oaJ7Oo2xZ0Vtgj+jAc0YUYfwjN7KUvNP6z4aeKBoMZvK5VMuqaApdx68cxea9FXIoi4Q6mkvO8RgUq75Qth8uDMPNmeqHtHcKItpC;25:4EzLN0OEJ5/7qQMK/Iq//cO5d7quIOs5DzsVtkUTjwBqQoQQ3BBd1opjRO3cxAFSBTVSLSzilyyYiuEG72DWzqVaJlpYBno6O+Q2cQlS8Gmu52W3qMhtEzRQQM6RCB6jNHumJlr9QqBFJQ1PRtFwc88jKgR1Kenx/a3sGuEbFRRZYjn8qv5a5Rh1jDzf/eFF6itQSYXcCSh7YqwudDvC8u94PaUZGl+abAaZXFDx1VZOMlqbQxuu030Pan2RJFbUWB190PiKD04Yc4o3cA74don1T/SztvyB7Yct3N6s0/Z4cXcU8g5/0MjIKbDqyVgF8ftwQEFdh7kctNl844/8OcfmbCLf2ODfFoLOsBmGTXFI9qzvuhn0bm9uBX/f13umghuTdsJ5j2NwiWKOli/C2Kx4kbmDrK1nFcP0N6kPPdXZbRv+ix8BrKeC7EYxNFoUbJqazZsmmYDcfVKx9J3fWxpqx+tAQsk2VmAetyQp51s= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1192;31:4EhmINdN4G1yFCGUesOyQvp5YyignIsopfOIyJHWcHxl8Zz6ojTJOou5+TSx45ZgtMKP5DKLMtAGb4HNO55PE1i2AacHGgUda5zAf5LsWYUTWGkGfGR5zOydiW0Ee76q/E9cCAMz4qZDA4j2gq4QpufoVuqeRIAjPAwhWkrFuyT9rjjoajFiNlEmpAjOcw84uxovnis1KRO6UeLoc2yr2O+Da/hADQOwfEQJaOIITvgnIlXgj2WyTrLFoTf5VWtp4xR3bX/xhSjYJ7pdJMJoQA== 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)(13018025)(8121501046)(5005006)(13016025)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6096035)(20161123556025)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123559100)(20161123565025)(20161123563025)(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:17gx0d16c/UF105HmtZbmvTh1oWN3ocO8B99txx3?= =?us-ascii?Q?mtEoLPKxhNceymlKZhxYEXbhHtPbx6wzXyy5F6cjFCDc5r9CvuB/S6yoH6o1?= =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wdUEuyPJWiuLORL8?= =?us-ascii?Q?nt75BHXCKYHtIOI7BMY87NoxBualfwFoJVsKM7OmcyjKmMOu565b0C8Uy5lV?= =?us-ascii?Q?Vzr62v8gOam1cuLngdJkTdQL9oqBMrCQnX6wrxTQEEpd99NfXNMidEFA+x8q?= =?us-ascii?Q?mUo3cGh2nhOXIuRgYDdr8ecnEqENeHNhDldYryEsMV7War35YFqMmRMT7dwp?= =?us-ascii?Q?DpWdhm2MvSQCSJfjDsSYftpvRQT2u4Mxs4rS49rreOpPw+Kk1DaMZvikGA?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0339F89554 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB1192;23:7HKcrllyiRa6EUY90RCZ8MndfRUBhHKtRuLsLA1?= =?us-ascii?Q?BO0+4qffU6E8YcvIkrtV5yXB5NHiPJDpixhjc0odFPutKcadYl/fe6fZo85v?= =?us-ascii?Q?G8efkyUU4xRdTwmHEcyUSz3OJhDoPWtDRHW1JPJfga3eQkWaWpHzl3LgO4Kx?= =?us-ascii?Q?CVES9w92/SCU9uUfa/9xI9YukH+OFnxvV4hXeLeXgdjaVQygxGudCFVXe/TQ?= =?us-ascii?Q?xMzt/9n8HVLylL/eJBDqn2X7XBVaY8kgRiFI4PnyKTKWGRBLyK6r1iwfQ+Rs?= =?us-ascii?Q?E5eYdxsyk2sjkl6AEPmD45ayTkc/SgAO4lMdapm51oxwHoyiXvhtccHkpxUy?= =?us-ascii?Q?q+WArvu7SO66WOgBceZNQeF93/L0G2CjMhHVkdAyjBaTpGt0IQFPfosUupGX?= =?us-ascii?Q?MaRifw05+ipP1Vn5d8oVNmaFRTC6TlueeSywsakGnyLGvnAx438tUtBq/9fy?= =?us-ascii?Q?m67JXU1Lgi5x0EE9jcqva/MuXe5Mp5f7vce4w2fYE3A5YAUTIrOM9QGH/6nq?= =?us-ascii?Q?iDBgDzHn3JlpwyerXV+4VbmGpUWO8yhVyOOHS6VhfHQ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qJ2P7QoSgJjdt21mn0kUH47to6AbQYbCdEFa5PxhS7sPvleq36OYd?= =?us-ascii?Q?5RPv/kuc9jH826IT8T8CdVbsP5XDVDxY4Y10TN0Xm35Wn04KrUFyarquDpGr?= =?us-ascii?Q?KpkzKHFuzTaKb3Qj56c8ttWPz139rilVikU8mNfk7QDg3si/otBHLZuor9jo?= =?us-ascii?Q?CsW3ny+MW9PsRfjfXm8H/KLdQPtXm1dxWMh551XF4Xqc=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB1192;6:HwX0aFQ4aGSb2CYPjHfGudLIcA/5c9kz9vnb+dDi?= =?us-ascii?Q?4/rCq92Tpazug7yaGx6mZugmigUgWta3HlOLHoshr95lio/2cJH0UDEfl2x8?= =?us-ascii?Q?eU00XSn7jhvR+hfdtlSTAho4YvAypDPU51rK4EW1IUZvt4jjFhNsORIWnrss?= =?us-ascii?Q?v0iID94q8555ThZDnOSStn/SH5Eq3RyzUCmEYKXWr3eGXhalrvxmmH96iD81?= =?us-ascii?Q?G8nHwGLYoTfSyyQ3n+cTdHBr1obKsPc092kLzJ/BtJLKBgDyBm6bmWQU57VM?= =?us-ascii?Q?VbrCYEB4hn2vlBX0iGPxnLCzoiJTM0aAdWSvHU4DGQZNiKUJCbKRffeiwvEt?= =?us-ascii?Q?VGiiz8iNZgrq0YM9wYHz62+6EFfQ/VxjP3BsrhApmOJqq7Ky4SqNTqzn+eWP?= =?us-ascii?Q?EVBwoyqeGoTEoGeSPL5Z4WoOyhoC0l4m7ICDPQBQ/aTfWhTg4+e/LfnnYJ9Q?= =?us-ascii?Q?jOJof07CYMnwIQm2dFkpneIOrkZwCYRtpPHRgM2WilP81olf9CvRPQATPe5I?= =?us-ascii?Q?AAsBi3Vi26D5ayyOIrbBwbmt60VrSQ4V86iHHFYi66hJ6wGL642DUtw5aSII?= =?us-ascii?Q?NEpCYIlioM4ea0zO+awYf8dfRL3cX1Wm3MU7SrZMLHj+PUqx3D4GaN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So1cpjqSq3iBkvr+Hfa/pBH3pix4TjHMSr+C4ksbVHQgSOb7FXBEd22k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1192;7:5+yfyV+iDGctuFivpxwT4BiYQw/16Tw3OA9BiuY7rLKFZJtP1T7fYTTFP98Yno4jqB05A2n5qeHa+eAkQDrl4vbL3CzsHdoJUOxFZq88q7Z8mNunsqaxOed2ytCGBCFtu2OqwcWZOC6JaP/6dGkSyozqFex2h8CfJ4iwkBjuqz05KboK1R/RdEmP+AUVcpShFRroj1iSjAZ/SFGfciVysU+kZxZozgagkAyM2LotZpNv7NT/Y6yLIY0HTqxaDY1R9LDDtHjMoYety7w92WB+WNWBqE2dbJRgNAKPkaYMsvzQ7r1rasUFmRVFs//quNFLHJQ2mmacA98XRtbcUPuGKmu6cJoj44/p8H/ZnroAtzOC9RwNvh+bDx4NpADwOVZnU+XqADH74OV4H1CAQ3xo6n/0BDD/ZusNgomzxMtuunwweBcRx9VLo+l5Ako6gAyQajMVwwufRHiEMeE76zJzvtqp9hIPS+cJ+d1kfE9D27fqEyfY2icpwpHTWpRLGe59sbFd5gQyroGSE6L8qWEUnjKoXE0XaY1CBBK2ahnQ0ZUL/gvmUGpAcDW8bTkqXqvKJt0CPi0iU1i+iFAM9IZ3eWixDhAQXX6NVVdvxzBfQhtt9hjpu87hpTvCV+Zjp+Iuuc3CGaxm7qbTicxBokRyIrih1T/jN0yCOr+UJrSoVXppqMyDRC+NtPa9G3owjuMJ7Fn31TJr6OplVxzrmr3T/m6h9Y4yohJOTCVst45+d5GyYIZR+wYnJjjZGNbGfmKGDTWJzVJpduvzZOTPQHAi9nmq/x58PlWUxfLqcjU4YQM= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2017 06:59:27.4513 (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: 3329 Lines: 86 On Wed, Jun 14, 2017 at 10:53:29AM +0200, Ulf Hansson wrote: > On 14 June 2017 at 03:53, Peter Chen wrote: > > On Tue, Jun 13, 2017 at 12:24:42PM +0200, Ulf Hansson wrote: > >> [...] > >> > >> > + > >> > +/** > >> > + * of_pwrseq_on - Carry out power sequence on for device node > >> > + * > >> > + * @np: the device node would like to power on > >> > + * > >> > + * Carry out a single device power on. If multiple devices > >> > + * need to be handled, use of_pwrseq_on_list() instead. > >> > + * > >> > + * Return a pointer to the power sequence instance on success, > >> > + * or an error code otherwise. > >> > + */ > >> > +struct pwrseq *of_pwrseq_on(struct device_node *np) > >> > +{ > >> > + struct pwrseq *pwrseq; > >> > + int ret; > >> > + > >> > + pwrseq = pwrseq_find_available_instance(np); > >> > + if (!pwrseq) > >> > + return ERR_PTR(-ENOENT); > >> > >> In case the pwrseq instance hasn't been registered yet, then there is > >> no way to deal with -EPROBE_DEFER properly here. > >> > >> I haven't been following the discussions in-depth during all > >> iterations, so perhaps you have already discussed why doing it like > >> this. > > > > Yes, it has been discussed. In order to compare with compatible string > > at dts, we need to have one registered pwrseq instance for each > > pwrseq library, this pre-registered one is allocated using > > postcore_initcall, and the new (eg, second) instance is registered > > after pwrseq_get has succeeded. > > I understand you need one compatible per pwrseq library, but how does > that have anything to do with -EPROBE_DEFER? > > My point is that, if a driver calls of_pwrseq_on() (which calls > pwrseq_find_available_instance()), but the corresponding pwrseq > library and instance has not yet been registered for that device. Then > how will you handle -EPROBE_DEFER? I guess you simply can't, which is > why *all* pwrseq libraries needs to be registered in early boot phase, > like at postcore_initcall(). Right? > > If that is the case, I really don't like it. > 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. > 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. > > Sorry for jumping in late, however to me it seems like there is still > some pieces missing to make this work. > > [...] > > Kind regards > Uffe -- Best Regards, Peter Chen