charger_man...ister_extcon(9)
π NAME π
charger_manager_register_extcon β bestie, this is the glow-up function that registers an extcon device so the kernel can actually hear what your charger cable is going through π
β¨ SYNOPSIS β¨
int charger_manager_register_extcon (struct charger_manager *cm );
π«Ά ARGUMENTS π«Ά
cmβ the Charger Manager that's out here representing the battery, main character energy fr π
πΈ DESCRIPTION πΈ
okay so this function is literally the extcon liaison, no cap. It supports the EXTCON (External Connector) subsystem so we can detect the state of charger cables β the whole point being to enable or disable the charger (regulator) π₯
and like, on top of that, it also picks which charger cable gets to actually do the charging when there's a whole squad of external cables in the mix β chosen according to the policy of the H/W board, iykyk π¦
so yeah. cable detection, charger on/off, cable selection by board policy. iconic behaviour honestly π
π SEE ALSO π
Kernel file ./drivers/power/supply/charger-manager.c is out here tagging along with the whole friend group:
is_batt_present(9)is_ext_pwr_online(9)get_batt_uV(9)is_charging(9)is_full_charged(9)is_polling_required(9)try_charger_enable(9)check_charging_duration(9)cm_get_target_status(9)_cm_monitor(9)cm_monitor(9)_setup_polling(9)cm_monitor_poller(9)cm_setup_timer(9)charger_extcon_work(9)charger_extcon_notifier(9)charger_extcon_init(9)charger_manager_prepare_sysfs(9)
and that's the tea, bestie π this one lives in ./drivers/power/supply, dated October 2026 β go off, kernel docs, periodt π
β¨
π¦ 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