Linux-Samsung-soc Archive on lore.kernel.org
 help / color / Atom feed
WARNING: multiple messages have this Message-ID
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Mark Brown <broonie@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-kernel@vger.kernel.org, Dmitry Osipenko <digetx@gmail.com>,
	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:08 +0200
Message-ID: <86eb668d-7bcf-798b-dabb-95071d16cbb6@samsung.com> (raw)
In-Reply-To: <20191008154844.GM4382@sirena.co.uk>


On 10/8/19 5:48 PM, Mark Brown wrote:
> On Tue, Oct 08, 2019 at 03:24:17PM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
>> 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.
> 
> With coupled regulators you might have something kicking in because a
> change was made on a completely different regulator...  If we don't take
> account of coupling requirements we'd doubtless have issues with that at
> some point.

OK, I have not considered this.

>> 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)
> 
> I don't follow?  What would a "constraint" be in this context and how
> would it be different to the voltage range you'd set in normal operation?

The constraint here would be just the voltage range. I just wanted to
point out that the actual voltage set operation (on the hardware itself
not the internal subsystem bookkeeping) shouldn't be done before enable
operation (especially in context of non-coupled regulators).

Taking into account your remark about enable operation on coupled
regulators and Dmitry's mail about cpufreq issue I think now that just
dropping opp change is the most straightforward fix.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Mark Brown <broonie@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-kernel@vger.kernel.org, Dmitry Osipenko <digetx@gmail.com>,
	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:08 +0200
Message-ID: <86eb668d-7bcf-798b-dabb-95071d16cbb6@samsung.com> (raw)
Message-ID: <20191008160208.OE6fYV_-W4GJFYrg5D6sTR3HL9Fu06uaNkiObbNTNZk@z> (raw)
In-Reply-To: <20191008154844.GM4382@sirena.co.uk>


On 10/8/19 5:48 PM, Mark Brown wrote:
> On Tue, Oct 08, 2019 at 03:24:17PM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
>> 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.
> 
> With coupled regulators you might have something kicking in because a
> change was made on a completely different regulator...  If we don't take
> account of coupling requirements we'd doubtless have issues with that at
> some point.

OK, I have not considered this.

>> 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)
> 
> I don't follow?  What would a "constraint" be in this context and how
> would it be different to the voltage range you'd set in normal operation?

The constraint here would be just the voltage range. I just wanted to
point out that the actual voltage set operation (on the hardware itself
not the internal subsystem bookkeeping) shouldn't be done before enable
operation (especially in context of non-coupled regulators).

Taking into account your remark about enable operation on coupled
regulators and Dmitry's mail about cpufreq issue I think now that just
dropping opp change is the most straightforward fix.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

  parent reply index

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191008101720eucas1p2e0d1bca6e696848bf689067e05620679@eucas1p2.samsung.com>
2019-10-08 10:17 ` 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
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 [this message]
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=86eb668d-7bcf-798b-dabb-95071d16cbb6@samsung.com \
    --to=b.zolnierkie@samsung.com \
    --cc=broonie@kernel.org \
    --cc=digetx@gmail.com \
    --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

Linux-Samsung-soc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-samsung-soc/0 linux-samsung-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-samsung-soc linux-samsung-soc/ https://lore.kernel.org/linux-samsung-soc \
		linux-samsung-soc@vger.kernel.org
	public-inbox-index linux-samsung-soc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-samsung-soc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git