STRUCT AD7150_CHIP_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct ad7150_chip_info(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual entry for struct ad7150_chip_info β€” literally the pod of data that holds all the instance-specific chip tea for the AD7150. it's giving "every chip needs its own little diary" energy and honestly? iconic. πŸŽ€


✨ NAME ✨

struct ad7150_chip_info β€” instance specific chip data 🫢

so like, the struct itself is the main character here. it stores everything that's specific to one instance of this chip. no cap.


🌸 SYNOPSIS 🌸

struct ad7150_chip_info {
    struct i2c_client *client;
    u16 threshold[2][2];
    u8 thresh_sensitivity[2][2];
    u8 thresh_timeout[2][2];
    struct mutex state_lock;
    int interrupts[2];
    bool int_enabled[2];
    enum iio_event_type type;
    enum iio_event_direction dir;
 };

like, look at her. the arrangement. the brackets. she ate. πŸ’…


πŸ¦‹ Members πŸ¦‹

here's the member-by-member breakdown, bestie, because every single one of these little fields matters and i refuse to skip a single one:

  • client β€” the i2c client for this device. that's her ride. that's who she talks to. πŸš—
  • threshold β€” the thresholds for the simple capacitance value events.
  • thresh_sensitivity β€” the threshold for simple capacitance offset from the 'average' value. keeping it in its lane, basically.
  • thresh_timeout β€” a timeout, in samples, counting from the moment an adaptive threshold event occurs to when the average value jumps to the current value. and ngl, the layout is a little puzzle box, so listen up:
    • bits 3:0 β€” timeout receding β€” applies if below the lower threshold
    • bits 7:4 β€” timeout approaching β€” applies if above the upper threshold

yes, it's made up of two fields. yes, it's that girl. 😭

  • state_lock β€” a mutex that makes sure this structure's state stays consistent w.r.t. the hardware. the literal bodyguard of the struct. πŸ›‘οΈ
  • interrupts β€” one or two interrupt numbers, depending on the device type.
  • int_enabled β€” is a given interrupt currently enabled. straight up yes/no vibes. ✨
  • type β€” threshold type.
  • dir β€” threshold direction. which way are we going? nobody knows (the struct knows). πŸ’«

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/iio/cdc/ad7150.c β€” go read it, bestie, it's right there πŸ“

and that's the whole vibe check, bestie β€” Kernel API Manual, ./drivers/iio/cdc, dated October 2026, page struct ad7150_chip_info(9). mwah. πŸ’‹ slay ✨

πŸ“¦ where this page comes from