From: Marc Gonzalez <marc.w.gonzalez@free.fr>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
MSM <linux-arm-msm@vger.kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Jeffrey Hugo <jhugo@codeaurora.org>,
Evan Green <evgreen@chromium.org>,
Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH v1] regulator: core: Log forbidden DRMS operation
Date: Thu, 21 Feb 2019 10:37:55 +0100 [thread overview]
Message-ID: <aac7535e-b27f-60be-ed9d-408ed6f869b5@free.fr> (raw)
In-Reply-To: <20190219163929.GA20883@sirena.org.uk>
On 19/02/2019 17:39, Mark Brown wrote:
> On Tue, Feb 19, 2019 at 05:02:46PM +0100, Marc Gonzalez wrote:
>
>> When REGULATOR_CHANGE_DRMS is not set, drms_uA_update is a no-op.
>> It used to print a debug message, which was dropped in commit
>> 8a34e979f684 ("regulator: refactor valid_ops_mask checking code")
>>
>> Let's bring the debug message back as KERN_INFO, because it is very
>> useful to diagnose missing regulator-allow-set-load properties.
>
> No, it's perfectly normal for machine constraints to stop drivers from
> doing things so we shouldn't warn on this - it would get incredibly
> noisy if we started printing every time constraints didn't let us do
> something at info level. Debug level might be viable, or definitely
> vdbg or trace points.
I had a look at the various REGULATOR_CHANGE_* flags.
#define REGULATOR_CHANGE_VOLTAGE 0x1
#define REGULATOR_CHANGE_CURRENT 0x2
#define REGULATOR_CHANGE_MODE 0x4
#define REGULATOR_CHANGE_STATUS 0x8
#define REGULATOR_CHANGE_DRMS 0x10
#define REGULATOR_CHANGE_BYPASS 0x20
Several functions return an error (and log a KERN_ERR message) if their
corresponding flag is not set:
regulator_check_voltage() REGULATOR_CHANGE_VOLTAGE
regulator_check_current_limit() REGULATOR_CHANGE_CURRENT
regulator_mode_constrain() REGULATOR_CHANGE_MODE
Others succeed silently even if their corresponding flag is not set:
drms_uA_update() REGULATOR_CHANGE_DRMS
regulator_allow_bypass() REGULATOR_CHANGE_BYPASS
Why is setting the voltage handled differently than setting the load?
Regards.
next prev parent reply other threads:[~2019-02-21 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 16:02 [PATCH v1] regulator: core: Log forbidden DRMS operation Marc Gonzalez
2019-02-19 16:39 ` Mark Brown
2019-02-21 9:37 ` Marc Gonzalez [this message]
2019-02-21 9:42 ` Marc Gonzalez
2019-02-21 10:12 ` Mark Brown
2019-02-21 11:55 ` [PATCH v2] " Marc Gonzalez
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=aac7535e-b27f-60be-ed9d-408ed6f869b5@free.fr \
--to=marc.w.gonzalez@free.fr \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=dianders@chromium.org \
--cc=evgreen@chromium.org \
--cc=jhugo@codeaurora.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@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).