lwmi_cd_component_bind(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lwmi_cd_component_bind β€” bestie's guide to the kernel API manual πŸ’…

okay so this whole page is about one function, and it's lwmi_cd_component_bind, and it lives in the kernel API manual. yes, the kernel. we're doing this. πŸŽ€


✨ NAME ✨

lwmi_cd_component_bind β€” literally just binds a component to the master device. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

int lwmi_cd_component_bind (struct device *cd_dev , struct device
*om_dev , void *data );

three args, returns an int. no cap. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • cd_dev β€” pointer to the lenovo-wmi-capdata driver parent device. that's the capdata one, bestie, keep them straight 🫢
  • om_dev β€” pointer to the lenovo-wmi-other driver parent device. yes there's an "other" one too 😭
  • data β€” an lwmi_cd_binder object pointer, and its whole job is to return the capability data back to you. it's giving delivery service ✨

πŸ’– DESCRIPTION πŸ’–

so when lenovo-wmi-other's master does its bind, this is what hands over a pointer to the local capdata list. iconic behavior honestly πŸ‘‘

and what's that pointer for? it's used to call lwmi_cd*_get_data so you can look up attribute data from the lenovo-wmi-other driver. that's the whole plot. 🌈

also β€” if cd_dev happens to be a sub-master, it tries to call the master callback. note the "tries", it's not out here making promises πŸ™ˆ


⭐ RETURN ⭐

0

that's it. that's the return value. zero. slay. πŸŽ‰


πŸ¦‹ SEE ALSO πŸ¦‹

first up, the kernel file itself:

  • Kernel file ./drivers/platform/x86/lenovo/wmi-capdata.c

and then, like, the entire extended friend group πŸ’€ (they all showed up to the function, no one was left out):

periodt. πŸ’œ


ngl, that see-also list is a whole friend group chat and you're now in it. πŸ“

and that's the page!! 🧚 this little beauty came from ./drivers/platform/x86/lenovo and it's dated October 2026, so yeah, future vibes only ⭐ mwah, go read the source πŸ’‹

πŸ“¦ where this page comes from