STRUCT I3C_XFER(9)
π struct i3c_xfer(9) π
okay bestie, so this page lives in the Kernel API Manual and it's literally all about struct i3c_xfer β the I3C data transfer struct. yes, the whole page. it's one struct and it ate. π¦
β¨ NAME β¨
struct i3c_xfer β I3C data transfer. that's it, that's the vibe. it's the little packet of dreams that carries your bytes back and forth π
πΈ SYNOPSIS πΈ
here's the whole thing, copy it exactly, no cap:
struct i3c_xfer {
union {
u8 rnw;
u8 cmd;
};
u16 len;
u16 actual_len;
union {
void *in;
const void *out;
} data;
enum i3c_error_code err;
};
π Members π
{unnamed_union}β anonymous π«Ά no name, all mystery, main character energy fr frrnwβ this one encodes the transfer direction.truefor a read,falsefor a write. she's giving binary literal, we stan πcmdβ the Read/Write command in HDR mode. read:0x80-0xff, write:0x00-0x7f. memorize the ranges, iykyk π₯lenβ transfer length in bytes of the transfer. yes, "of the transfer," we're being thorough πactual_lenβ the actual length in bytes that the controller transferred. not what you asked for, what you got πdataβ the input/output buffer. she's flexible, she contains multitudes β¨data.inβ input buffer. must point to a DMA-able buffer. not optional, bestie, DMA-able or nothing πdata.outβ output buffer. also must point to a DMA-able buffer. same rule, no exceptions πerrβ the I3C error code (type:enum i3c_error_code). your little emotional support error field π§
lowkey important: bothdata.inanddata.outhave to point at DMA-able buffers. don't come crying to me when you pass it a random stack buffer π
π¦ SEE ALSO π¦
go read these next, it's giving required reading, all from the kernel file ./include/linux/i3c/device.h:
enum i3c_error_code(9)enum i3c_xfer_mode(9)enum i3c_dcr(9)struct i3c_device_info(9)struct i3c_driver(9)dev_to_i3cdev(9)module_i3c_driver(9)i3c_i2c_driver_register(9)i3c_i2c_driver_unregister(9)module_i3c_i2c_driver(9)struct i3c_ibi_setup(9)
k bye bestie, this page came from ./include/linux/i3c, version October 2026, and it's filed under struct i3c_xfer(9) β slay, go write some drivers π
π
π¦ 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