STRUCT I3C_XFER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 fr
  • rnw β€” this one encodes the transfer direction. true for a read, false for 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: both data.in and data.out have 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:


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