try_charger_enable(9)
π try_charger_enable β Kernel API Manual energy β¨
Okay bestie, welcome to the try_charger_enable(9) page from the Kernel API Manual. It's giving charger-control central, and we're keeping every deet intact. π
πΈ NAME πΈ
try_charger_enable β Enable/Disable chargers altogether. Periodt. π
β¨ SYNOPSIS β¨
int try_charger_enable (struct charger_manager *cm , bool enable );
π«Ά ARGUMENTS π«Ά
cmβ the Charger Manager representing the battery. main character struct, honestly. πenableβtrue: enable /false: disable. binary queen behavior. β¨
π DESCRIPTION π
Okay so here's the vibe check: Charger Manager keeps the charger enabled regardless of whether the charger is charging or not β and yes, that includes when the battery is full or no external power source exists. It just stays enabled. No cap. π«Ά
The exception? CM only disables chargers forcibly when emergency causes hit β specifically when the battery is overheated or too cold. That's the forcible-disable moment, bestie. π₯΅π₯Ά
π¦ SEE ALSO π¦
Kernel file ./drivers/power/supply/charger-manager.c is where this lives, and the whole friend group is:
is_batt_present(9)is_ext_pwr_online(9)get_batt_uV(9)is_charging(9)is_full_charged(9)is_polling_required(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_register_extcon(9)charger_manager_prepare_sysfs(9)
Cute lil sign-off: this page's source/version footer energy is ./drivers/power/supply, October 2026, and try_charger_enable(9). Slay, go read the kernel, 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