attr_capdata01_show(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… attr_capdata01_show(9) β€” kernel API manual, but make it make sense

okay so bestie, welcome to attr_capdata01_show(9) πŸ’– this is a page from the Kernel API Manual and honestly? it's a little guy with a big job. it reads out one property of an attribute and hands it back to you as text. let's get into it ✨


πŸŽ€ NAME πŸŽ€

attr_capdata01_show β€” get the value of the specified attribute property. that's it, that's the whole vibe 🫢


🌸 SYNOPSIS 🌸

ssize_t attr_capdata01_show (struct kobject *kobj , struct
kobj_attribute *kattr , char *buf , struct tunable_attr_01 *tunable_attr
, enum attribute_property prop );

look at that signature, it's giving main character energy πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • kobj β€” pointer to the driver object. your driver's little home base 🏠
  • kattr β€” pointer to the attribute calling this function. the one who knocked on the door πŸ’…
  • buf β€” the buffer to write to. this is where the tea gets poured β˜•
  • tunable_attr β€” the attribute to be read. the actual thing you're curious about πŸ‘€
  • prop β€” the property of this attribute to be read. like, which specific detail of it 🌈

⭐ DESCRIPTION ⭐

so what does it DO. it retrieves the given property from the capability data 01 struct, for the specified attribute's "custom" thermal mode πŸ”₯ (yes, "custom" is in quotes, that's their naming, not mine, quote it exactly bestie).

the whole point? this function is intended to be generic, so literally any integer attribute's "_show" function can call it. one function, infinite callers. iconic, honestly πŸ’€βœ¨

and if the WMI is success, the sysfs attribute is notified πŸ“£ β€” that's a real detail, keep it in your heart.


πŸ’œ RETURN πŸ’œ

either the number of characters written to buf, or an error code. two outcomes, one function, no in-between 😭


🌈 SEE ALSO 🌈

okay this list is LONG and we respect her for it. the kernel file lives at ./drivers/platform/x86/lenovo/wmi-other.c πŸ“ and here's everyone else in the group chat:


ngl bestie, that's twenty-eight references and every single one of them is staying in this page. no cap. don't come for me about trimming the list πŸ’€

and that's the page!! πŸŽ€ the path is ./drivers/platform/x86/lenovo, the version is October 2026, and it's all filed under attr_capdata01_show(9) β€” go forth and read those properties, you absolute icon πŸ‘‘πŸ’–βœ¨

πŸ“¦ where this page comes from