STRUCT BQ256XX_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct bq256xx_state(9) β€” a Kernel API Manual moment

okay so real talk, we're in the Kernel API Manual bestie, and this page is literally about struct bq256xx_state. yes that's the whole name. the NAME section is blank. no description. nothing. it's giving mysterious main character energy and honestly? we respect it. πŸŽ€


✨ NAME ✨

struct bq256xx_state β€” and that's it. that's the name. the description slot is lowkey empty, no cap. moving on before we cry 😭


✨ SYNOPSIS ✨

here's the whole vibe, copy-pasted exactly because we do NOT play with struct definitions:

struct bq256xx_state {
    u8 vbus_stat;
    u8 chrg_stat;
    bool online;
    u8 wdt_fault;
    u8 bat_fault;
    u8 chrg_fault;
    u8 ntc_fault;
 };

seven little fields. that's the whole struct. she's compact, she's iconic, she's the state of your BQ256xx charger. πŸ‘‘


✨ Members ✨

okay so here's the group chat roster of every field, and what each one means β€” keep these names EXACT, they're load-bearing 🫢

  • vbus_stat β€” the VBUS status, decoded according to BQ256XX_CHARGER_STATUS_0. that's the port power situation.
  • chrg_stat β€” the charging status, also according to BQ256XX_CHARGER_STATUS_0. how's the charge going? this tells you.
  • online β€” the PG status per BQ256XX_CHARGER_STATUS_0. it's a bool, so like… yes or no, are we plugged in and good. πŸ¦‹
  • wdt_fault β€” watch out, watchdog fault! this one comes from BQ256XX_CHARGER_STATUS_1.
  • bat_fault β€” battery fault, per BQ256XX_CHARGER_STATUS_1. something's up with the battery, not slay.
  • chrg_fault β€” charging fault, again from BQ256XX_CHARGER_STATUS_1. the charging is not charging.
  • ntc_fault β€” the TS fault, according to BQ256XX_CHARGER_STATUS_1. TS = the temperature-sense situation, and this field is telling you it's faulted.
ngl bestie, all four fault fields (wdt_fault, bat_fault, chrg_fault, ntc_fault) are just "is this broken?" flags, and they all vibe off BQ256XX_CHARGER_STATUS_1. the first three fields vibe off BQ256XX_CHARGER_STATUS_0. iykyk πŸ’…

✨ SEE ALSO ✨

go read these next, fr fr β€” kernel file ./drivers/power/supply/bq256xx_charger.c, plus these structs:

  • struct bq256xx_init_data(9)
  • struct bq256xx_device(9)
  • struct bq256xx_chip_info(9)

🌸 ok bye ily, this page lives in ./drivers/power/supply and it's stamped October 2026, brought to you by the struct bq256xx_state(9) girls. go read the charger source, it ate. periodt πŸ’–βœ¨

πŸ“¦ where this page comes from