STRUCT EC_I2C_DEVICE(9)
π struct ec_i2c_device(9) β the Kernel API Manual glow-up
okay bestie, so this is a page from the Kernel API Manual about struct ec_i2c_device(9), and honestly? it's giving "small struct, big responsibilities" energy. let's get into it β¨
πΈ NAME πΈ
struct ec_i2c_device β literally the driver data for the I2C tunnel π no cap, that's the whole vibe.
β¨ SYNOPSIS β¨
struct ec_i2c_device {
struct device *dev;
struct i2c_adapter adap;
struct cros_ec_device *ec;
u16 remote_bus;
u8 request_buf[256];
u8 response_buf[256];
};
like, look at her. five fields and two chonky buffers. icon behavior π
π Members π
devβ the device node π«Ά that's her home address basically.adapβ the I2C adapter. the actual machinery, the main character of the bus world πecβ a pointer to the EC device π§ that's who we're talking to on the other side.remote_busβ the EC bus number we tunnel to on the other side π like, the far-away bus we're reaching through the tunnel. it's au16, noted.request_bufβ buffer for transmitting data π€ and fr fr, we expect most transfers to fit. it'su8 request_buf[256]β 256 bytes of sending space, bestie.response_bufβ buffer for receiving data π₯ same deal, we expect most transfers to fit.u8 response_buf[256], 256 bytes of incoming room. it's giving symmetry π
ngl the "we expect most transfers to fit" is doing a lot of heavy lifting in both of those descriptions. just saying. π
π¦ SEE ALSO π¦
- Kernel file
./drivers/i2c/busses/i2c-cros-ec-tunnel.cβ yes, the actual source, go read it, iykyk π ec_i2c_count_message(9)ec_i2c_construct_message(9)ec_i2c_count_response(9)ec_i2c_parse_response(9)
the whole lil friend group, all together, slay π«Ά
and that's the page, bestie!! this one came from ./drivers/i2c/busses and it's dated October 2026 β so like, go off, future manpage πβ¨ mwah, see you in the next man page ππ
π¦ 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