[PATCH v2 0/2] regulator: scmi: add support for registering SCMI regulators by name

Mark Brown broonie at kernel.org
Thu Mar 24 10:23:05 PDT 2022


On Tue, Mar 22, 2022 at 06:12:33PM -0700, David Collins wrote:

> Another problem is that, as with regulators, ID numbers could
> unknowingly get out of sync between the platform and the agent.  Using
> clock domain names for referencing fixes both issues.  This can be

This is just saying that the hard coded IDs that the firmware and kernel
use to communicate can get out of sync which is true no matter if those
IDs are strings or if they're numerical, either way it's an ABI which
can be broken.

> > If the IDs are correct like the names, it is guaranteed. I see this
> > ID vs name is more for some maintenance convenience because somewhere
> > something else needs to changes or moved away from existing way of
> > maintenance.

> How do you quantify an ID number to physical regulator mapping as
> "correct"?  What happens if the mapping must be changed on the SCMI
> platform side (e.g. a PMIC was added or removed, or the order that
> regulators are listed in needs to change)?  If the SCMI agent is blindly

The whole point with the numbers being an ABI is that things must never
be renumbered, just as if names are used the names can't be changed.  If
the numbering is changing that just sounds like bugs on the platform
side.  There's an implicit assumption in what you've written above that
implementation details of the firmware should affect the IDs presented
through SCMI which simply shouldn't be true, and indeed if the firmware
can assign fixed strings it can just as well assign fixed numbers.
-------------- 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/20220324/03f44572/attachment.sig>


More information about the linux-arm-kernel mailing list