From: Torsten Duwe <duwe@lst.de>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] regulator: Defer init completion for a while after late_initcall
Date: Sat, 30 Nov 2019 16:27:00 +0100 [thread overview]
Message-ID: <20191130152700.GA14121@lst.de> (raw)
In-Reply-To: <20191118202949.GD43585@sirena.org.uk>
On Mon, Nov 18, 2019 at 08:29:49PM +0000, Mark Brown wrote:
> On Mon, Nov 18, 2019 at 08:40:12PM +0100, Torsten Duwe wrote:
>
> > kernel: anx6345 0-0038: 0-0038 supply dvdd12-supply not found, using dummy regulator
> > kernel: anx6345 0-0038: 0-0038 supply dvdd25-supply not found, using dummy regulator
>
> > DT has:
> > dvdd25-supply = <®_dldo2>;
> > dvdd12-supply = <®_dldo3>;
Note these 4 lines...
> > It's only that the regulator driver module has not fully loaded at that point.
>
> We substitute in the dummy regulator in regulator_get() if
> regulator_dev_lookup() returns -ENODEV and a few other conditions are
> satisfied. When lookup up via DT regulator_dev_lookup() will use
> of_find_regulator_by_node() to look up the regulator, if that lookup
> fails it returns -EPROBE_DEFER. Until we get to of_find_regulator_by_node()
> we're just looking to see if nodes exist, not to see if anything is
> registered. What mechanism do you see causing issues? If there's
> something going wrong here it's in that area.
First of all: thanks a lot! This has put me onto the right track.
> As far as I can tell whatever is going on with your system it's only
> ever been working through luck.
Yes indeed. It turned out the regulators were still on from U-Boot
and that code never worked.
> Without any specific references to
> what's going on in the system it's hard to tell what might be happening,
Well, actually the 4 lines above give a good hint :) of_get_regulator()
will look for "dvdd25-supply-supply". I'm fairly relieved that even you
didn't spot this right away. The fix just went to dri-devel, you're Cc'ed.
Unfortunately the documentation for this is buried in the git commit log.
For the record: I'm still convinced that the original change can uncover
bugs unexpectedly, and is not suited for -stable.
Thanks for the help, and sorry for the non-standard nomenclature.
Torsten
next prev parent reply other threads:[~2019-11-30 15:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190904124250.25844-1-broonie@kernel.org>
2019-09-04 17:53 ` Applied "regulator: Defer init completion for a while after late_initcall" to the regulator tree Mark Brown
2019-11-16 12:52 ` [PATCH] regulator: Defer init completion for a while after late_initcall Torsten Duwe
2019-11-18 12:46 ` Mark Brown
2019-11-18 16:41 ` Torsten Duwe
2019-11-18 16:56 ` Mark Brown
2019-11-18 19:40 ` Torsten Duwe
2019-11-18 20:29 ` Mark Brown
2019-11-30 15:27 ` Torsten Duwe [this message]
2019-12-01 23:49 ` Mark Brown
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=20191130152700.GA14121@lst.de \
--to=duwe@lst.de \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).