include/linux/mfd/max8997.h
Source file repositories/reference/linux-study-clean/include/linux/mfd/max8997.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mfd/max8997.h- Extension
.h- Size
- 5331 bytes
- Lines
- 207
- 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.h
Detected Declarations
struct max8997_regulator_datastruct max8997_muic_reg_datastruct max8997_muic_platform_datastruct max8997_haptic_platform_datastruct max8997_led_platform_datastruct max8997_platform_dataenum max8997_regulatorsenum max8997_haptic_motor_typeenum max8997_haptic_pulse_modeenum max8997_haptic_pwm_divisorenum max8997_led_mode
Annotated Snippet
struct max8997_regulator_data {
int id;
struct regulator_init_data *initdata;
struct device_node *reg_node;
};
struct max8997_muic_reg_data {
u8 addr;
u8 data;
};
/**
* struct max8997_muic_platform_data
* @init_data: array of max8997_muic_reg_data
* used for initializing registers of MAX8997 MUIC device
* @num_init_data: array size of init_data
*/
struct max8997_muic_platform_data {
struct max8997_muic_reg_data *init_data;
int num_init_data;
/* Check cable state after certain delay */
int detcable_delay_ms;
/*
* Default usb/uart path whether UART/USB or AUX_UART/AUX_USB
* h/w path of COMP2/COMN1 on CONTROL1 register.
*/
int path_usb;
int path_uart;
};
enum max8997_haptic_motor_type {
MAX8997_HAPTIC_ERM,
MAX8997_HAPTIC_LRA,
};
enum max8997_haptic_pulse_mode {
MAX8997_EXTERNAL_MODE,
MAX8997_INTERNAL_MODE,
};
enum max8997_haptic_pwm_divisor {
MAX8997_PWM_DIVISOR_32,
MAX8997_PWM_DIVISOR_64,
MAX8997_PWM_DIVISOR_128,
MAX8997_PWM_DIVISOR_256,
};
/**
* max8997_haptic_platform_data
* @pwm_period: period in nano second for PWM device
* valid for MAX8997_EXTERNAL_MODE
* @type: motor type
* @mode: pulse mode
* MAX8997_EXTERNAL_MODE: external PWM device is used to control motor
* MAX8997_INTERNAL_MODE: internal pulse generator is used to control motor
* @pwm_divisor: divisor for external PWM device
* @internal_mode_pattern: internal mode pattern for internal mode
* [0 - 3]: valid pattern number
* @pattern_cycle: the number of cycles of the waveform
* for the internal mode pattern
* [0 - 15]: available cycles
* @pattern_signal_period: period of the waveform for the internal mode pattern
* [0 - 255]: available period
*/
struct max8997_haptic_platform_data {
unsigned int pwm_period;
enum max8997_haptic_motor_type type;
enum max8997_haptic_pulse_mode mode;
enum max8997_haptic_pwm_divisor pwm_divisor;
unsigned int internal_mode_pattern;
unsigned int pattern_cycle;
unsigned int pattern_signal_period;
};
enum max8997_led_mode {
MAX8997_NONE,
MAX8997_FLASH_MODE,
MAX8997_MOVIE_MODE,
MAX8997_FLASH_PIN_CONTROL_MODE,
MAX8997_MOVIE_PIN_CONTROL_MODE,
};
/**
* struct max8997_led_platform_data
* The number of LED devices for MAX8997 is two
* @mode: LED mode for each LED device
Annotation
- Immediate include surface: `linux/regulator/consumer.h`.
- Detected declarations: `struct max8997_regulator_data`, `struct max8997_muic_reg_data`, `struct max8997_muic_platform_data`, `struct max8997_haptic_platform_data`, `struct max8997_led_platform_data`, `struct max8997_platform_data`, `enum max8997_regulators`, `enum max8997_haptic_motor_type`, `enum max8997_haptic_pulse_mode`, `enum max8997_haptic_pwm_divisor`.
- 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.