STRUCT BQ257XX_CHG(9)
struct bq257xx_chg(9) π
β¨ NAME β¨
From the Kernel API Manual, bestie: struct bq257xx_chg β driver data for charger. That's the whole vibe. It's the little struct that holds all the charger's main-character state π
πΈ SYNOPSIS πΈ
struct bq257xx_chg {
const struct bq257xx_chip_info *chip;
struct bq257xx_device *bq;
struct power_supply *charger;
bool online;
bool charging;
bool fast_charge;
bool pre_charge;
bool overvoltage;
bool ov_fault;
bool batoc_fault;
bool oc_fault;
int usb_type;
int supplied;
u32 iindpm_max;
u32 vbat_max;
u32 ichg_max;
u32 vsys_min;
};
π Members π
Okay so these are the fields, and every single one is iconic in its own way:
chipβ hw specific functions. The hardware-specific function pointers, aka the custom moves this chip family brings to the party πbqβ parent MFD device. The parent multifunction device, iykyk.chargerβ power supply device. The actual power supply device β the charger star of the show βonlineβ charger input is present. Aboolthat'struewhen charger input is present, like "we have power at the door" πͺchargingβ charger is actively charging the battery. Aboolfor "yup, it's actively charging the battery rn" πfast_chargeβ charger is in fast charge mode. Aboolfor fast charge mode β zoom zoom β‘pre_chargeβ charger is in pre-charge mode. Aboolfor pre-charge mode, the lil warm-up era π§overvoltageβ overvoltage fault detected. Aboolsaying an overvoltage fault was detected β red flag π©ov_faultβ charger reports over voltage fault. Aboolwhere the charger itself reports an over voltage fault. Slightly different vibe fromovervoltage, do not mix them up bestie πbatoc_faultβ charger reports battery over current fault. Aboolfor the charger reporting a battery over current fault.oc_faultβ charger reports over current fault. Aboolfor the charger reporting an over current fault.usb_typeβ USB type reported from parent power supply. Anintholding the USB type reported from the parent power supply.suppliedβ Status of parent power supply. Anintfor the status of the parent power supply.iindpm_maxβ maximum input current limit (uA). Au32, and the unit is uA, fr fr.vbat_maxβ maximum charge voltage (uV). Au32, measured in uV.ichg_maxβ maximum charge current (uA). Au32, measured in uA.vsys_minβ minimum system voltage (uV). Au32, measured in uV.
π¦ SEE ALSO π¦
Kernel file ./drivers/power/supply/bq257xx_charger.c β and here's the whole friend group, no cap:
struct bq257xx_chip_info(9)bq25792_read16(9)bq25792_write16(9)bq25703_get_state(9)bq25792_get_state(9)bq25703_get_min_vsys(9)bq25792_get_min_vsys(9)bq25703_set_min_vsys(9)bq25792_set_min_vsys(9)bq25703_get_cur(9)bq25792_get_cur(9)bq25703_get_ichg_cur(9)bq25792_get_ichg_cur(9)bq25703_set_ichg_cur(9)bq25792_set_ichg_cur(9)bq25703_get_chrg_volt(9)bq25792_get_chrg_volt(9)bq25703_set_chrg_volt(9)bq25792_set_chrg_volt(9)bq25703_get_iindpm(9)bq25792_get_iindpm(9)bq25703_set_iindpm(9)bq25792_set_iindpm(9)bq25703_get_vbat(9)bq25792_get_vbat(9)bq25703_hw_init(9)bq25792_hw_init(9)bq25703_hw_shutdown(9)bq25792_hw_shutdown(9)bq257xx_set_charger_property(9)bq257xx_get_charger_property(9)bq257xx_property_is_writeable(9)bq257xx_external_power_changed(9)bq257xx_irq_handler_thread(9)bq257xx_parse_dt(9)bq257xx_charger_probe(9)bq257xx_charger_shutdown(9)
And that's the page, bestie. Source/version is ./drivers/power/supply, dated October 2026 β periodt. π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms