Thread (47 messages) 47 messages, 7 authors, 2024-09-11

Re: [PATCH v6 05/12] regulator: Do pure DT regulator lookup in of_regulator_bulk_get_all()

From: Chen-Yu Tsai <wenst@chromium.org>
Date: 2024-09-09 02:39:55
Also in: chrome-platform, linux-arm-kernel, linux-i2c, linux-mediatek, lkml

On Wed, Sep 4, 2024 at 9:13 PM Andy Shevchenko
[off-list ref] wrote:
On Wed, Sep 04, 2024 at 05:00:07PM +0800, Chen-Yu Tsai wrote:
quoted
The to-be-introduced I2C component prober needs to enable regulator
supplies (and toggle GPIO pins) for the various components it intends
to probe. To support this, a new "pure DT lookup" method for getting
regulator supplies is needed, since the device normally requesting
the supply won't get created until after the component is probed to
be available.

Convert the existing of_regulator_bulk_get_all() for this purpose.
This function has no in-tree users, as the original patch [1] that
used it was never landed. This patch changes the function ABI, but
it is straightforward to convert users.

The underlying code that supports the existing regulator_get*()
functions has been reworked in previous patches to support this
specific case. An internal OF-specific version of regulator_get(),
of_regulator_get_optional(), is added for this.

Also convert an existing usage of "dev && dev->of_node" to
"dev_of_node(dev)".
quoted
[1] https://lore.kernel.org/all/20231220203537.83479-2-jernej.skrabec@gmail.com/ (local)

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Make it Link tag.

  Link: https://lore.kernel.org/all/20231220203537.83479-2-jernej.skrabec@gmail.com/ (local) [1]
  Signed-off-by: Chen-Yu Tsai [off-list ref]
Ack.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help