lwmi_acpi_match(9)
πΈ lwmi_acpi_match β bestie edition πΈ
okay so this is lwmi_acpi_match from section 9 of the Kernel API Manual, and honestly? it's giving tiny-but-important. it's a little ACPI callback that tries to hand you back the ideapad acpi handle π
β¨ SYNOPSIS β¨
acpi_status lwmi_acpi_match (acpi_handle handle , u32 lvl , void *context , void **retval );
like, four args, and no cap, two of them are just vibing there doing nothing π
π«Ά ARGUMENTS π«Ά
handleβ the ACPI handle that manages battery charging. this is the main character of the whole function fr πlvlβ unused. not me showing up to the group chat just to say nothing πcontextβ avoidpointer to theacpi_handleobject that you want to get back out. this is where the good stuff goes πretvalβ unused. again. iconic of it, honestly β¨
π DESCRIPTION π
so here's the tea β β first it checks whether the ideapad_laptop driver is going to manage charge_type. and if it's not? then it hooks the battery to our WMI methods instead. slay π
basically it's a vibe check on who gets to own the battery charging, and if ideapad_laptop says "not me", lwmi_acpi_match steps in. periodt π₯
β RETURN β
AE_CTRL_TERMINATEβ if found βAE_OKβ if not found π¦
that's it, that's the whole return situation. short and sweet, iykyk π
π SEE ALSO π
the kernel file lives at:
./drivers/platform/x86/lenovo/wmi-other.c
and here's the whole friend group π β go say hi:
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_remove_battery(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)
ngl the whole fam is in ./drivers/platform/x86/lenovo, so if you get lost just go back to that directory bestie π§π
and that's the page!! π written under the ./drivers/platform/x86/lenovo banner, October 2026 edition, 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