mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Andi Shyti <andi.shyti@samsung.com>,
	Mark Brown <broonie@kernel.org>,
	Shuah Khan <shuahkh@osg.samsung.com>,
	Inki Dae <inki.dae@samsung.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] regulator: core: Resolve supplies before disabling unused regulators
Date: Thu, 16 Feb 2017 14:24:54 -0300	[thread overview]
Message-ID: <66ae2ae3-7fac-76f2-6897-3b0a9dc46111@osg.samsung.com> (raw)
In-Reply-To: <20170216170629.19927-1-javier@osg.samsung.com>

Hello,

On 02/16/2017 02:06 PM, Javier Martinez Canillas wrote:
> After commit 66d228a2bf03 ("regulator: core: Don't use regulators as
> supplies until the parent is bound"), input supplies aren't resolved
> if the input supplies parent device has not been bound. This prevent
> regulators to hold an invalid reference if its supply parent device
> driver probe is deferred.
> 
> But this causes issues on some boards where a PMIC's regulator use as
> input supply a regulator from another PMIC whose driver is registered
> after the driver for the former.
> 
> In this case the regulators for the first PMIC will fail to resolve
> input supplies on regulators registration (since the other PMIC wasn't
> probed yet). And when the core attempts to resolve again latter when
> the other PMIC registers its own regulators, it will fail again since
> the parent device isn't bound yet.
> 
> This will cause some parent supplies to never be resolved and wrongly
> be disabled on boot due taking them as unused.
> 
> To solve this problem don't attempt to resolve the pending regulators
> input supplies on regulator registration, but instead do it just once
> before disabling the unused regulators.
> 
> This also makes the regulator resolve logic more efficient since there
> is no need to attempt to resolve the input supplies on each regulator
> registration, and doing it once before disabling the unused is enough.
> 

I just noticed that this last paragraph is not true. Removing the input
supply resolve logic from regulator_registration() may cause issues for
modules, since these will register regulators after late_initcall().

So I'll post a v2 leaving this part. Sorry for the noise.

> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 

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

      reply	other threads:[~2017-02-16 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 17:06 Javier Martinez Canillas
2017-02-16 17:24 ` Javier Martinez Canillas [this message]

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=66ae2ae3-7fac-76f2-6897-3b0a9dc46111@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=andi.shyti@samsung.com \
    --cc=broonie@kernel.org \
    --cc=inki.dae@samsung.com \
    --cc=jonathanh@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=shuahkh@osg.samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®