cdns_i2c_master_xfer_atomic(9)
π
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 situationmsgsβ pointer to the i2c message structure π the message(s) you wanna send, chillin' in a structnumβ 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 π:
enum cdns_i2c_mode(9)enum cdns_i2c_slave_state(9)struct cdns_i2c(9)cdns_i2c_init(9)cdns_i2c_runtime_suspend(9)cdns_i2c_runtime_resume(9)cdns_i2c_clear_bus_hold(9)cdns_i2c_slave_isr(9)cdns_i2c_master_isr(9)cdns_i2c_isr(9)cdns_i2c_mrecv(9)cdns_i2c_msend(9)cdns_i2c_master_reset(9)cdns_i2c_master_xfer(9)cdns_i2c_func(9)cdns_i2c_calc_divs(9)cdns_i2c_setclk(9)cdns_i2c_clk_notifier_cb(9)cdns_i2c_detect_transfer_size(9)cdns_i2c_probe(9)cdns_i2c_remove(9)cdns_i2c_shutdown(9)
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
- 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