STRUCT W1_FAMILY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct w1_family(9) β€” the Kernel API Manual, but make it a group chat

okay so bestie, welcome to struct w1_family from the Kernel API Manual ✨ this is literally the reference counted family structure β€” say that five times fast. it's giving "small struct, big responsibilities" and honestly? we're obsessed. πŸŽ€


✨ NAME ✨

struct w1_family β€” reference counted family structure. that's it, that's the whole vibe. πŸ‘‘


🌸 SYNOPSIS 🌸

struct w1_family {
    struct list_head        family_entry;
    u8 fid;
    const struct w1_family_ops *fops;
    const struct of_device_id *of_match_table;
    atomic_t refcnt;
 };

look at her. five fields. no notes. πŸ’…


πŸ¦‹ Members πŸ¦‹

here's the member-by-member breakdown, no cap:

  • family_entry β€” the family linked list. it's literally how this family hangs out with all the other families. main character in the list, honestly. πŸ”₯
  • fid β€” an 8 bit family identifier. eight whole bits. so tiny, so iconic. πŸ“
  • fops β€” the operations for this family. this is where the ✨functionality✨ lives, bestie. πŸ’–
  • of_match_table β€” the open firmware match table. yes, "open firmware," not "OF" like the slang β€” stay focused. 🌈
  • refcnt β€” the reference counter. it's an atomic_t, so it's keeping track of who's holding on and how many. extremely responsible of her. 🫢
⭐ reminder: refcnt is atomic_t, so like... don't go doing non-atomic shenanigans with it, iykyk.

πŸ’€ SEE ALSO πŸ’€

  • Kernel file ./include/linux/w1.h
  • struct w1_reg_num(9)
  • struct w1_slave(9)
  • struct w1_bus_master(9)
  • enum w1_master_flags(9)
  • struct w1_master(9)
  • struct w1_family_ops(9)
  • module_w1_family(9)

go read those too, bestie, they're all part of the same friend group πŸ’…βœ¨


and that's the whole page! πŸŽ€ brought to you straight out of ./include/linux, dated October 2026 β€” so yeah, future energy, but make it kernel. stay slay, read your headers, and remember: every family needs a refcnt. periodt. πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from