Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753850AbdFSJDm (ORCPT ); Mon, 19 Jun 2017 05:03:42 -0400 Received: from mail-sn1nam01on0049.outbound.protection.outlook.com ([104.47.32.49]:5776 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753803AbdFSJDf (ORCPT ); Mon, 19 Jun 2017 05:03:35 -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: Mon, 19 Jun 2017 17:02:59 +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: <20170619090259.GA23731@b29397-desktop> References: <1497319166-17287-3-git-send-email-peter.chen@nxp.com> <20170614015338.GA4635@b29397-desktop> <20170615065854.GA24157@b29397-desktop> <20170615091131.GB24157@b29397-desktop> <20170615100604.GC24157@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: 131423366125317696;(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)(39860400002)(39840400002)(39380400002)(39410400002)(39850400002)(39400400002)(2980300002)(24454002)(199003)(189002)(9170700003)(46406003)(83322999)(105596002)(55016002)(7406005)(38730400002)(1076002)(93886004)(106466001)(104016004)(4326008)(54356999)(33716001)(23726003)(76176999)(39060400002)(53546009)(76482006)(356003)(87572001)(110136004)(50466002)(86362001)(2906002)(9686003)(4001350100001)(8656002)(83506001)(73972006)(53936002)(229853002)(7416002)(6246003)(81156014)(81166006)(8936002)(81442002)(73392002)(498600001)(305945005)(47776003)(5660300001)(33656002)(97756001)(6916009)(2950100002)(8676002)(82202002)(189998001)(54906002)(50986999)(77096006)(6260500002)(6666003)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0605;H:tx30smr01.am.freescale.net;FPR:;SPF:SoftFail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD015;1:piYpCbUsHxaIWPF3txLJQTU/E90Pf4f/rUkGkkhoJSkl8OUZjMYj89ujy9RgrB4r4NhN0kyBBBztz7/H0snt+WW9CCbg7IUl5/V1UyddAfNslM6S6YifrqjJIGaUHWKGieXx/VRQx0OPa5q65XvSYYpF9l8eujHkJdClMm/vFaJ9mcFZq7iTxNHvgB581Yb8YaOXldkeiRyVG+FwswpqNgTmdnzJ6ZWN9aM5zJTBW9hGk4bf2ymzFz1+9Q0rQ82FzYOuRe0oo+XNYzKRRgnjju9rk0EL0BKGYKwYOrbN+meFnnbvQ/rAoo5r3JLUrvYyonp+Bpfz/a6gN5T8CdN02W3YKm217NdGyJ+64hE6rPwt3/d4QLUYwl4pgqgwcTAi73c/g7OCieMSszpLb0hRpsBSQZN8ZUCQYphZj4BKBmGcklCd+P0fMptZbrhLpfG9LaYqVLvkRWj4nVGCm67sl5wzxhuvsJh6dMRWTrK/B3UFHHYYQf9Eej+vtwt+yDi1dmn/gKVoUeLKEtdmeZ9OwjEH8C7JXSx8RynA+rMgnUm13/LifuhvoIkeU/tMGwKJHKw4kPJbvZBLXBqu2rm0/74EEVFgXxEvI30YB85wmJU= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 799f5cdb-839c-4e7a-8cdf-08d4b6f20f8a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:DM2PR0301MB0605; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0605;3:eRgqy8HFpbJ0fRtoD9Io67q2aWSdTipDqzKEHPR32aXBGzZYhDy1NOf4EXab6esQvFw4ba5JH/MFuzoDurouB9ZVyMykWnWdyzyd00rzmflY/hzrwt4yqbtaPWyjaPxWOG72fpqkPTk/k8u5SCyeCYL9jlpqoGai59E890Cs14WTHup33c5h1Jrodm4EHSsPBXnMoY7u4guz1E9HV5qb3YH4qJuyEQnuWo/D3bGdFWw0gLWPDV1S8aHcucPdH3P/5NXt2xAps82cHYXLo2SLsnKttbk3vMOAdHoEWoAdqR+odjhbiBDzqbC+BMuGHPrSq8kwQC09chGCfBS3NA9rvbkX6bmOWA++INS7Dt2BKoroOV7n1nFHNwLs/9TkJjUc0eU0hXw72locYkD6DA98L65tDXeFhdKFrvwQNFiPy+dWQ3XJK0bjA14yW8LPbWaA;25:57OCYIicHdCdIZtXas7ypNyK0lmLtFDn1CfzcYWTM3qSjAQEIG8qOO7E+SgRiG0uKkBiq9USxryutQBmI50h1SQwI5sKX0NR2pIMGXi8qtv3Ud17L0sVldQy01GExEeXDedh/3QS6ItGAgv9qhGjvTT1gpdAPSEv17bDbYGOpfss930MrhIfP1QS3fzpX1krD8abT1nqhjTRwQB1IHVF3sKRT9g6TU4uqRHzMUa2Kl4w0MCp5h8OsW/MSbD9NkVrBly3wv4yubNo4Hq6T4NMvdiWaUv6CPmu5Y3a2jWM6QnIiOOs8D/VgKR7MZpPTG2T5FJpqwW061x6/vRaqVJueyUcE2eBpEQ3fytcn227u/xjAAOvggHN1tjSqn8ENeTvQZ5dxzOXjygkMRZgMgG50llqZrHuhIFbhAtrgC2TeuQ6xx2yUnwwnd50p3MNSjtAEwPwxKGGDGHw5rM8z7rtMYppo3nnrSEvu0Lq8EN5DeU= X-MS-TrafficTypeDiagnostic: DM2PR0301MB0605: X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0605;31:uO8fE3PF4ZbreRn/wlJomZEjPiy5EmiwKeInMq2lhB3qeIOBB6zqsEy1fQlAdQl/SWqSWQ4ScHfhPcB4RwAuk38hA7cu6C97ig2Km/4gNRJji0GpqkOgmOg2if+DJy6pNenFxKEfeiL4IdRxJACJk47mZy2fb6+eJzMoopVYQBCylCOv2wFGkYCuJCTuwh83sB4x75/0WHhGyPq2fI/4h4kaeLwb85OETfFJ6v/YIbOHvog8vDngmdqw4UNzFluXkdHk+TZyQ0u2Ccj6nJ6idA== 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)(8121501046)(5005006)(13016025)(13018025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123561025)(20161123565025)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR0301MB0605;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR0301MB0605; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0605;4:VkMU0HBnmMw8UBWXT/lCrJoUnav+Mio/HSWSUaEv?= =?us-ascii?Q?4BKhBFGlzR8nRiu4DIiKBZQn0eBjt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7SIchrNlOQMpaMpBWrMSDuzV/tRUsMDk/yuhnYNF958br56FB5r04?= =?us-ascii?Q?83w81R6eQBlfMzTuVk/HxaWlfM0wchC9nDlsK92SITSUP6It7c28tiCnWMbx?= =?us-ascii?Q?XvcQCncJg0FUhejvaqX1DEL6d4ax83DCYZBWoeW7E7HWWHCD07zK/qu7c8RN?= =?us-ascii?Q?Y9dy23qFRkSdjqweu9kUqP59S4t8wgXSLydDXZYpxebPA7ceZ0Zk72uMYyce?= =?us-ascii?Q?Os9hqczs3qaVTyquyA4XEmerz/5dX1LcruS66TFm3UPiWsbgJftqCmthuA?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0343AC1D30 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0605;23:cRyBOVKRyTVYFHVTvDsB/5muIFo4h6mMBm2zwrG?= =?us-ascii?Q?NDsbxqVfHRg0oGrtMVCq4QESTQRgeY8/TZ+Q2DC6Fq1HHlMkVQRlkaeZeGb8?= =?us-ascii?Q?dqP+IMkOP8GVATHo2YUaOyJT53dVlM2w4HtxFWCCOF1btaBrJG3HyGV31E4X?= =?us-ascii?Q?Rxu0AnTe5RVZcGMreQptJDpKv23SfsxoWcWScwdXwmLHvRPcqG/fmYCvHtUJ?= =?us-ascii?Q?sbLUdDLO2P3H5h3x+GdiLnUtYNZ2TSJsWriYWaVeE8a+tML8GxM6GQOQD90f?= =?us-ascii?Q?KLn4LUeE0epMx9jBvWUjLBXXfFZmE+sRVk6iyjXYmqLvhN41vPMj7OkFVCcw?= =?us-ascii?Q?yHlrF//LDxJtd+eGInaQN/6jSL8ACBJLh5hEAR9fMFM7YE1Gfnk7svtWbXHM?= =?us-ascii?Q?/KBlwzsRWTzw9RxwDf9Pha0vdSNEphYIyaIT+58qAH0dfoEqtEhMmao1JnlL?= =?us-ascii?Q?VWJEMbxTA0tpI1S2eHAG3WND4Q0KnJUF0NaCL9JBLoOSSGiGUMIv5wMjzCf/?= =?us-ascii?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P4dwuxJhLky0duJf4tHA==;24:AKz10/u2S6fZ6oRvVKCfHjtTYTdl2idO0kUtj1HdkuEtcLK8LZF75LJpgI6lW0vgLDroAEllgCmU34BmAYYi72OFLtasMYWDGB5t/lAGGLE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0605;7:Cr7vLxUMVU7ewST7TspinTk1A8Wm0TToMSQpXK6cPiBT5hC8CKnkZ8thMkPLZbtFyJiTvlhzta3OpRn7snl8jhtJBG/wcISjmkanzbZ1gDbfHg2G0hh0EB68O4h3HTaNGnQAEs+o/WoMYDegt1tA7zQ5nYWTIfIPnBckH9bqCoxzPoPmHalWSEinlKBd7H4CNvuAJnYA1io2NkgSHTHJsunf4nodCQ2NnfPZw6H6ZYme5GIsZGpuSvypoZ5CMufn7JZdF9AtJ7fc/4RgaMZE/Pnzq4wa8AiuZUKb8UJM12lG1Wbd12UDO+NYMK0CS6+/R9K82mw3Z5TRe5sulBgO18b4ksFYlP2wlOBXqYzQYgKJkDPaZSukQZ1ZwGpxO4ktsnRYENA55fAs8Hi/fX5FE6SyTTxOuz1VqeQKPiDwoKtq0Ul8VYnojFhOUwyIc2eBvStC8twhbOzDlyfMmJGqlT6qxlFObw5nM2uUU4n14ILvr6ey4u+RxiiplXuwrt0K/f9kC1WgEQd22FwpnAE5aBlaqeHkptYlS7Y+2+fU5mA7V0mQDtqqRvYtp5mftVkO/rVrcTcTFs6/1imL2ClnRP7ft0mvAX5AvhWLjevD+2bHok0G2ouvOGOIc+5ALdV1/6WonDFwMtBNE9lP3G/8lJoeQzn1xgpprfmCha14F0bFlDgM1bDBC4hl6Z28XrS0WxYK+gIWt5KjUNz6MhZH12Dr8c4G8RycGFXwvAsOHcYqHnrx7iF1ylMuPWK/LTiC5p9POEET/Oexw8SP7pNyjZli1629sH6uxi/6wUbCbx8= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 09:03:32.0325 (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: DM2PR0301MB0605 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5851 Lines: 133 On Mon, Jun 19, 2017 at 10:09:58AM +0200, Ulf Hansson wrote: > On 15 June 2017 at 12:06, Peter Chen wrote: > > 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. > > Then, how will you really be able to fetch the correct pwrseq library > instance for the device node? > > Suppose their is a *list* of pwrseq library instances available. In > pwrseq_find_available_instance() you call of_match_node(table, np). > The "table" there corresponds to the compatible for the pwrseq library > and the np is the device node provided by the caller of > of_pwrseq_on(). > > Why is this match done? The compatible in table is from the source code, and the compatible in np is from the dts. This is the current match way, I comment your suggestion below. > > Why can't the match be done before trying to fetch a library instance How? If there is no pwrseq instance, how can we do match? > and then in a second step, really try to fetch the instance? If only > the second step fails, returning -EPROBE_DEFER can be done, no? > > BTW, I didn't compatible for the generic pwrseq library being > documented in this series. > > > > >> > > >> >> > >> >> > > >> >> >> 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. > > Why can't the compatible information be a static table, known by the > pwrseq core library? > > Then when of_pwrseq_on() is called, that static table is parsed and > matched, then a corresponding pwrseq library instance tries to be > fetched. > So, you suggest allocating and registering pwrseq instance on the demand? Eg, we maintain a power sequence static table, including compatible and allocate function. static const struct pwrseq_match_table pwrseq_match_table_list[] = { { PWRSEQ_DEV(0x0204, 0x6025), .alloc_instance = pwrseq_AA_alloc_instance }, { PWRSEQ_DEV(0x0204, 0x6026), .alloc_instance = pwrseq_BB_alloc_instance }, { PWRSEQ_DEV(0xffff, 0xffff), .alloc_instance = pwrseq_generic_alloc_instance }, }; And pwrseq_AA{BB}_alloc_instance are defined at each pwrseq library, and are exported. Since the pwrseq_match_table_list is static, we can always do match, and will not return -EPROBE_DEFER anymore, one problem for this is we need always compile all pwrseq libraries. Any good suggestions? -- Best Regards, Peter Chen