bq25703_get_state(9)
π 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:
- if the charger is powered β‘
- what kind of charge state (if any) the device is in π
- 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:
- the kernel file:
./drivers/power/supply/bq257xx_charger.cπ§ struct bq257xx_chip_info(9)struct bq257xx_chg(9)bq25792_read16(9)bq25792_write16(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!! π 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
- 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