m24lr_regmap_write(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ m24lr_regmap_write(9) โœจ

okay bestie, so this is a page straight out of the Kernel API Manual and it's lowkey iconic โ€” it's the m24lr_regmap_write function, and it's here to write your data using regmap with retry on failure. yes, retry on failure, she's persistent ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

ssize_t m24lr_regmap_write (struct regmap *regmap , const u8 *buf ,
size_t size , unsigned int offset );

like, that's the whole signature. take it in. ๐Ÿซถ


๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • regmap โ€” the regmap instance for the device, aka the whole vibe check for where your data's headed โœจ
  • buf โ€” the buffer containing the data to write, like your little payload of truth ๐Ÿ’–
  • size โ€” number of bytes to write, so she knows exactly how much she's serving ๐Ÿ“
  • offset โ€” starting register address, the lil address where the whole thing kicks off ๐Ÿ‘‘

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the tea โ˜• โ€” this function attempts to write a block of data to the device, and it does it with retries and a timeout. very main character energy.

some M24LR devices may NACK I2C writes while an internal write operation is in progress ๐Ÿ˜ญ like they're literally busy, bestie, don't take it personally. so this function retries the write operation with a short delay, over and over, until it succeeds or the timeout is reached. she does not give up easily. persistence slay ๐Ÿ’…๐Ÿ”ฅ


๐Ÿ‘‘ RETURN ๐Ÿ‘‘

  • on success, you get the number of bytes written ๐Ÿ’–
  • if the write fails within the timeout window, you get -ETIMEDOUT ๐Ÿ˜ญ๐Ÿ’€ that's your signal to go touch some grass and come back later.

๐ŸŒˆ SEE ALSO ๐ŸŒˆ


that's a wrap, bestie ๐ŸŽ€ this page lives in ./drivers/nvmem, and the version/date stamp on it is October 2026 โ€” so like, she's from the future โœจ๐Ÿ”ฎ no cap. mwah, go write some registers ๐Ÿ’œ๐Ÿงš

๐Ÿ“ฆ where this page comes from