include/linux/regulator/machine.h
Source file repositories/reference/linux-study-clean/include/linux/regulator/machine.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/regulator/machine.h- Extension
.h- Size
- 10773 bytes
- Lines
- 310
- 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/regulator/consumer.hlinux/suspend.h
Detected Declarations
struct regulatorstruct regulator_statestruct notification_limitstruct regulation_constraintsstruct regulator_consumer_supplystruct regulator_init_dataenum regulator_active_dischargefunction regulator_has_full_constraintsfunction regulator_suspend_finish
Annotated Snippet
struct regulator_state {
int uV;
int min_uV;
int max_uV;
unsigned int mode;
int enabled;
bool changeable;
};
#define REGULATOR_NOTIF_LIMIT_DISABLE -1
#define REGULATOR_NOTIF_LIMIT_ENABLE -2
struct notification_limit {
int prot;
int err;
int warn;
};
/**
* struct regulation_constraints - regulator operating constraints.
*
* This struct describes regulator and board/machine specific constraints.
*
* @name: Descriptive name for the constraints, used for display purposes.
*
* @min_uV: Smallest voltage consumers may set.
* @max_uV: Largest voltage consumers may set.
* @uV_offset: Offset applied to voltages from consumer to compensate for
* voltage drops.
*
* @min_uA: Smallest current consumers may set.
* @max_uA: Largest current consumers may set.
* @ilim_uA: Maximum input current.
* @pw_budget_mW: Power budget for the regulator in mW.
* @system_load: Load that isn't captured by any consumer requests.
*
* @over_curr_limits: Limits for acting on over current.
* @over_voltage_limits: Limits for acting on over voltage.
* @under_voltage_limits: Limits for acting on under voltage.
* @temp_limits: Limits for acting on over temperature.
*
* @max_spread: Max possible spread between coupled regulators
* @max_uV_step: Max possible step change in voltage
* @valid_modes_mask: Mask of modes which may be configured by consumers.
* @valid_ops_mask: Operations which may be performed by consumers.
*
* @always_on: Set if the regulator should never be disabled.
* @boot_on: Set if the regulator is enabled when the system is initially
* started. If the regulator is not enabled by the hardware or
* bootloader then it will be enabled when the constraints are
* applied.
* @apply_uV: Apply the voltage constraint when initialising.
* @ramp_disable: Disable ramp delay when initialising or when setting voltage.
* @soft_start: Enable soft start so that voltage ramps slowly.
* @pull_down: Enable pull down when regulator is disabled.
* @system_critical: Set if the regulator is critical to system stability or
* functionality.
* @over_current_protection: Auto disable on over current event.
*
* @over_current_detection: Configure over current limits.
* @over_voltage_detection: Configure over voltage limits.
* @under_voltage_detection: Configure under voltage limits.
* @over_temp_detection: Configure over temperature limits.
*
* @input_uV: Input voltage for regulator when supplied by another regulator.
*
* @state_disk: State for regulator when system is suspended in disk mode.
* @state_mem: State for regulator when system is suspended in mem mode.
* @state_standby: State for regulator when system is suspended in standby
* mode.
* @initial_state: Suspend state to set by default.
* @initial_mode: Mode to set at startup.
* @ramp_delay: Time to settle down after voltage change (unit: uV/us)
* @settling_time: Time to settle down after voltage change when voltage
* change is non-linear (unit: microseconds).
* @settling_time_up: Time to settle down after voltage increase when voltage
* change is non-linear (unit: microseconds).
* @settling_time_down : Time to settle down after voltage decrease when
* voltage change is non-linear (unit: microseconds).
* @active_discharge: Enable/disable active discharge. The enum
* regulator_active_discharge values are used for
* initialisation.
* @enable_time: Turn-on time of the rails (unit: microseconds)
* @uv_less_critical_window_ms: Specifies the time window (in milliseconds)
* following a critical under-voltage (UV) event
* during which less critical actions can be
* safely carried out by the system (for example
* logging). After this time window more critical
* actions should be done (for example prevent
* HW damage).
*/
Annotation
- Immediate include surface: `linux/regulator/consumer.h`, `linux/suspend.h`.
- Detected declarations: `struct regulator`, `struct regulator_state`, `struct notification_limit`, `struct regulation_constraints`, `struct regulator_consumer_supply`, `struct regulator_init_data`, `enum regulator_active_discharge`, `function regulator_has_full_constraints`, `function regulator_suspend_finish`.
- 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.