From: Mark Brown <broonie@kernel.org>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: qcom_spmi: do no register unused regulators
Date: Thu, 4 Nov 2021 13:44:35 +0000 [thread overview]
Message-ID: <YYPjw6f4mPeslcGK@sirena.org.uk> (raw)
In-Reply-To: <YYOYZ1cEFFJhX2ae@gerhold.net>
[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]
On Thu, Nov 04, 2021 at 09:23:03AM +0100, Stephan Gerhold wrote:
> On Thu, Nov 04, 2021 at 03:43:51AM +0300, Dmitry Baryshkov wrote:
> > Typically SPMI interface to PMIC regulators on Qualcomm platforms is
> > used to supplement RPM interface in cases where direct control is
> > required (e.g. for the APCC or GFX regulators). Registering all possible
> > regulators is thus not required and may be potentially harmfull if
> > somebody tries to setup those directly. Thus register only regulators
> > that are really used in the device tree and ignore all unused
> > regulators.
> Shouldn't the missing regulator constraints already take care of that?
> If you don't setup any voltage etc in the device tree it should
> effectively make the regulator read-only.
Right, we won't touch the hardware configuration unless there are
constraints explicitly permitting it. Drivers should always register
any regulators that are physically present unconditionally, the core
will only make changes if the system integration permits it. Open
coding this in drivers just causes code duplication and creates issues
if there's changes in the generic bindings.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-11-04 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 0:43 [PATCH] regulator: qcom_spmi: do no register unused regulators Dmitry Baryshkov
2021-11-04 8:23 ` Stephan Gerhold
2021-11-04 13:44 ` Mark Brown [this message]
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=YYPjw6f4mPeslcGK@sirena.org.uk \
--to=broonie@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stephan@gerhold.net \
/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