octeon_i2c_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ octeon_i2c_write(9) ✨

okay so bestie, this one lives in the Kernel API Manual β€” it's a kernel function, so get comfy, we're in driver land now 🫢


🌸 NAME 🌸

octeon_i2c_write β€” send data to the bus via low-level controller πŸ’Œ

like. literally just yeeting your bytes out onto the I2C bus at the lowest level. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

int octeon_i2c_write (struct octeon_i2c *i2c , int target , const u8
*data , int length );

yes she takes four args and returns an int, we love a consistent signature πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • i2c β€” The struct octeon_i2c πŸ™ˆ the controller struct itself, the main character of this whole operation
  • target β€” Target address 🎯 like, who are we talking to on the bus
  • data β€” Pointer to the data to be sent ✨ a const u8 *, so bestie, you are not touching these bytes
  • length β€” Length of the data πŸ“ how many bytes are we actually sending

πŸ’– DESCRIPTION πŸ’–

okay so here's the vibe: the address is sent over the bus, then the data. that's it. that's the whole bit πŸ¦‹

address first, then the payload. iconic order, no notes.


⭐ RETURN ⭐

0 on success, otherwise a negative errno πŸ’€

so like, check it. zero means slay, negative means something went sideways.


🌈 SEE ALSO 🌈

Kernel file ./drivers/i2c/busses/i2c-octeon-core.c β€” and her besties:


iykyk, the whole octeon i2c squad is right there in ./drivers/i2c/busses β€” go say hi πŸ‘‘

that's the whole page, bestie!! this one's straight out of the kernel source tree over at ./drivers/i2c/busses, dated October 2026 β€” mwah, go write some bytes πŸ’œπŸŽ€

πŸ“¦ where this page comes from