bq25703_get_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– bq25703_get_state(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual (yes, that's the manual section this one lives in, we stay fancy) β€” this is the page for bq25703_get_state, which is literally the "what is my charger doing right now" function. get comfy 🫢


✨ NAME ✨

bq25703_get_state β€” Get the current state of the device.

like… the whole vibe check of the charger. πŸ’…


🌸 SYNOPSIS 🌸

int bq25703_get_state (struct bq257xx_chg *pdata );

πŸŽ€ ARGUMENTS πŸŽ€

  • pdata β€” driver platform data. it's the struct that holds all the charger's little secrets, you hand it over and the function reads from it πŸ¦‹

🌈 DESCRIPTION 🌈

okay so here's what it actually does, no cap:

Get the current state of the charger. 🫢

It checks three things, bestie:

  1. if the charger is powered ⚑
  2. what kind of charge state (if any) the device is in πŸ”‹
  3. if there are any active faults πŸ’€

that's the whole mission. it's giving "status report but make it silicon."


⭐ RETURN ⭐

Returns 0 on success, or error on failure to read device. 😭

so if you get 0 β€” slay, the read worked. anything else? the device wouldn't talk back, and that's a problem, not a personality trait.

πŸ‘‘ SEE ALSO πŸ‘‘

all the sibling functions, the whole friend group, periodt:


and that's the page!! πŸ’œ this little beauty lives in ./drivers/power/supply and it's dated October 2026 β€” so go forth, read your charger's state, and remember: reading the state is free, guessing is not. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from