STRUCT W1_THERM_FAMILY_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct w1_therm_family_data(9) β€” device data, but make it make sense

okay bestie, welcome to the Kernel API Manual ✨ today's main character is struct w1_therm_family_data, which is literally just a little bundle of device data for the w1_therm world. it's giving ✨scratchpad-core✨ and honestly? we're obsessed 🫢


🌸 NAME 🌸

struct w1_therm_family_data β€” device data πŸ’– (yes that's it, that's the whole vibe)


✨ SYNOPSIS ✨

here's the actual shape of it, no cap, copy it exactly:

struct w1_therm_family_data {
    uint8_t rom[9];
    atomic_t refcnt;
    int external_powered;
    int resolution;
    int convert_triggered;
    int conv_time_override;
    unsigned int features;
    struct w1_therm_family_converter *specific_functions;
 };

πŸŽ€ Members πŸŽ€

okay so every field gets its own little moment πŸ‘‘

  • rom β€” the ROM device id πŸ†” (that's the 64bit Lasered ROM code plus 1 CRC byte, so nine whole bytes of identity, slay)
  • refcnt β€” the ref count πŸ”’ literally what it says
  • external_powered β€” power situation check ⚑ 1 = device powered externally, 0 = device parasite powered, -x = error or undefined (😭 so if you see a negative, bestie, something is not okay)
  • resolution β€” the current device resolution 🎚️
  • convert_triggered β€” conversion state of the device πŸ”₯
  • conv_time_override β€” user selected conversion time, or CONV_TIME_DEFAULT ⏱️
  • features β€” bit mask 🌈 β€” enable temperature validity check, poll for completion
  • specific_functions β€” pointer to struct of device specific function πŸ‘‰πŸ«Ά

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, fr fr πŸ’œ β€” starting with the kernel file ./drivers/w1/slaves/w1_therm.c:


ngl this whole page has zero drama and 100% struct energy β€” but that's kind of iconic in its own way πŸ˜ŒπŸ’…

okay that's the whole page, bye bestie πŸ’–βœ¨ this cutie lives in ./drivers/w1/slaves and the manual is dated October 2026, signed off as struct w1_therm_family_data(9) β€” periodt πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from