From: Tony Lindgren <tony@atomide.com>
To: Maciej Purski <m.purski@samsung.com>
Cc: Mark Brown <broonie@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
linux-omap@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: Regulator regression in next-20180305
Date: Wed, 7 Mar 2018 07:17:06 -0800 [thread overview]
Message-ID: <20180307151706.GG5799@atomide.com> (raw)
In-Reply-To: <339dfd3e-5c5d-1e91-8890-5bfb69049d12@samsung.com>
* Maciej Purski <m.purski@samsung.com> [180307 14:38]:
>
> On 03/07/2018 03:10 PM, Mark Brown wrote:
> > On Wed, Mar 07, 2018 at 01:57:12PM +0100, Maciej Purski wrote:
> >
> > > I'm trying to figure out what is so special about these boards. The only
> > > strange thing, that I haven't noticed at first, is that all regulators share
> > > a common supply - dummy regulator. It is defined in anatop_regulator.c.
> >
> > No, that's a regulator framework thing - the regulator framework will
> > use the dummy regulator as a supply when there's nothing described in
> > the DT so long as the client doesn't explicitly tell it that the supply
> > might be optional.
> >
>
> Ok, thanks for explanation. I think I have found a possibly dangerous
> scenario, but I can't see this situation possible in Fabio's case.
>
> Assume, that we have a chain of supplies, consisting of at least 3. Say: A->B->C.
>
> When we're setting voltage on A, we lock it, call balance_voltage(), lock
> suppliers and call set_voltage_rdev(). So we have regulators A, B, C locked.
> Then set_voltage_rdev() is trying to set voltage of its supply by calling
> set_voltage_unlocked().
>
> Now we're on the regulator B. Set_voltage_unlocked() calls
> balance_voltage(), which again locks its supplies, if they exist. B's supply
> is C, so we end up with having a deadlock on regulator C.
>
> Tony and Fabio, do you find this scenario possible on your boards?
For mmc0 at least typically the supply is on the PMIC for omap
variants and it's controlled over i2c or spi bus like most other
regulators. Then boards some have additional GPIO controlled
regulators. So yeah some kind of locking issue between two or
more regulators on i2c or spi bus could be the reason.
Regards,
Tony
prev parent reply other threads:[~2018-03-07 15:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 23:12 Regulator regression in next-20180305 Tony Lindgren
2018-03-05 23:22 ` Fabio Estevam
2018-03-06 16:30 ` Mark Brown
2018-03-06 16:56 ` Fabio Estevam
2018-03-06 17:18 ` Tony Lindgren
2018-03-06 19:12 ` Mark Brown
2018-03-06 20:06 ` Fabio Estevam
2018-03-06 21:33 ` Mark Brown
2018-03-06 22:10 ` Fabio Estevam
2018-03-07 14:45 ` Mark Brown
2018-03-07 12:57 ` Maciej Purski
2018-03-07 14:10 ` Mark Brown
2018-03-07 14:37 ` Maciej Purski
2018-03-07 15:17 ` Tony Lindgren [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=20180307151706.GG5799@atomide.com \
--to=tony@atomide.com \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=m.purski@samsung.com \
--cc=m.szyprowski@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