All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Thierry Reding <thierry.reding@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Jon Hunter <jonathanh@nvidia.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [PATCH 1/5] regulator: core: Resolve supply earlier
Date: Mon, 11 Apr 2016 09:45:12 -0400	[thread overview]
Message-ID: <570BAA68.2000701@osg.samsung.com> (raw)
In-Reply-To: <20160411130914.GA16994@ulmo.ba.sec>

[adding Bjorn Andersson to cc list]

Hello,

On 04/11/2016 09:09 AM, Thierry Reding wrote:
> On Mon, Apr 11, 2016 at 01:58:14PM +0100, Mark Brown wrote:
>> On Mon, Apr 11, 2016 at 01:46:12PM +0200, Thierry Reding wrote:
>>> On Mon, Apr 11, 2016 at 11:59:02AM +0100, Jon Hunter wrote:
>>
>>>> Also, if we add this call, then I am wondering if we still need ...
>>>>
>>>> 	class_for_each_device(&regulator_class, NULL, NULL,
>>>> 			      regulator_register_resolve_supply);
>>
>>> Possibly not. That line was introduced to hook up existing orphan
>>> regulators with their parents when they were registered, but I guess
>>> since we now always defer probe if a parent isn't registered yet the
>>> line would become a no-op.
>>
>> That then takes us right the way back to the original problem where
>> people we're getting upset at the number of probe deferrals they were
>> seeing and more importantly we didn't have any way of sorting out
>> dependencies within a single PMIC if the parents weren't registered
>> before their children.
> 
> Isn't that usually solved by making each regulator of a PMIC a separate
> device (platform device, typically, for MFD devices? That way each of
> them is probed separately allowing the dependency cycle to be broken.
>

IIRC the problem was that in some systems 2 PMICs can have circular
dependencies. That is, PMIC A can have as input supply a regulator
from PMIC B and PMIC B can have as input supply a regulator from A.

So the parent supply resolution was moved from regulator_register to
regulator_get in commit 6261b06de565 ("regulator: Defer lookup of
supply to regulator_get").

That way, regulators could be registered out of order and the supply
looked up only on get. The side effect of that change was that only
regulators that are get will resolve their parent supplies and that
is why commit 5e3ca2b349b1 ("regulator: Try to resolve regulators
supplies on registration") was needed for regulators that don't have
a client driver that looks them up (usually the always-on ones).

The latter commit tries to resolve the parent supply on registration
but it's only enforced on get to allow out or order registration of
parent supplies.

Now $SUBJECT will break the use case for Bjorn's commit AFAIU.

> Thierry
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

  reply	other threads:[~2016-04-11 13:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 14:22 [PATCH 1/5] regulator: core: Resolve supply earlier Thierry Reding
2016-04-07 14:22 ` [PATCH 2/5] regulator: core: Use parent voltage from the supply when bypassed Thierry Reding
2016-04-12  6:31   ` Applied "regulator: core: Use parent voltage from the supply when bypassed" to the regulator tree Mark Brown
2016-04-07 14:22 ` [PATCH 3/5] regulator: helpers: Ensure bypass register field matches ON value Thierry Reding
2016-04-22 10:49   ` Applied "regulator: helpers: Ensure bypass register field matches ON value" to the regulator tree Mark Brown
2016-04-07 14:22 ` [PATCH 4/5] regulator: as3722: Add bypass support for LDO6 Thierry Reding
2016-04-11 16:15   ` Applied "regulator: as3722: Add bypass support for LDO6" to the regulator tree Mark Brown
2016-04-07 14:22 ` [PATCH 5/5] regulator: as3722: Constify regulator ops Thierry Reding
2016-04-11 16:15   ` Applied "regulator: as3722: Constify regulator ops" to the regulator tree Mark Brown
2016-04-11 10:59 ` [PATCH 1/5] regulator: core: Resolve supply earlier Jon Hunter
2016-04-11 11:46   ` Thierry Reding
2016-04-11 12:19     ` Jon Hunter
2016-04-11 12:49       ` Mark Brown
2016-04-11 14:03       ` Javier Martinez Canillas
2016-04-11 12:58     ` Mark Brown
2016-04-11 13:09       ` Thierry Reding
2016-04-11 13:45         ` Javier Martinez Canillas [this message]
2016-04-11 13:57           ` Mark Brown
2016-04-11 14:07             ` Thierry Reding
2016-04-11 14:32               ` Mark Brown
2016-04-11 14:49                 ` Thierry Reding
2016-04-11 15:50                   ` Mark Brown
2016-04-11 13:56         ` Mark Brown
2016-04-11 14:03 ` Mark Brown
2016-04-11 14:11   ` Thierry Reding
2016-04-11 14:16     ` Mark Brown
2016-04-19 10:16       ` Jon Hunter
2016-04-19 11:03         ` Thierry Reding
2016-04-19 15:40         ` Mark Brown
2016-04-19 16:09           ` Jon Hunter
2016-04-20 15:21             ` Mark Brown
2016-04-21 15:34               ` Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570BAA68.2000701@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.