From: Mark Brown <broonie@kernel.org>
To: David Collins <collinsd@codeaurora.org>
Cc: Doug Anderson <dianders@chromium.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-arm-msm@vger.kernel.org,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
devicetree@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Rajendra Nayak <rnayak@codeaurora.org>,
Stephen Boyd <sboyd@kernel.org>,
Matthias Kaehlcke <mka@chromium.org>
Subject: Re: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver
Date: Tue, 24 Apr 2018 18:45:07 +0100 [thread overview]
Message-ID: <20180424174507.GI22073@sirena.org.uk> (raw)
In-Reply-To: <132ab845-52d6-6192-4d8c-5a9c95410688@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 2079 bytes --]
On Fri, Apr 20, 2018 at 03:08:57PM -0700, David Collins wrote:
> On 04/19/2018 09:16 AM, Doug Anderson wrote:
> > On Wed, Apr 18, 2018 at 4:30 PM, David Collins <collinsd@codeaurora.org> wrote:
Please delete unneeded context from mails when replying. Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.
> > You'd need to ask Mark if he's OK with it, but a option #3 is to add a
> > patch to your series fix the regulator framework to try setting the
> > voltage if _regulator_get_voltage() fails. Presumably in
> > machine_constraints_voltage() you'd now do something like:
> >
> > int target_min, target_max;
> > int current_uV = _regulator_get_voltage(rdev);
> > if (current_uV < 0) {
> > /* Maybe this regulator's hardware can't be read and needs to be initted */
> > _regulator_do_set_voltage(
> > rdev, rdev->constraints->min_uV, rdev->constraints->min_uV);
> > current_uV = _regulator_get_voltage(rdev);
> > }
> > if (current_uV < 0) {
> > rdev_err(rdev,
> > "failed to get the current voltage(%d)\n",
> > current_uV);
> > return current_uV;
> > }
> > If Mark doesn't like that then I guess I'd be OK w/ initting it to 0
> > but this needs to be documented _somewhere_ (unlike for bypass it's
> > not obvious, so you need to find someplace to put it). I'd rather not
> > hack the DT to deal with our software limitations.
> I'm not opposed to your option #3 though it does seem a little hacky and
> tailored to the qcom_rpmh-regulator specific case. Note that I think it
> would be better to vote for min_uV to max_uV than min_uV to min_uV though.
> Mark, what are your thoughts on the best way to handle this situation?
I think that's probably only OK if we have a specific error code for the
regulator being limited in this way otherwise our error handling for I/O
problems involves us trying to reconfigure supplies which seems like it
would be risky.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver
Date: Tue, 24 Apr 2018 18:45:07 +0100 [thread overview]
Message-ID: <20180424174507.GI22073@sirena.org.uk> (raw)
In-Reply-To: <132ab845-52d6-6192-4d8c-5a9c95410688@codeaurora.org>
On Fri, Apr 20, 2018 at 03:08:57PM -0700, David Collins wrote:
> On 04/19/2018 09:16 AM, Doug Anderson wrote:
> > On Wed, Apr 18, 2018 at 4:30 PM, David Collins <collinsd@codeaurora.org> wrote:
Please delete unneeded context from mails when replying. Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.
> > You'd need to ask Mark if he's OK with it, but a option #3 is to add a
> > patch to your series fix the regulator framework to try setting the
> > voltage if _regulator_get_voltage() fails. Presumably in
> > machine_constraints_voltage() you'd now do something like:
> >
> > int target_min, target_max;
> > int current_uV = _regulator_get_voltage(rdev);
> > if (current_uV < 0) {
> > /* Maybe this regulator's hardware can't be read and needs to be initted */
> > _regulator_do_set_voltage(
> > rdev, rdev->constraints->min_uV, rdev->constraints->min_uV);
> > current_uV = _regulator_get_voltage(rdev);
> > }
> > if (current_uV < 0) {
> > rdev_err(rdev,
> > "failed to get the current voltage(%d)\n",
> > current_uV);
> > return current_uV;
> > }
> > If Mark doesn't like that then I guess I'd be OK w/ initting it to 0
> > but this needs to be documented _somewhere_ (unlike for bypass it's
> > not obvious, so you need to find someplace to put it). I'd rather not
> > hack the DT to deal with our software limitations.
> I'm not opposed to your option #3 though it does seem a little hacky and
> tailored to the qcom_rpmh-regulator specific case. Note that I think it
> would be better to vote for min_uV to max_uV than min_uV to min_uV though.
> Mark, what are your thoughts on the best way to handle this situation?
I think that's probably only OK if we have a specific error code for the
regulator being limited in this way otherwise our error handling for I/O
problems involves us trying to reconfigure supplies which seems like it
would be risky.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180424/09cd228d/attachment.sig>
next prev parent reply other threads:[~2018-04-24 17:45 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-14 2:50 [PATCH v2 0/2] regulator: add QCOM RPMh regulator driver David Collins
2018-04-14 2:50 ` David Collins
2018-04-14 2:50 ` [PATCH v2 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings David Collins
2018-04-14 2:50 ` David Collins
2018-04-16 20:57 ` Rob Herring
2018-04-16 20:57 ` Rob Herring
2018-04-16 22:06 ` David Collins
2018-04-16 22:06 ` David Collins
2018-04-17 20:06 ` Doug Anderson
2018-04-17 20:06 ` Doug Anderson
2018-04-18 21:44 ` David Collins
2018-04-18 21:44 ` David Collins
2018-05-02 16:37 ` Doug Anderson
2018-05-02 16:37 ` Doug Anderson
2018-05-03 0:13 ` David Collins
2018-05-03 0:13 ` David Collins
2018-05-03 15:01 ` Doug Anderson
2018-05-03 15:01 ` Doug Anderson
2018-04-14 2:50 ` [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver David Collins
2018-04-14 2:50 ` David Collins
2018-04-17 18:23 ` [v2,2/2] " Matthias Kaehlcke
2018-04-17 18:23 ` Matthias Kaehlcke
2018-04-17 19:15 ` David Collins
2018-04-17 19:15 ` David Collins
2018-04-17 19:47 ` Matthias Kaehlcke
2018-04-17 19:47 ` Matthias Kaehlcke
2018-04-18 21:34 ` David Collins
2018-04-18 21:34 ` David Collins
2018-04-18 17:02 ` Mark Brown
2018-04-18 17:02 ` Mark Brown
2018-04-17 20:02 ` [PATCH v2 2/2] " Doug Anderson
2018-04-17 20:02 ` Doug Anderson
2018-04-18 23:30 ` David Collins
2018-04-18 23:30 ` David Collins
2018-04-19 6:04 ` Stephen Boyd
2018-04-19 6:04 ` Stephen Boyd
2018-04-19 16:16 ` Doug Anderson
2018-04-19 16:16 ` Doug Anderson
2018-04-20 22:08 ` David Collins
2018-04-20 22:08 ` David Collins
2018-04-24 17:45 ` Mark Brown [this message]
2018-04-24 17:45 ` Mark Brown
2018-04-24 21:09 ` David Collins
2018-04-24 21:09 ` David Collins
2018-04-25 10:31 ` Mark Brown
2018-04-25 10:31 ` Mark Brown
2018-04-25 21:04 ` David Collins
2018-04-25 21:04 ` David Collins
2018-05-01 21:02 ` Mark Brown
2018-05-01 21:02 ` 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=20180424174507.GI22073@sirena.org.uk \
--to=broonie@kernel.org \
--cc=collinsd@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mka@chromium.org \
--cc=rnayak@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.