drivers/power/supply/ab8500-bm.h
Source file repositories/reference/linux-study-clean/drivers/power/supply/ab8500-bm.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/power/supply/ab8500-bm.h- Extension
.h- Size
- 12858 bytes
- Lines
- 428
- Domain
- Driver Families
- Bucket
- drivers/power
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.h
Detected Declarations
struct ab8500_fgstruct ab8500_fg_parametersstruct ab8500_maxim_parametersstruct ab8500_bm_capacity_levelsstruct ab8500_bm_charger_parametersstruct ab8500_bm_datastruct ab8500_fgenum bup_vch_sel
Annotated Snippet
struct ab8500_fg_parameters {
int recovery_sleep_timer;
int recovery_total_time;
int init_timer;
int init_discard_time;
int init_total_time;
int high_curr_time;
int accu_charging;
int accu_high_curr;
int high_curr_threshold_ua;
int lowbat_threshold_uv;
int battok_falling_th_sel0;
int battok_raising_th_sel1;
int user_cap_limit;
int maint_thres;
bool pcut_enable;
u8 pcut_max_time;
u8 pcut_flag_time;
u8 pcut_max_restart;
u8 pcut_debounce_time;
};
/**
* struct ab8500_charger_maximization - struct used by the board config.
* @use_maxi: Enable maximization for this battery type
* @maxi_chg_curr_ua: Maximum charger current allowed in microampere
* @maxi_wait_cycles: cycles to wait before setting charger current
* @charger_curr_step_ua: delta between two charger current settings (uA)
*/
struct ab8500_maxim_parameters {
bool ena_maxi;
int chg_curr_ua;
int wait_cycles;
int charger_curr_step_ua;
};
/**
* struct ab8500_bm_capacity_levels - ab8500 capacity level data
* @critical: critical capacity level in percent
* @low: low capacity level in percent
* @normal: normal capacity level in percent
* @high: high capacity level in percent
* @full: full capacity level in percent
*/
struct ab8500_bm_capacity_levels {
int critical;
int low;
int normal;
int high;
int full;
};
/**
* struct ab8500_bm_charger_parameters - Charger specific parameters
* @usb_volt_max_uv: maximum allowed USB charger voltage in uV
* @usb_curr_max_ua: maximum allowed USB charger current in uA
* @ac_volt_max_uv: maximum allowed AC charger voltage in uV
* @ac_curr_max_ua: maximum allowed AC charger current in uA
*/
struct ab8500_bm_charger_parameters {
int usb_volt_max_uv;
int usb_curr_max_ua;
int ac_volt_max_uv;
int ac_curr_max_ua;
};
/**
* struct ab8500_bm_data - ab8500 battery management data
* @bi battery info from device tree
* @temp_now present battery temperature
* @temp_interval_chg temperature measurement interval in s when charging
* @temp_interval_nochg temperature measurement interval in s when not charging
* @main_safety_tmr_h safety timer for main charger
* @usb_safety_tmr_h safety timer for usb charger
* @bkup_bat_v voltage which we charge the backup battery with
* @bkup_bat_i current which we charge the backup battery with
* @capacity_scaling indicates whether capacity scaling is to be used
* @chg_unknown_bat flag to enable charging of unknown batteries
* @enable_overshoot flag to enable VBAT overshoot control
* @auto_trig flag to enable auto adc trigger
* @fg_res resistance of FG resistor in 0.1mOhm
* @interval_charging charge alg cycle period time when charging (sec)
* @interval_not_charging charge alg cycle period time when not charging (sec)
* @temp_hysteresis temperature hysteresis
* @maxi maximization parameters
* @cap_levels capacity in percent for the different capacity levels
* @chg_params charger parameters
* @fg_params fuel gauge parameters
*/
struct ab8500_bm_data {
Annotation
- Immediate include surface: `linux/kernel.h`.
- Detected declarations: `struct ab8500_fg`, `struct ab8500_fg_parameters`, `struct ab8500_maxim_parameters`, `struct ab8500_bm_capacity_levels`, `struct ab8500_bm_charger_parameters`, `struct ab8500_bm_data`, `struct ab8500_fg`, `enum bup_vch_sel`.
- Atlas domain: Driver Families / drivers/power.
- 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.