adis_write_reg(9)
β¨ adis_write_reg(9) β¨
okay so real talk, this one lives in the Kernel API Manual and it's genuinely one of the cutest little helpers in the IIO/IMU corner of the kernel β it's the function that yeets N bytes into a register on an adis device. let's get into it bestie π
πΈ NAME πΈ
adis_write_reg β write N bytes to register π
π¦ SYNOPSIS π¦
int adis_write_reg (struct adis *adis , unsigned int reg , unsigned int
val , unsigned int size );
π ARGUMENTS π
adisβ the adis device π«Ά like, the actual device struct you're poking at.regβ the address of the lower of the two registers. yep, lower β that detail matters, don't come for me.valβ the value you're writing to the device. it can be up to 4 bytes, so keep it in range bestie πsizeβ the size of that value, and it's measured in bytes.
π RETURN π
0 on success, and a negative error code otherwise. so like, zero = slay, negative = something went sideways π
β SEE ALSO β
- Kernel file
./include/linux/iio/imu/adis.h 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_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 vibe check π this page came out of ./include/linux/iio/imu and it's dated October 2026, so likeβ¦ future manpage energy fr fr β¨ go write some registers, bestie, you've got this π§π
π¦ 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