| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * devres.c -- Voltage/Current Regulator framework devres implementation. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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 | | - * |
|---|
| 11 | 6 | */ |
|---|
| 12 | 7 | |
|---|
| 13 | 8 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 46 | 41 | |
|---|
| 47 | 42 | /** |
|---|
| 48 | 43 | * 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. |
|---|
| 51 | 46 | * |
|---|
| 52 | 47 | * Managed regulator_get(). Regulators returned from this function are |
|---|
| 53 | 48 | * automatically regulator_put() on driver detach. See regulator_get() for more |
|---|
| .. | .. |
|---|
| 61 | 56 | |
|---|
| 62 | 57 | /** |
|---|
| 63 | 58 | * 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. |
|---|
| 66 | 61 | * |
|---|
| 67 | 62 | * Managed regulator_get_exclusive(). Regulators returned from this function |
|---|
| 68 | 63 | * are automatically regulator_put() on driver detach. See regulator_get() for |
|---|
| .. | .. |
|---|
| 77 | 72 | |
|---|
| 78 | 73 | /** |
|---|
| 79 | 74 | * 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. |
|---|
| 82 | 77 | * |
|---|
| 83 | 78 | * Managed regulator_get_optional(). Regulators returned from this |
|---|
| 84 | 79 | * function are automatically regulator_put() on driver detach. See |
|---|
| .. | .. |
|---|
| 135 | 130 | /** |
|---|
| 136 | 131 | * devm_regulator_bulk_get - managed get multiple regulator consumers |
|---|
| 137 | 132 | * |
|---|
| 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. |
|---|
| 141 | 136 | * |
|---|
| 142 | 137 | * @return 0 on success, an errno on failure. |
|---|
| 143 | 138 | * |
|---|
| .. | .. |
|---|
| 178 | 173 | |
|---|
| 179 | 174 | /** |
|---|
| 180 | 175 | * devm_regulator_register - Resource managed regulator_register() |
|---|
| 176 | + * @dev: device to supply |
|---|
| 181 | 177 | * @regulator_desc: regulator to register |
|---|
| 182 | | - * @config: runtime configuration for regulator |
|---|
| 178 | + * @config: runtime configuration for regulator |
|---|
| 183 | 179 | * |
|---|
| 184 | 180 | * Called by regulator drivers to register a regulator. Returns a |
|---|
| 185 | 181 | * valid pointer to struct regulator_dev on success or an ERR_PTR() on |
|---|
| .. | .. |
|---|
| 221 | 217 | |
|---|
| 222 | 218 | /** |
|---|
| 223 | 219 | * devm_regulator_unregister - Resource managed regulator_unregister() |
|---|
| 224 | | - * @regulator: regulator to free |
|---|
| 220 | + * @dev: device to supply |
|---|
| 221 | + * @rdev: regulator to free |
|---|
| 225 | 222 | * |
|---|
| 226 | 223 | * Unregister a regulator registered with devm_regulator_register(). |
|---|
| 227 | 224 | * Normally this function will not need to be called and the resource |
|---|
| .. | .. |
|---|
| 262 | 259 | * devm_regulator_register_supply_alias - Resource managed |
|---|
| 263 | 260 | * regulator_register_supply_alias() |
|---|
| 264 | 261 | * |
|---|
| 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 |
|---|
| 267 | 264 | * @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 |
|---|
| 269 | 266 | * supply |
|---|
| 270 | 267 | * |
|---|
| 271 | 268 | * The supply alias will automatically be unregistered when the source |
|---|
| .. | .. |
|---|
| 303 | 300 | * devm_regulator_unregister_supply_alias - Resource managed |
|---|
| 304 | 301 | * regulator_unregister_supply_alias() |
|---|
| 305 | 302 | * |
|---|
| 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 |
|---|
| 308 | 305 | * |
|---|
| 309 | 306 | * Unregister an alias registered with |
|---|
| 310 | 307 | * devm_regulator_register_supply_alias(). Normally this function |
|---|
| .. | .. |
|---|
| 330 | 327 | * devm_regulator_bulk_register_supply_alias - Managed register |
|---|
| 331 | 328 | * multiple aliases |
|---|
| 332 | 329 | * |
|---|
| 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 |
|---|
| 335 | 332 | * @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 |
|---|
| 339 | 336 | * |
|---|
| 340 | 337 | * @return 0 on success, an errno on failure. |
|---|
| 341 | 338 | * |
|---|
| .. | .. |
|---|
| 380 | 377 | * devm_regulator_bulk_unregister_supply_alias - Managed unregister |
|---|
| 381 | 378 | * multiple aliases |
|---|
| 382 | 379 | * |
|---|
| 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 |
|---|
| 386 | 383 | * |
|---|
| 387 | 384 | * Unregister aliases registered with |
|---|
| 388 | 385 | * devm_regulator_bulk_register_supply_alias(). Normally this function |
|---|
| .. | .. |
|---|
| 426 | 423 | * regulator_register_notifier |
|---|
| 427 | 424 | * |
|---|
| 428 | 425 | * @regulator: regulator source |
|---|
| 429 | | - * @nb: notifier block |
|---|
| 426 | + * @nb: notifier block |
|---|
| 430 | 427 | * |
|---|
| 431 | 428 | * The notifier will be registers under the consumer device and be |
|---|
| 432 | 429 | * automatically be unregistered when the source device is unbound. |
|---|
| .. | .. |
|---|
| 463 | 460 | * regulator_unregister_notifier() |
|---|
| 464 | 461 | * |
|---|
| 465 | 462 | * @regulator: regulator source |
|---|
| 466 | | - * @nb: notifier block |
|---|
| 463 | + * @nb: notifier block |
|---|
| 467 | 464 | * |
|---|
| 468 | 465 | * Unregister a notifier registered with devm_regulator_register_notifier(). |
|---|
| 469 | 466 | * Normally this function will not need to be called and the resource |
|---|