tb_nvm_add_active(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tb_nvm_add_active(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this one's a (9) section page, which means it's kernel-internals territory. it's literally about plugging a shiny new active NVMem device into your Thunderbolt NVM and honestly? iconic. ✨


πŸ¦‹ NAME πŸ¦‹

tb_nvm_add_active β€” Adds active NVMem device to NVM

like, the whole personality of this function is right there in the name, no cap πŸ’…


🌸 SYNOPSIS 🌸

int tb_nvm_add_active (struct tb_nvm *nvm , nvmem_reg_read_t reg_read );

that's the whole vibe check right there 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • nvm β€” the NVM structure. your main character struct, the whole reason we're here πŸ’–
  • reg_read β€” Pointer to the function to read the NVM (passed directly to the NVMem device). it gets handed straight over to the NVMem device, so it's living its best life on the other side 😭

✨ DESCRIPTION ✨

Registers new active NVmem device for nvm. πŸŽ‰

so here's the tea: reg_read is called directly from NVMem, which means it is fully on its own out there β€” it must handle possible concurrent access if needed. no hand-holding, no safety net, it's giving independent woman energy πŸ‘‘

and just so you know, the first parameter passed to reg_read is the nvm structure. cute, right? that's the little detail you don't wanna forget πŸ™ˆ


πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸ₯³
  • negative errno otherwise πŸ’€

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/thunderbolt/nvm.c and the rest of the squad:

go read them all, i'll wait πŸ’…


and that's the page bestie!! this one came out of ./drivers/thunderbolt back in October 2026 β€” go forth and register those active NVMem devices responsibly πŸ§šβ€β™€οΈβ­πŸ’–

πŸ“¦ where this page comes from