forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/regulator/devres.c
....@@ -1,13 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * devres.c -- Voltage/Current Regulator framework devres implementation.
34 *
45 * Copyright 2013 Linaro Ltd
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License as published by the
8
- * Free Software Foundation; either version 2 of the License, or (at your
9
- * option) any later version.
10
- *
116 */
127
138 #include <linux/kernel.h>
....@@ -46,8 +41,8 @@
4641
4742 /**
4843 * devm_regulator_get - Resource managed regulator_get()
49
- * @dev: device for regulator "consumer"
50
- * @id: Supply name or regulator ID.
44
+ * @dev: device to supply
45
+ * @id: supply name or regulator ID.
5146 *
5247 * Managed regulator_get(). Regulators returned from this function are
5348 * automatically regulator_put() on driver detach. See regulator_get() for more
....@@ -61,8 +56,8 @@
6156
6257 /**
6358 * devm_regulator_get_exclusive - Resource managed regulator_get_exclusive()
64
- * @dev: device for regulator "consumer"
65
- * @id: Supply name or regulator ID.
59
+ * @dev: device to supply
60
+ * @id: supply name or regulator ID.
6661 *
6762 * Managed regulator_get_exclusive(). Regulators returned from this function
6863 * are automatically regulator_put() on driver detach. See regulator_get() for
....@@ -77,8 +72,8 @@
7772
7873 /**
7974 * devm_regulator_get_optional - Resource managed regulator_get_optional()
80
- * @dev: device for regulator "consumer"
81
- * @id: Supply name or regulator ID.
75
+ * @dev: device to supply
76
+ * @id: supply name or regulator ID.
8277 *
8378 * Managed regulator_get_optional(). Regulators returned from this
8479 * function are automatically regulator_put() on driver detach. See
....@@ -135,9 +130,9 @@
135130 /**
136131 * devm_regulator_bulk_get - managed get multiple regulator consumers
137132 *
138
- * @dev: Device to supply
139
- * @num_consumers: Number of consumers to register
140
- * @consumers: Configuration of consumers; clients are stored here.
133
+ * @dev: device to supply
134
+ * @num_consumers: number of consumers to register
135
+ * @consumers: configuration of consumers; clients are stored here.
141136 *
142137 * @return 0 on success, an errno on failure.
143138 *
....@@ -178,8 +173,9 @@
178173
179174 /**
180175 * devm_regulator_register - Resource managed regulator_register()
176
+ * @dev: device to supply
181177 * @regulator_desc: regulator to register
182
- * @config: runtime configuration for regulator
178
+ * @config: runtime configuration for regulator
183179 *
184180 * Called by regulator drivers to register a regulator. Returns a
185181 * valid pointer to struct regulator_dev on success or an ERR_PTR() on
....@@ -221,7 +217,8 @@
221217
222218 /**
223219 * devm_regulator_unregister - Resource managed regulator_unregister()
224
- * @regulator: regulator to free
220
+ * @dev: device to supply
221
+ * @rdev: regulator to free
225222 *
226223 * Unregister a regulator registered with devm_regulator_register().
227224 * Normally this function will not need to be called and the resource
....@@ -262,10 +259,10 @@
262259 * devm_regulator_register_supply_alias - Resource managed
263260 * regulator_register_supply_alias()
264261 *
265
- * @dev: device that will be given as the regulator "consumer"
266
- * @id: Supply name or regulator ID
262
+ * @dev: device to supply
263
+ * @id: supply name or regulator ID
267264 * @alias_dev: device that should be used to lookup the supply
268
- * @alias_id: Supply name or regulator ID that should be used to lookup the
265
+ * @alias_id: supply name or regulator ID that should be used to lookup the
269266 * supply
270267 *
271268 * The supply alias will automatically be unregistered when the source
....@@ -303,8 +300,8 @@
303300 * devm_regulator_unregister_supply_alias - Resource managed
304301 * regulator_unregister_supply_alias()
305302 *
306
- * @dev: device that will be given as the regulator "consumer"
307
- * @id: Supply name or regulator ID
303
+ * @dev: device to supply
304
+ * @id: supply name or regulator ID
308305 *
309306 * Unregister an alias registered with
310307 * devm_regulator_register_supply_alias(). Normally this function
....@@ -330,12 +327,12 @@
330327 * devm_regulator_bulk_register_supply_alias - Managed register
331328 * multiple aliases
332329 *
333
- * @dev: device that will be given as the regulator "consumer"
334
- * @id: List of supply names or regulator IDs
330
+ * @dev: device to supply
331
+ * @id: list of supply names or regulator IDs
335332 * @alias_dev: device that should be used to lookup the supply
336
- * @alias_id: List of supply names or regulator IDs that should be used to
337
- * lookup the supply
338
- * @num_id: Number of aliases to register
333
+ * @alias_id: list of supply names or regulator IDs that should be used to
334
+ * lookup the supply
335
+ * @num_id: number of aliases to register
339336 *
340337 * @return 0 on success, an errno on failure.
341338 *
....@@ -380,9 +377,9 @@
380377 * devm_regulator_bulk_unregister_supply_alias - Managed unregister
381378 * multiple aliases
382379 *
383
- * @dev: device that will be given as the regulator "consumer"
384
- * @id: List of supply names or regulator IDs
385
- * @num_id: Number of aliases to unregister
380
+ * @dev: device to supply
381
+ * @id: list of supply names or regulator IDs
382
+ * @num_id: number of aliases to unregister
386383 *
387384 * Unregister aliases registered with
388385 * devm_regulator_bulk_register_supply_alias(). Normally this function
....@@ -426,7 +423,7 @@
426423 * regulator_register_notifier
427424 *
428425 * @regulator: regulator source
429
- * @nb: notifier block
426
+ * @nb: notifier block
430427 *
431428 * The notifier will be registers under the consumer device and be
432429 * automatically be unregistered when the source device is unbound.
....@@ -463,7 +460,7 @@
463460 * regulator_unregister_notifier()
464461 *
465462 * @regulator: regulator source
466
- * @nb: notifier block
463
+ * @nb: notifier block
467464 *
468465 * Unregister a notifier registered with devm_regulator_register_notifier().
469466 * Normally this function will not need to be called and the resource