__adis_write_reg_16(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __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 🌈

  • 0 on 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:

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