Thread (36 messages) 36 messages, 4 authors, 2024-08-26

Re: [PATCH v5 02/10] regulator: Move OF-specific regulator lookup code to of_regulator.c

From: Chen-Yu Tsai <wenst@chromium.org>
Date: 2024-08-23 06:50:12
Also in: chrome-platform, linux-devicetree, linux-i2c, linux-mediatek, lkml

On Thu, Aug 22, 2024 at 9:47 PM Andy Shevchenko
[off-list ref] wrote:
On Thu, Aug 22, 2024 at 05:19:55PM +0800, Chen-Yu Tsai wrote:
quoted
There's still a bit of OF-specific code in the regulator device lookup
function.

Move those bits of code over to of_regulator.c, and create a new
function of_regulator_dev_lookup() to encapsulate the code moved out of
regulator_dev_lookup().

Also mark of_find_regulator_by_node() as static, since there are no
other users in other compile units.

There are no functional changes.
...
quoted
+/**
+ * of_get_child_regulator - get a child regulator device node
+ * based on supply name
+ * @parent: Parent device node
+ * @prop_name: Combination regulator supply name and "-supply"
+ *
+ * Traverse all child nodes.
+ * Extract the child regulator device node corresponding to the supply name.
+ * returns the device node corresponding to the regulator if found, else
+ * returns NULL.
At the same time you may fix kernel-doc warnings (no "Return" section) in these
three (on your wish you may fix others in a separate change, but it's not
related to this series).
As you said some other functions are missing it as well, so I'll do a
patch separate from this series to fix them all.
quoted
+ */
...
quoted
+/** of_regulator_dev_lookup - lookup a regulator device with device tree only
Something went wrong with the indentation.
Will fix, and also add a "Return" section.


Thanks
ChenYu
quoted
+ * @dev: Device pointer for regulator supply lookup.
+ * @supply: Supply name or regulator ID.
+ *
+ * If successful, returns a struct regulator_dev that corresponds to the name
+ * @supply and with the embedded struct device refcount incremented by one.
+ * The refcount must be dropped by calling put_device().
+ * On failure one of the following ERR-PTR-encoded values is returned:
+ * -ENODEV if lookup fails permanently, -EPROBE_DEFER if lookup could succeed
+ * in the future.
+ */
--
With Best Regards,
Andy Shevchenko
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help