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.

Dependency Surface

Detected Declarations

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

Implementation Notes