bq257xx_exte...ower_changed(9)
π bq257xx_external_power_changed(9) β like, the Kernel API Manual page you actually wanna read
okay so bestie, you're in the Kernel API Manual and this is the page for bq257xx_external_power_changed(9). it's a handler. for external power changes. the whole vibe is "something got plugged in or unplugged, time to freak out (professionally)". let's go β¨
πΈ NAME πΈ
bq257xx_external_power_changed β Handler for external power change π«Ά
π SYNOPSIS π
void bq257xx_external_power_changed (struct power_supply *psy );
like literally that's it. void return, one argument, no drama (well, a little drama, see below) π
π¦ ARGUMENTS π¦
psyβ Power supply data. that's the whole description, she's succinct, we respect it π
π DESCRIPTION π
okay so here's the tea, and it's actually important tea, not gossip tea β
When the external power going into the charger changes, this handler checks the USB type so it can be, y'know, reported. that's step one, that's the vibe check. π
Then it updates the max input current and the max charging current to the value that got reported β but only if the thing is a USB PD charger. If it's not? default value, no cap, we move on. β¨
β οΈ and now the part you CANNOT skip, bestie, because this one bites: every single time a charger is removed, the max charge current register is erased. gone. wiped. π so it must be set again each time the input changes β otherwise the device will not charge. not "might not". will not. set the register, or your battery stays at zero and you're stuck at 1% looking like a clown π
π₯ SEE ALSO π₯
the whole friend group shows up for this one, so let's give them their moment π«Ά
Kernel file ./drivers/power/supply/bq257xx_charger.c β that's the home base, the main character file:
- struct
bq257xx_chip_info(9) - struct
bq257xx_chg(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_irq_handler_thread(9)bq257xx_parse_dt(9)bq257xx_charger_probe(9)bq257xx_charger_shutdown(9)
and that's the page!! π written from ./drivers/power/supply, dated October 2026, and yeah, the header really does abbreviate it to bq257xx_exte...ower_changed(9) β she got cut off in the middle of her own name and honestly? iconic. slay, truncated queen πβ¨π
π¦ 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