adis_read_reg(9)
π« adis_read_reg(9) π«
okay bestie, welcome to the Kernel API Manual β we're doing a little reading today πΈ and no, not like book club reading, like reading bytes out of a register reading, which is honestly way more slay.
β¨ NAME β¨
adis_read_reg β read N bytes from register π
Like. It reads. N bytes. From a register. That's the whole vibe. Short, sweet, iconic, ate and left no crumbs π
π¦ SYNOPSIS π¦
int adis_read_reg (struct adis *adis , unsigned int reg , unsigned int
*val , unsigned int size );
that's the whole signature, copy it exactly bestie, no freestyling β¨
π ARGUMENTS π
adisβ The adis device π the main character of this whole operation, fr fr.regβ The address of the lower of the two registers π yes, lower, meaning it's giving "there's a higher one too, you're just starting at the bottom" energy.valβ The value read back from the device π«Ά this is where the good stuff lands, it's the output, it's the payoff.sizeβ The size of thevalbuffer π gotta know how much room you've got before you start shoving bytes in there, no cap.
π RETURN π
0 on success β¨ and a negative error code otherwise π β so like, if you see a negative number, that's your sign, sweetie, something went sideways.
πΈ SEE ALSO πΈ
Kernel file ./include/linux/iio/imu/adis.h β plus a whole friend group of functions, and honestly they all ate:
struct adis_data(9)struct adis_ops(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_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)
like okay family reunion π literally the entire write squad AND the read squad showed up.
bestie reminder π every single one of those references is listed above, keep them exactly as-is, iykyk.
and that's the page! π brought to you by ./include/linux/iio/imu, dated October 2026, straight out of the Kernel API Manual β stay hydrated, read your registers responsibly, and remember: 0 means you ate, negative means try again tomorrow πβ¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms