lwmi_acpi_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 β€” a void pointer to the acpi_handle object 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:


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