__adis_write_reg_16(9)
π __adis_write_reg_16 β the Kernel API Manual page, but make it make sense π
okay so bestie, we're in the Kernel API Manual, section 9, and the star of the show is __adis_write_reg_16. the name literally tells you the whole vibe: it writes 2 bytes to a pair of registers, and it does it unlocked πβ¨ (yes, "unlocked" is part of the deal β that's the underscore-underscore energy, iykyk).
β¨ NAME β¨
__adis_write_reg_16 β Write 2 bytes to a pair of registers (unlocked)
like. that's it. that's the whole job. two bytes, two registers, no lock. slay. π
π SYNOPSIS π
int __adis_write_reg_16 (struct adis *adis , unsigned int reg , u16 val
);
it hands you back an int, so like, it's gonna tell you how it went. main character behavior fr fr.
πΈ ARGUMENTS πΈ
adisβ The adis device. this is your little device buddy, the whole reason we're here π«Άregβ The address of the lower of the two registers. note that: the lower one. the two registers are buddies sitting next to each other, and you give it the address of the lower one. no cap. π¦valβ Value to be written. the actual 2 bytes going in. this is the payload, the moment, the whole point β¨
π RETURN π
0on success π- a negative error code otherwise π
that's it. zero good, negative bad. classic. iconic. periodt.
no, seriously, that's the entire contract. check for negative, please, i'm begging π
β SEE ALSO β
okay this is the group chat, everyone's here. no one gets left out:
- 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_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)
the whole family. all the write-y ones, all the read-y ones, all the bit-update-y ones. obsessed π
and that's the page, bestie π§ this little gem lives in the kernel source at ./include/linux/iio/imu, and it's dated October 2026. go forth and write your 2 bytes, and remember: it's unlocked, so you bring the lock π₯π
π¦ 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