thc_dev_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… thc_dev_init(9) β€” like, the whole glow-up ✨

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” this is the page for thc_dev_init(9), and honestly it's giving "main character origin story" because literally everything else on this page depends on this one working first. no pressure or anything πŸ’€


✨ NAME ✨

thc_dev_init β€” allocate and initialize the THC device structure πŸ’– (yes, both. she does it all.)


🌸 SYNOPSIS 🌸

struct thc_device * thc_dev_init (struct device *device , void __iomem
*mem_addr );

like, that's the whole signature. two args in, one pointer out 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • device β€” the pointer of device structure. yep, that's the struct, hand her the pointer and off she goes ✨
  • mem_addr β€” the pointer of MMIO memory address. this one's the void __iomem *, so it's lowkey special β€” memory-mapped I/O energy πŸ’…

πŸ”₯ RETURN πŸ”₯

  • πŸ‘‘ the thc_device pointer on success
  • 😭 NULL on failed

that's it. that's the vibe check. if you get NULL back, she did not slay, and you should probably not keep going.


🌈 SEE ALSO 🌈

the kernel file this lives in (iykyk):

  • ./drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c

and the whole friend group β€” every single one, no cap, in order:

ngl bestie, if you're here you're probably about to read like twenty-five more of these. hydrate. stretch. you got this πŸ“

so yeah 🧚 that's the page. footer says October 2026 and the source line is ./drivers/hid/intel-thc-hid/in... (truncated in the original, not me being lazy, I promise πŸ™ˆ). going out with a thc_dev_init(9) flourish β€” mwah πŸ’œ

πŸ“¦ where this page comes from