include/linux/regulator/consumer.h
Source file repositories/reference/linux-study-clean/include/linux/regulator/consumer.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/regulator/consumer.h- Extension
.h- Size
- 21827 bytes
- Lines
- 746
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/err.hlinux/suspend.hregulator/regulator.h
Detected Declarations
struct devicestruct notifier_blockstruct regmapstruct regulator_devstruct pre_voltage_change_datastruct regulatorstruct regulator_bulk_datafunction regulator_getfunction devm_regulator_getfunction regulator_get_exclusivefunction devm_regulator_get_exclusivefunction devm_regulator_get_enablefunction devm_regulator_get_enable_optionalfunction devm_regulator_get_enable_read_voltagefunction regulator_get_optionalfunction devm_regulator_get_optionalfunction regulator_putfunction regulator_unregister_supply_aliasfunction regulator_bulk_unregister_supply_aliasfunction devm_regulator_bulk_register_supply_aliasfunction regulator_enablefunction regulator_disablefunction regulator_force_disablefunction regulator_disable_deferredfunction regulator_is_enabledfunction regulator_bulk_getfunction devm_regulator_bulk_getfunction devm_regulator_bulk_get_constfunction regulator_bulk_enablefunction devm_regulator_bulk_get_enablefunction regulator_bulk_disablefunction regulator_bulk_force_disablefunction regulator_bulk_freefunction regulator_set_voltage_timefunction regulator_get_voltagefunction regulator_sync_voltagefunction regulator_is_supported_voltagefunction regulator_get_linear_stepfunction regulator_set_current_limitfunction regulator_get_current_limitfunction regulator_get_unclaimed_power_budgetfunction regulator_request_power_budgetfunction regulator_free_power_budgetfunction regulator_get_modefunction regulator_get_error_flagsfunction regulator_set_loadfunction regulator_allow_bypassfunction regulator_get_hardware_vsel_register
Annotated Snippet
struct pre_voltage_change_data {
unsigned long old_uV;
unsigned long min_uV;
unsigned long max_uV;
};
struct regulator;
/**
* struct regulator_bulk_data - Data used for bulk regulator operations.
*
* @supply: The name of the supply. Initialised by the user before
* using the bulk regulator APIs.
* @consumer: The regulator consumer for the supply. This will be managed
* by the bulk API.
* @init_load_uA: After getting the regulator, regulator_set_load() will be
* called with this load. Initialised by the user before
* using the bulk regulator APIs.
*
* The regulator APIs provide a series of regulator_bulk_() API calls as
* a convenience to consumers which require multiple supplies. This
* structure is used to manage data for these calls.
*/
struct regulator_bulk_data {
const char *supply;
struct regulator *consumer;
int init_load_uA;
/* private: Internal use */
int ret;
};
#if defined(CONFIG_REGULATOR)
/* regulator get and put */
struct regulator *__must_check regulator_get(struct device *dev,
const char *id);
struct regulator *__must_check devm_regulator_get(struct device *dev,
const char *id);
struct regulator *__must_check regulator_get_exclusive(struct device *dev,
const char *id);
struct regulator *__must_check devm_regulator_get_exclusive(struct device *dev,
const char *id);
struct regulator *__must_check regulator_get_optional(struct device *dev,
const char *id);
struct regulator *__must_check devm_regulator_get_optional(struct device *dev,
const char *id);
int devm_regulator_get_enable(struct device *dev, const char *id);
int devm_regulator_get_enable_optional(struct device *dev, const char *id);
int devm_regulator_get_enable_read_voltage(struct device *dev, const char *id);
void regulator_put(struct regulator *regulator);
void devm_regulator_put(struct regulator *regulator);
int regulator_register_supply_alias(struct device *dev, const char *id,
struct device *alias_dev,
const char *alias_id);
void regulator_unregister_supply_alias(struct device *dev, const char *id);
int regulator_bulk_register_supply_alias(struct device *dev,
const char *const *id,
struct device *alias_dev,
const char *const *alias_id,
int num_id);
void regulator_bulk_unregister_supply_alias(struct device *dev,
const char * const *id, int num_id);
int devm_regulator_register_supply_alias(struct device *dev, const char *id,
struct device *alias_dev,
const char *alias_id);
int devm_regulator_bulk_register_supply_alias(struct device *dev,
const char *const *id,
struct device *alias_dev,
const char *const *alias_id,
int num_id);
/* regulator output control and status */
int __must_check regulator_enable(struct regulator *regulator);
int regulator_disable(struct regulator *regulator);
int regulator_force_disable(struct regulator *regulator);
int regulator_is_enabled(struct regulator *regulator);
int regulator_disable_deferred(struct regulator *regulator, int ms);
int __must_check regulator_bulk_get(struct device *dev, int num_consumers,
struct regulator_bulk_data *consumers);
int __must_check devm_regulator_bulk_get(struct device *dev, int num_consumers,
struct regulator_bulk_data *consumers);
void devm_regulator_bulk_put(struct regulator_bulk_data *consumers);
int __must_check devm_regulator_bulk_get_exclusive(struct device *dev, int num_consumers,
struct regulator_bulk_data *consumers);
Annotation
- Immediate include surface: `linux/err.h`, `linux/suspend.h`, `regulator/regulator.h`.
- Detected declarations: `struct device`, `struct notifier_block`, `struct regmap`, `struct regulator_dev`, `struct pre_voltage_change_data`, `struct regulator`, `struct regulator_bulk_data`, `function regulator_get`, `function devm_regulator_get`, `function regulator_get_exclusive`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.