STRUCT AMD_I2C_COMMON(9)
π struct amd_i2c_common β NAME
okay so bestie, struct amd_i2c_common is the per bus/i2c adapter context β and the whole point of it is that it's shared between the pci driver and the platform driver π«Ά like yes, both of them, same struct, no cap.
(This is from the Kernel API Manual, section 9 β you're reading the struct amd_i2c_common(9) page, hi hi πΈ)
β¨ SYNOPSIS β¨
struct amd_i2c_common {
union i2c_event eventval;
struct amd_mp2_dev *mp2_dev;
struct i2c_msg *msg;
void (*cmd_completion)(struct amd_i2c_common *i2c_common);
enum i2c_cmd reqcmd;
u8 cmd_success;
u8 bus_id;
enum speed_enum i2c_speed;
u8 *dma_buf;
dma_addr_t dma_addr;
#ifdef CONFIG_PM;
int (*suspend)(struct amd_i2c_common *i2c_common);
int (*resume)(struct amd_i2c_common *i2c_common);
#endif ;
};
like, look at her. main character energy fr π
π note that thesuspendandresumepointers are only in there whenCONFIG_PMis set β conditional icon behaviour, iykyk.
π¦ Members π¦
eventvalβ the MP2 event value, and it gets set by the IRQ handler β‘mp2_devβ the MP2 pci device that this adapter is part of (her home address basically π )msgβ the i2c message πcmd_completionβ a function the IRQ handler calls to signal the platform driver π£ like a little "hey girl, done!" callbackreqcmdβ the requested i2c command typecmd_successβ set to true when the MP2 responded to a command with the expected status and the expected response type β (both, bestie, not just one)bus_idβ the bus index π’i2c_speedβ the i2c bus speed, and it's determined by the slowest slave π’ (yes, the slowest one decides. we respect the slow queen's pace)dma_bufβ if the msg length is> 32, this holds the DMA buffer virtual address π§dma_addrβ if the msg length is> 32, this holds the DMA buffer address π
π SEE ALSO π
Kernel file ./drivers/i2c/busses/i2c-amd-mp2.h, plus these besties:
union i2c_cmd_base(9)union i2c_event(9)struct amd_mp2_dev(9)
and that's the whole vibe check π this page lives over in ./drivers/i2c/busses, it's dated October 2026, and yeah β the header and footer are literally just struct amd_i2c_common(9) again, she's consistent like that π periodt.
π¦ 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