i2c_master_send_dmasafe(9)
π NAME π
okay so bestie, welcome to the Kernel API Manual glow-up of i2c_master_send_dmasafe β this function issues a single I2C message in master transmit mode using a DMA safe buffer. iconic behavior, no cap. π¦
β¨ SYNOPSIS β¨
int i2c_master_send_dmasafe (const struct i2c_client *client , const char *buf , int count );
π ARGUMENTS π
clientβ handle to slave device β the whole point, your fave connection πbufβ data that will be written to the slave, must be safe to use with DMA. yes, DMA safe, not just vibes safe π«Άcountβ how many bytes to write, must be less than64ksincemsg.lenisu16. keep it under64k, periodt.
πΈ DESCRIPTION πΈ
it returns a negative errno, or else the number of bytes written. that's the whole tea: negative errno = error path, otherwise you get the byte count. π
π SEE ALSO π
the Kernel file is ./include/linux/i2c.h, and the whole bestie squad is:
i2c_master_recv(9)i2c_master_recv_dmasafe(9)i2c_master_send(9)struct i2c_device_identity(9)enum i2c_driver_flags(9)struct i2c_driver(9)struct i2c_client(9)struct i2c_board_info(9)I2C_BOARD_INFO(9)struct i2c_algorithm(9)struct i2c_lock_operations(9)struct i2c_timings(9)struct i2c_bus_recovery_info(9)struct i2c_adapter_quirks(9)i2c_lock_bus(9)i2c_trylock_bus(9)i2c_unlock_bus(9)i2c_mark_adapter_suspended(9)i2c_mark_adapter_resumed(9)i2c_check_quirks(9)module_i2c_driver(9)builtin_i2c_driver(9)
k bye bestie π
this page's source/version is ./include/linux and the date is October 2026 β go slay your I2C DMA safe sends π
π¦ 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