i2c_master_recv_dmasafe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– i2c_master_recv_dmasafe πŸ’–

okay so this is a page from the Kernel API Manual, and the star of the show is i2c_master_recv_dmasafe β€” one function, one job, very main character.


✨ NAME ✨

i2c_master_recv_dmasafe β€” issue a single I2C message in master receive mode using a DMA safe buffer πŸ¦‹


✨ SYNOPSIS ✨

int i2c_master_recv_dmasafe (const struct i2c_client *client , char *buf
, int count );

✨ ARGUMENTS ✨

  • client β€” handle to the slave device πŸ’… like, your way in
  • buf β€” where to store data read from the slave. it must be safe to use with DMA, no exceptions bestie 🫢
  • count β€” how many bytes to read. has to be less than 64k since msg.len is u16 😭 that's the ceiling, respect it

✨ DESCRIPTION ✨

Returns a negative errno, or else the number of bytes read. that's it, that's the whole vibe ✨


✨ SEE ALSO ✨

Kernel file ./include/linux/i2c.h and the whole squad πŸ‘‘


ngl the dmasafe in the name is literally a promise β€” if your buffer isn't DMA safe, that's on you and it will not be cute πŸ’€

that's the whole page bestie!! 🌸 this one lives in ./include/linux, dated October 2026, and it goes by i2c_master_recv_dmasafe(9) β€” mwah, go read some kernel source, ily πŸ’œπŸŽ€

πŸ“¦ where this page comes from