lkml.org 
[lkml]   [2021]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: qcom_spmi: do no register unused regulators
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-11-04 14:45    [W:0.042 / U:3.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site