STRUCT M24LR(9)
π¦ struct m24lr(9) β the kernel API manual page, bestie edition π¦
okay so this is struct m24lr(9) from the Kernel API Manual, and honestly? it's giving "small struct, big responsibilities" energy. let's get into it π
β¨ NAME β¨
struct m24lr β the core driver data for M24LR chip control. yeah. that's the whole vibe. it's the main character struct holding everything the driver needs π
πΈ SYNOPSIS πΈ
struct m24lr {
u64 uid;
unsigned int sss_len;
unsigned int page_size;
unsigned int eeprom_size;
struct regmap *ctl_regmap;
struct regmap *eeprom_regmap;
struct mutex lock;
};
literally just look at it. iconic. no cap. π
π«Ά Members π«Ά
okay bestie, member by member, let's go:
uidβ a 64-bit unique identifier that's stored in the device itself. like a little fingerprint, but 64 bits of it β¨sss_lenβ the length of thesssregion. that's it, that's the whole thing π¦page_sizeβ the chip-specific limit on the maximum number of bytes allowed in a single write operation. so if you were thinking "i'll just write a huge chunk," no ma'am, this is the cap πeeprom_sizeβ size of the EEPROM, in byte (yes, singular "byte", that's how the original says it, we don't gatekeep π )ctl_regmapβ theregmapinterface for accessing the system parameter sector. your hookup to the control-side stuff π₯eeprom_regmapβ theregmapinterface for accessing the EEPROM. the other hookup, this one for the EEPROM πΈlockβ a mutex to synchronize operations to the device. because two threads fighting over one chip is NOT the vibe, and this keeps it cute and orderly β¨
π Description π
so the actual description: this is the central data structure holding the state and resources used by the M24LR device driver. that's it. that's the sentence. it's the main character holding the whole driver's state and resources together, periodt π
π SEE ALSO π
- Kernel file
./drivers/nvmem/m24lr.cβ go read it, iykyk π§ struct m24lr_chip(9)m24lr_regmap_read(9)m24lr_regmap_write(9)m24lr_write(9)m24lr_write_pass(9)
and that's the whole page, bestie π it lives in ./drivers/nvmem, the version on this one is October 2026, and the manual page itself is struct m24lr(9) β so go forth and slay your M24LR chip control, you've got this πβ¨π¦
π¦ 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