From: Dmitry Osipenko <digetx@gmail.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Mark Brown <broonie@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
Lucas Stach <l.stach@pengutronix.de>,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-samsung-soc@vger.kernel.org,
Viresh Kumar <viresh.kumar@linaro.org>,
Kamil Konieczny <k.konieczny@samsung.com>
Subject: Re: [PATCH] regulator: core: Skip balancing of the enabled regulators in regulator_enable()
Date: Tue, 8 Oct 2019 18:02:36 +0300 [thread overview]
Message-ID: <be8d3280-9855-ed18-b2ab-d7fb28d80b82@gmail.com> (raw)
Message-ID: <20191008150236.KdN2f25LLkHLmbVyvU2wfcYAPmzFdMLFQOUKEoZpP88@z> (raw)
In-Reply-To: <86b9b4b5-cca5-9052-7c87-c5679dfffff4@samsung.com>
08.10.2019 16:24, Bartlomiej Zolnierkiewicz пишет:
>
> On 10/8/19 2:47 PM, Mark Brown wrote:
>> On Tue, Oct 08, 2019 at 02:38:55PM +0200, Marek Szyprowski wrote:
>>
>>> Then if I get it right, the issue is caused by the commit 7f93ff73f7c8
>>> ("opp: core: add regulators enable and disable"). I've checked and
>>> indeed reverting it fixes Peach Pi to boot properly.
Yes, please note that the "ww_mutex" patch didn't change the original logic and only
rearranged the code a tad.
The question is if
>>> this is desired behavior or not?
>>
>> That doesn't seem ideal - either it's redundant for regulators that need
>> to be marked as always-on anyway or it's going to force the regulators
>> on when a device could do runtime PM (eg, if the same code can run on
>> something like a GPU which can be turned off while the screen is off or
>> is displaying a static image).
>
> Commit 7f93ff73f7c8 ("opp: core: add regulators enable and disable")
> currently can be safely reverted as all affected users use always-on
> regulators. However IMHO it should be possible to enable always-on
> regulator without side-effects.
>
> When it comes to setting regulator constraints before doing enable
> operation, it also seems to be possible solution but would require
> splitting regulator_set_voltage() operation on two functions:
>
> - one for setting constraints (before regulator_enable() operation)
>
> - the other one actually setting voltage (after enable operation)
>
> Unfortunately this is much bigger task and doesn't seem to be -rc
> time material so I'm in favor of just applying Marek's fix as it is
> for now.
That OPP patch caused the same problem for the NVIDIA Tegra20 CPUFreq driver (in-progress)
and I resolved it in the coupler's code [0]. Perhaps the generic coupler could do the same
thing by assuming that min_uV=current_uV until any consumer sets the voltage, i.e. if
regulator_check_consumers(min_uV=0) returns min_uV=0.
[0] https://lkml.org/lkml/2019/7/25/892
next prev parent reply other threads:[~2019-10-08 15:02 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20191008101720eucas1p2e0d1bca6e696848bf689067e05620679@eucas1p2.samsung.com>
2019-10-08 10:17 ` [PATCH] regulator: core: Skip balancing of the enabled regulators in regulator_enable() Marek Szyprowski
2019-10-08 10:17 ` Marek Szyprowski
2019-10-08 11:50 ` Mark Brown
2019-10-08 11:50 ` Mark Brown
2019-10-08 12:01 ` Marek Szyprowski
2019-10-08 12:01 ` Marek Szyprowski
2019-10-08 12:06 ` Mark Brown
2019-10-08 12:06 ` Mark Brown
2019-10-08 12:38 ` Marek Szyprowski
2019-10-08 12:38 ` Marek Szyprowski
2019-10-08 12:47 ` Mark Brown
2019-10-08 12:47 ` Mark Brown
2019-10-08 13:24 ` Bartlomiej Zolnierkiewicz
2019-10-08 13:24 ` Bartlomiej Zolnierkiewicz
2019-10-08 15:02 ` Dmitry Osipenko [this message]
2019-10-08 15:02 ` Dmitry Osipenko
2019-10-08 16:15 ` Mark Brown
2019-10-08 16:15 ` Mark Brown
2019-10-08 17:05 ` Dmitry Osipenko
2019-10-08 17:05 ` Dmitry Osipenko
2019-10-08 17:17 ` Mark Brown
2019-10-08 17:17 ` Mark Brown
2019-10-08 18:00 ` Dmitry Osipenko
2019-10-08 18:00 ` Dmitry Osipenko
2019-10-08 18:07 ` Mark Brown
2019-10-08 18:07 ` Mark Brown
2019-10-09 10:29 ` Marek Szyprowski
2019-10-09 10:29 ` Marek Szyprowski
2019-10-09 14:13 ` Mark Brown
2019-10-09 14:13 ` Mark Brown
2019-10-10 7:29 ` Viresh Kumar
2019-10-10 7:29 ` Viresh Kumar
2019-10-10 10:19 ` Marek Szyprowski
2019-10-10 10:19 ` Marek Szyprowski
2019-10-10 13:55 ` Mark Brown
2019-10-10 13:55 ` Mark Brown
2019-10-17 10:29 ` Marek Szyprowski
2019-10-08 15:48 ` Mark Brown
2019-10-08 15:48 ` Mark Brown
2019-10-08 16:02 ` Bartlomiej Zolnierkiewicz
2019-10-08 16:02 ` Bartlomiej Zolnierkiewicz
2019-10-08 16:21 ` Mark Brown
2019-10-08 16:21 ` 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=be8d3280-9855-ed18-b2ab-d7fb28d80b82@gmail.com \
--to=digetx@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=k.konieczny@samsung.com \
--cc=krzk@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=viresh.kumar@linaro.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).