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

Re: [PATCH v5 03/10] regulator: Split up _regulator_get()

From: Chen-Yu Tsai <wenst@chromium.org>
Date: 2024-08-23 06:54:37
Also in: chrome-platform, linux-arm-kernel, linux-i2c, linux-mediatek, lkml

On Thu, Aug 22, 2024 at 9:49 PM Andy Shevchenko
[off-list ref] wrote:
On Thu, Aug 22, 2024 at 05:19:56PM +0800, Chen-Yu Tsai wrote:
quoted
_regulator_get() contains a lot of common code doing checks prior to the
regulator lookup and housekeeping work after the lookup. Almost all the
code could be shared with a OF-specific variant of _regulator_get().

Split out the common parts so that they can be reused. The OF-specific
version of _regulator_get() will be added in a subsequent patch.
No functional changes were made.
quoted
+/**
+ * _regulator_get_common - Common code for regulator requests
+ * @rdev: regulator device pointer as returned by *regulator_dev_lookup()
+ *       Its reference count is expected to have been incremented.
+ * @dev: device used for dev_printk messages
+ * @id: Supply name or regulator ID
+ * @get_type: enum regulator_get_type value corresponding to type of request
+ *
+ * Returns a struct regulator corresponding to @rdev,
+ * or IS_ERR() condition containing errno.
+ *
+ * This function should be chained with *regulator_dev_lookup() functions.
kernel-doc will warn here: No "Return" section.
Will fix.

ChenYu
quoted
+ */
--
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