STRUCT SLF3S_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct slf3s_data β€” per-device state πŸ’–

okay so bestie, welcome to the struct slf3s_data page from the Kernel API Manual ✨ this is the little per-device state bundle that keeps track of, like, everything one SLF3S chip needs to remember about itself. it's giving "main character energy" but for a single I2C device 🫢


✨ SYNOPSIS ✨

struct slf3s_data {
    struct i2c_client *client;
    struct regulator *vdd;
    const struct slf3s_variant *variant;
    enum slf3s_medium medium;
    struct mutex lock;
    u8 crc_table[CRC8_TABLE_SIZE];
 };

no cap, that's the whole struct πŸ’… copy it exactly, don't go "fixing" the indentation, the compiler does not care about your aesthetic ✨


πŸŽ€ Members πŸŽ€

  • client β€” the I2C client this instance is bound to πŸ”₯ like, the actual connection this whole vibe is attached to.
  • vdd β€” the supply regulator, and it's disabled while suspended 😴 so yeah, it goes to sleep when the system does.
  • variant β€” a pointer into slf3s_variants for the detected device πŸ‘‘ iykyk, it's the "which chip are we even talking to" pointer.
  • medium β€” the currently active calibration medium πŸ§ͺ literally the current calibration vibe.
  • lock β€” a mutex that serialises the multi-step command/response exchanges πŸ”’ because those exchanges are a whole conversation and you canNOT have two people talking at once, periodt.
  • crc_table β€” the pre-computed CRC-8 lookup table for SLF3S_CRC8_POLY 🌈 already calculated, already iconic, no runtime math needed.

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/iio/flow/slf3s.c β€” go read the source, bestie, it's right there πŸ™ˆ
  • struct slf3s_variant(9) β€” the variant page, obviously πŸ’œ

and that's the whole page, bestie πŸŽ€ this one came from ./drivers/iio/flow and it's dated October 2026 β€” slay, go forth and reference structs responsibly πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from