lwmi_remove_battery(9)
π lwmi_remove_battery(9) β from the Kernel API Manual, bestie π
okay so picture this: we're deep in the kernel docs, specifically the lwmi_remove_battery(9) page, and I'm gonna walk you through it like we're on FaceTime at 2am. it's short, it's sweet, it ate, periodt. β¨
β¨ NAME β¨
lwmi_remove_battery β the one that disconnects the power_supply_ext π«Ά
like, it's literally the "we're done here, unplug the vibe" function. no cap.
πΈ SYNOPSIS πΈ
int lwmi_remove_battery (struct power_supply *battery , struct
acpi_battery_hook *hook );
so it takes two things and gives you back an int. classic. π
π¦ ARGUMENTS π¦
batteryβ the battery that was extended. yes, that one, the main character battery πhookβ the driver hook used to extend the battery. it's the little helper that did the extending, and now it's time to say bye π₯Ί
β RETURN β
0 on success, or an error. that's it, that's the whole deal. if you get 0, slay π. if you get an error, well... π at least you know.
π₯ SEE ALSO π₯
so many friends in the group chat, I'm obsessed:
- the kernel file
./drivers/platform/x86/lenovo/wmi-other.cβ go read it, iykyk π lwmi_om_fan_get_set(9)lwmi_om_hwmon_is_visible(9)lwmi_om_hwmon_read(9)lwmi_om_hwmon_write(9)lwmi_om_hwmon_add(9)lwmi_om_hwmon_remove(9)lwmi_om_fan_info_init(9)lwmi_om_fan_info_collect_cd00(9)lwmi_om_fan_info_collect_cd_fan(9)lwmi_psy_ext_get_prop(9)lwmi_psy_ext_set_prop(9)lwmi_psy_prop_is_supported(9)lwmi_psy_prop_is_writeable(9)lwmi_add_battery(9)lwmi_acpi_match(9)lwmi_om_psy_ext_init(9)lwmi_om_psy_remove(9)tunable_attr_01_id(9)int_type_show(9)attr_capdata01_show(9)attr_current_value_store(9)attr_current_value_show(9)lwmi_attr_01_is_supported(9)lwmi_om_fw_attr_add(9)lwmi_om_fw_attr_remove(9)lwmi_om_master_bind(9)lwmi_om_master_unbind(9)
π«Ά reminder bestie: this page is a(9)section manpage, so it's kernel API territory β not your normal everydaymanpage. treat it with the respect it deserves (which is a lot, honestly π).
and that's the page!! π this little cutie came out of the tree at ./drivers/platform/x86/lenovo, dated October 2026, and it lives in the Kernel API Manual. bye bestie, go disconnect some power_supply_ext responsibly ππ
β¨
π¦ 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