From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755493AbcCUMpI (ORCPT ); Mon, 21 Mar 2016 08:45:08 -0400 Received: from lists.s-osg.org ([54.187.51.154]:55079 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754479AbcCUMpF (ORCPT ); Mon, 21 Mar 2016 08:45:05 -0400 Subject: Re: [PATCH] regulator: Lookup unresolved parent supplies before regulators cleanup To: Mark Brown References: <1458527986-4576-1-git-send-email-javier@osg.samsung.com> <20160321111100.GN2566@sirena.org.uk> <56EFE583.6000807@osg.samsung.com> <20160321123752.GR2566@sirena.org.uk> Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Liam Girdwood , Bjorn Andersson From: Javier Martinez Canillas Message-ID: <56EFECC7.9030709@osg.samsung.com> Date: Mon, 21 Mar 2016 09:44:55 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160321123752.GR2566@sirena.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mark, On 03/21/2016 09:37 AM, Mark Brown wrote: > On Mon, Mar 21, 2016 at 09:13:55AM -0300, Javier Martinez Canillas wrote: >> On 03/21/2016 08:11 AM, Mark Brown wrote: >>> On Sun, Mar 20, 2016 at 11:39:46PM -0300, Javier Martinez Canillas wrote: > >>>> This patch makes the unresolved parent supplies to be looked up before the >>>> regulators late cleanup, so those with a child marked as always on will be >>>> enabled regardless if a driver attempted to get the child regulator or not. > >>> This doesn't make much sense to me as a fix - it feels like we're doing >>> a fragile hack. Surely it's better to do this as we register the >>> devices, that way we're also protected against any similar issues with > >> Sorry, not sure if I understood correctly. You mean to do it when the >> drivers register the regulators, so at regulator_register() ? > >> That's basically what was done before Bjorn's patch but that doesn't >> handle the case of out of order registration when having circular >> dependencies between regulators. > > We used to look for the parent at registration time, we didn't look for > the children. What you're trying to do here is look for the children; > we can do that at registration time. > Oh, now I understand what you meant. I thought you said to lookup the parents at registration time, not the childrens. Great, I'll take a look and give a try to your suggestion. Thanks a lot for your help. Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America