Thread (9 messages) 9 messages, 4 authors, 2024-10-09

Re: [PATCH v9 1/3] regulator: Add of_regulator_get_optional() for pure DT regulator lookup

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date: 2024-09-30 08:57:03
Also in: linux-devicetree, linux-mediatek, linux-pm, lkml

Il 30/09/24 06:45, Chen-Yu Tsai ha scritto:
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.

Add a new of_regulator_get_optional() function for this. This mirrors
the existing regulator_get_optional() function, but is OF-specific.
The underlying code that supports the existing regulator_get*()
functions has been reworked in previous patches to support this
specific case.

Also convert an existing usage of "dev && dev->of_node" to
"dev_of_node(dev)".

Link: https://lore.kernel.org/all/20231220203537.83479-2-jernej.skrabec@gmail.com/ (local) [1]
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help