STRUCT NVMEM_CELL_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct nvmem_cell_info(9) πŸ’–

okay bestie, welcome to the Kernel API Manual β€” this is the page for struct nvmem_cell_info, aka the little glow-up sheet that describes one single NVMEM cell. no cap, it's giving "character creation screen for your EEPROM data". let's get into it πŸŽ€


✨ NAME ✨

struct nvmem_cell_info β€” NVMEM cell description. that's it, that's the whole vibe: it's the description of a cell. πŸ¦‹


🌸 SYNOPSIS 🌸

struct nvmem_cell_info {
    const char              *name;
    unsigned int            offset;
    size_t raw_len;
    unsigned int            bytes;
    unsigned int            bit_offset;
    unsigned int            nbits;
    struct device_node      *np;
    nvmem_cell_post_process_t read_post_process;
    void *priv;
 };

like, look at her. every field is a little main character in her own right. let's meet them one by one πŸ‘‘


🌈 Members 🌈

  • name β€” Name. yes bestie, she has a name. iconic behavior only. πŸ’…
  • offset β€” Offset within the NVMEM device. literally where in the device this cell lives, so you don't go grabbing the wrong bytes like a menace.
  • raw_len β€” Length of raw data (without post processing). this is the pre-glow-up length, before any post processing gets its hands on it. 🧚
  • bytes β€” Length of the cell. the actual cell length, fr fr.
  • bit_offset β€” Bit offset if cell is smaller than a byte. yes, bit offset β€” we're going sub-byte, we're going feral, we're counting individual bits now. 😭
  • nbits β€” Number of bits. how many of those little guys we're working with.
  • np β€” Optional device_node pointer. optional! she doesn't have to be there! lowkey a free spirit. πŸ¦‹
  • read_post_process β€” Callback for optional post processing of cell data on reads. so when you read, this hook can do a little extra processing on the data. also optional, also a free spirit. ✨
  • priv β€” Opaque data passed to the read_post_process hook. the mystery bag πŸŽ€ you hand it over and the hook figures it out β€” not our business what's inside, and that's the point.
ngl the "optional" ones are lowkey the moment here β€” np and read_post_process can both just... not exist on a given cell, and that's valid πŸ’œ

πŸ”₯ SEE ALSO πŸ”₯

go read those next, bestie, iykyk 🫢


and that's the whole page!! slay πŸ’– this masterpiece lives in ./include/linux and it's dated October 2026, and the page footer is literally just struct nvmem_cell_info(9) again because she's her own hype woman. periodt. πŸ‘‘β­

πŸ“¦ where this page comes from