octeon_i2c_read(9)
π octeon_i2c_read β Kernel API Manual, bestie edition π
okay so you're in the Kernel API Manual and the function on the menu today is octeon_i2c_read β it's giving "receive data from the bus via low-level controller" energy, and honestly? iconic. Let's get into it. π¦
β¨ NAME β¨
octeon_i2c_read β receive data from the bus via low-level controller πΈ
literally what it says: you want bytes off the bus, this is the low-level controller way to get them. no cap.
π SYNOPSIS π
int octeon_i2c_read (struct octeon_i2c *i2c , int target , u8 *data ,
u16 *rlength , bool recv_len );
five arguments, returns an int, slay. π
π₯ ARGUMENTS π₯
i2cβ Thestruct octeon_i2c. that's your controller bestie, the whole struct, hand it over π«Άtargetβ Target address. who we talkin' to on the bus πdataβ Pointer to the location to store the data. this is where the good stuff lands β¨rlengthβ Length of the data. it's au16 *, so pointer, not a plain number, keep that in mind πrecv_lenβ flag for length byte. abool, and yeah it's the flag that says we're doing the length byte thing π
π DESCRIPTION π
The address is sent over the bus, then the data is read. that's the whole vibe check, fr fr β first the address goes out, then the read happens. π―
β RETURN β
0 on success, otherwise a negative errno. so like, zero means we ate, negative means something went sideways π
π SEE ALSO π
Kernel file ./drivers/i2c/busses/i2c-octeon-core.c β plus the whole friend group:
octeon_i2c_wait(9)octeon_i2c_hlc_wait(9)octeon_i2c_start(9)octeon_i2c_write(9)octeon_i2c_hlc_block_comp_read(9)octeon_i2c_hlc_block_comp_write(9)octeon_i2c_xfer(9)
go read them too, iykyk π§
ok and for the receipts: this page lives under ./drivers/i2c/busses and it's dated October 2026. π
and that's the whole page bestie β stay hydrated, read your errno values, and remember: negative means no π mwah πβ¨
π¦ 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