cdns_i2c_master_xfer_atomic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cdns_i2c_master_xfer_atomic β€” Kernel API Manual ✨

okay so bestie, you know how the kernel sometimes needs to do i2c stuff but like… it's already in atomic context and can't go to sleep? 😴🚫 this is That Function. it's the atomic-mode transfer girlie, and honestly she ate. let's get into it 🫢


🌸 NAME 🌸

cdns_i2c_master_xfer_atomic β€” the i2c transfer function, but in atomic mode ⚑ (no sleeping on the job, we simply do not nap here)


✨ SYNOPSIS ✨

int cdns_i2c_master_xfer_atomic (struct i2c_adapter *adap , struct
i2c_msg *msgs , int num );

it returns an int, and it takes three things: an adapter pointer, a message pointer, and a count. that's it. that's the whole vibe check πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • adap β€” pointer to the i2c adapter driver instance 🌈 like, the actual adapter you're talking through, the main character of the hardware situation
  • msgs β€” pointer to the i2c message structure πŸ’Œ the message(s) you wanna send, chillin' in a struct
  • num β€” the number of messages to transfer πŸ”’ literally just count them, girl

πŸ”₯ RETURN πŸ”₯

  • number of msgs processed on success βœ… slay, it worked
  • negative error otherwise 😭 something went wrong, and it's telling you in negative numbers (as is tradition)

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file that's serving the whole time: ./drivers/i2c/busses/i2c-cadence.c

and like, the whole friend group πŸ‘‘:


ngl bestie, if you're calling the non-atomic version while you're already in atomic context, that's a πŸ’€ moment. this one's here for exactly that reason. iykyk ✨

okay that's the whole page, go be iconic with it πŸ§šβ€β™€οΈπŸ’œ this gem lives under ./drivers/i2c/busses and the manual's dated October 2026 β€” fr fr, marking my calendar already πŸŽ€πŸ«Ά ✨ bye bestie, go process those msgs ✨

πŸ“¦ where this page comes from