STRUCT BQ257XX_CHG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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. A bool that's true when charger input is present, like "we have power at the door" πŸšͺ
  • charging β€” charger is actively charging the battery. A bool for "yup, it's actively charging the battery rn" πŸ”‹
  • fast_charge β€” charger is in fast charge mode. A bool for fast charge mode β€” zoom zoom ⚑
  • pre_charge β€” charger is in pre-charge mode. A bool for pre-charge mode, the lil warm-up era 🧚
  • overvoltage β€” overvoltage fault detected. A bool saying an overvoltage fault was detected β€” red flag 🚩
  • ov_fault β€” charger reports over voltage fault. A bool where the charger itself reports an over voltage fault. Slightly different vibe from overvoltage, do not mix them up bestie 😭
  • batoc_fault β€” charger reports battery over current fault. A bool for the charger reporting a battery over current fault.
  • oc_fault β€” charger reports over current fault. A bool for the charger reporting an over current fault.
  • usb_type β€” USB type reported from parent power supply. An int holding the USB type reported from the parent power supply.
  • supplied β€” Status of parent power supply. An int for the status of the parent power supply.
  • iindpm_max β€” maximum input current limit (uA). A u32, and the unit is uA, fr fr.
  • vbat_max β€” maximum charge voltage (uV). A u32, measured in uV.
  • ichg_max β€” maximum charge current (uA). A u32, measured in uA.
  • vsys_min β€” minimum system voltage (uV). A u32, measured in uV.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/power/supply/bq257xx_charger.c β€” and here's the whole friend group, no cap:


And that's the page, bestie. Source/version is ./drivers/power/supply, dated October 2026 β€” periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from