[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150305003004.GZ21293@sirena.org.uk>
Date: Thu, 5 Mar 2015 00:30:04 +0000
From: Mark Brown <broonie@...nel.org>
To: Stephen Boyd <sboyd@...eaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@...ymobile.com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Rutland <mark.rutland@....com>,
Pawel Moll <pawel.moll@....com>,
Rob Herring <robh+dt@...nel.org>,
Andy Gross <agross@...eaurora.org>,
Chanwoo Choi <cw00.choi@...sung.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 4/4] regulator: qcom: Rework to single platform device
On Wed, Mar 04, 2015 at 11:35:43AM -0800, Stephen Boyd wrote:
> There's another problem with this of_parse_cb design. The regulator
> framework requires supplies to be registered before consumers of the
> supplies are registered. So when we register L23 we need to make sure
> it's supply is already registered (S8 for example). If we used
> of_regulator_match() we could sort the array by hand so that we always
> register the supplies first. Or we could modify the regulator framework
> to have a concept of "orphaned" supplies like the clock framework has so
> that when a regulator is registered it waits until its supply is registered.
Dependency resolution isn't anything new, I'm not sure why you think
this is related to of_parse_cb()? Open coding does exactly the same
thing and the ability to have device specific properties on is not
obviously related to dependency resolution so perhaps I'm
misunderstanding what you're talking about...
If you *are* talking about dependency resolution then just bulk
registering the regulators (which we should be doing anyway) and then
iterating the array until we stop making progress should do the trick
for most cases, normally there's only one PMIC in play, or have people
who care do a single struct device per regulator and then let the probe
deferral stuff sort it out.
I'm a bit nervous of the idea of having orphaning without core support,
it's not just inter regulator dependencies we need to worry about (they
use GPIOs and so on) and there's concerns about debuggability but it is
the kind of thing probe deferral was meant to be a cheap implementation
of. There was a proposal quite recently from someone at Samsung Poland
to do something more coreish and basically split registrations in two,
one half registering the things needed for each resource and then a
second half which runs once the required resources are registered.
Pushing that along might be best, it's a more general approach. The
component stuff Russell did has some similarities here.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists