STRUCT ADIS_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

struct adis_ops β€” custom ops for adis devices. bestie, this is where you get to hand the driver its own little toolbox of functions instead of letting the library do everything for you ✨


✨ SYNOPSIS

struct adis_ops {
    int (*write)(struct adis *adis, unsigned int reg, unsigned int value, unsigned int size);
    int (*read)(struct adis *adis, unsigned int reg, unsigned int *value, unsigned int size);
    int (*reset)(struct adis *adis);
 };

okay so it's literally just three function pointers in a struct and honestly? iconic. lowkey a whole vibe for a kernel API 🌸


πŸŽ€ Members

  • write β€” your very own custom spi write implementation. like, you write the write. main character energy fr πŸ’–
  • read β€” your custom spi read implementation. yes, same deal, but reading this time πŸ¦‹
  • reset β€” your custom sw reset implementation. and here's the tea: the custom implementation does not need to sleep after the reset β€” the library already handles that for you, so don't you dare add your own nap time 😴✨
ngl the reset one is the important detail: you're off the hook for the post-reset sleep. the library's got it. periodt.

🌈 SEE ALSO

kernel file ./include/linux/iio/imu/adis.h, plus all these icons, no cap:

struct adis_data(9), struct adis(9), adis_reset(9), __adis_write_reg_8(9), __adis_write_reg_16(9), __adis_write_reg_32(9), __adis_read_reg_16(9), __adis_read_reg_32(9), adis_write_reg(9), adis_read_reg(9), adis_write_reg_8(9), adis_write_reg_16(9), adis_write_reg_32(9), adis_read_reg_16(9), adis_read_reg_32(9), adis_update_bits_base(9), adis_update_bits(9)


okay that's the whole page, you're so welcome 🫢 this one lives over in ./include/linux/iio/imu and the version vibes say October 2026 β€” go forth and write your ops, bestie πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from