enum bup_vch_sel {
BUP_VCH_SEL_2P5V,
BUP_VCH_SEL_2P6V,
BUP_VCH_SEL_2P8V,
BUP_VCH_SEL_3P1V, /* * Note that the following 5 values 2.7v, 2.9v, 3.0v, 3.2v, 3.3v * are only available on ab8540. You can't choose these 5 * voltage on ab8500/ab8505/ab9540.
*/
BUP_VCH_SEL_2P7V,
BUP_VCH_SEL_2P9V,
BUP_VCH_SEL_3P0V,
BUP_VCH_SEL_3P2V,
BUP_VCH_SEL_3P3V,
};
/** * struct ab8500_fg_parameters - Fuel gauge algorithm parameters, in seconds * if not specified * @recovery_sleep_timer: Time between measurements while recovering * @recovery_total_time: Total recovery time * @init_timer: Measurement interval during startup * @init_discard_time: Time we discard voltage measurement at startup * @init_total_time: Total init time during startup * @high_curr_time: Time current has to be high to go to recovery * @accu_charging: FG accumulation time while charging * @accu_high_curr_ua: FG accumulation time in high current mode * @high_curr_threshold_ua: High current threshold, in uA * @lowbat_threshold_uv: Low battery threshold, in uV * @battok_falling_th_sel0 Threshold in mV for battOk signal sel0 * Resolution in 50 mV step. * @battok_raising_th_sel1 Threshold in mV for battOk signal sel1 * Resolution in 50 mV step. * @user_cap_limit Capacity reported from user must be within this * limit to be considered as sane, in percentage * points. * @maint_thres This is the threshold where we stop reporting * battery full while in maintenance, in per cent * @pcut_enable: Enable power cut feature in ab8505 * @pcut_max_time: Max time threshold * @pcut_flag_time: Flagtime threshold * @pcut_max_restart: Max number of restarts * @pcut_debounce_time: Sets battery debounce time
*/ 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 { struct power_supply_battery_info *bi; int temp_now; int temp_interval_chg; int temp_interval_nochg; int main_safety_tmr_h; int usb_safety_tmr_h; int bkup_bat_v; int bkup_bat_i; bool capacity_scaling; bool chg_unknown_bat; bool enable_overshoot; bool auto_trig; int fg_res; int interval_charging; int interval_not_charging; int temp_hysteresis; conststruct ab8500_maxim_parameters *maxi; conststruct ab8500_bm_capacity_levels *cap_levels; conststruct ab8500_bm_charger_parameters *chg_params; conststruct ab8500_fg_parameters *fg_params;
};
/* Forward declaration */ struct ab8500_fg;
externstruct ab8500_bm_data ab8500_bm_data;
void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); struct ab8500_fg *ab8500_fg_get(void); int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev); int ab8500_fg_inst_curr_start(struct ab8500_fg *di); int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res); int ab8500_fg_inst_curr_started(struct ab8500_fg *di); int ab8500_fg_inst_curr_done(struct ab8500_fg *di); int ab8500_bm_of_probe(struct power_supply *psy, struct ab8500_bm_data *bm); void ab8500_bm_of_remove(struct power_supply *psy, struct ab8500_bm_data *bm);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.