Re: [PATCH 04/10] regulator: of: switch to using class_find_device_by_fwnode()

Mark Brown <[email protected]> Mon, 23 Mar 2026 19:05:13 +0000
Newsgroups org.kernel.vger.linux-fpga,dev.linux.lists.driver-core,org.infradead.lists.linux-phy,org.kernel.vger.linux-kernel,org.kernel.vger.linux-leds,org.kernel.vger.linux-spi,org.kernel.vger.netdev
Message-ID <[email protected]>
On Mon, Mar 23, 2026 at 11:28:27AM -0700, Dmitry Torokhov wrote:
> On Mon, Mar 23, 2026 at 02:00:43PM +0000, Mark Brown wrote:

> > The regulator API is very deliberately specifically using the OF APIs,
> > not the ACPI APIs, since ACPI really doesn't want to model regulators.

> For now? We also have software nodes and maybe we come up with something
> else in the future...

> I think we should use firmware-agnostic APIs as much as possible, and
> only use OF- or ACPI-specific ones when there is no generic equivalent.
> This makes the code most flexible.

I think this is a worrying idea for core code like this, we have
specific firmware bindings for specific firmware interfaces with the
different interfaces having very different ideas of how things should be
modelled.  The chances that firmware agnostic code is going to do the
right thing seem low, and encouraging the use of generic APIs that might
happen to run OK raises the risk that we'll get firmware vendors relying
on them and leaving us with a conceptual mishmash to sort through.

Software nodes are already a bit of a concern here TBH.
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmnBjugACgkQJNaLcl1U
h9DGQQf+Mk0kzYDoB4rVGypXwOfdtMgCpkoWOzcoGOZoT5oIqbKWA2xKZp8YZ9lI
iN3X0Fsu/fIbEOD9FNjbJZ9qDqssjwF4J5C0jMRxwk08Suh9YRn+R/3pLvzepLs5
4P9aByiEU8BBGM3HPJ75vVTahxLy8ZqvrHJbX+/H5wlkCZVD2tdatnrnvNvjbQIo
S9NGzwZagxQkwkuw9BJ0DoZgRqiQH6xJi9kpr9uwdIzJMunmo/9FzMye6CHCEdgW
gWq8ynTVSPvQMbs81K7P1kKEyHMdrKW+SR9JsOb53ST2B6P9ErFaz33GFx6d6nr9
Q2enPr6UesV/0+0xDR+N8UmiycTfHA==
=/5RN
-----END PGP SIGNATURE-----