m24lr_regmap_write(9)
โจ 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 ๐
- Kernel file
./drivers/nvmem/m24lr.c struct m24lr_chip(9)struct m24lr(9)m24lr_regmap_read(9)m24lr_write(9)m24lr_write_pass(9)
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
- 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