STRUCT NPEM_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct npem_ops(9) β€” the gen-z guide to kernel API manual pages πŸŽ€

okay bestie, so this one lives in the Kernel API Manual, and it's literally the whole blueprint for how the NPEM backend gets its callback glow-up. no cap, it's just the vibe contract between the NPEM core and whatever backend is doing the actual work ✨


🌸 NAME 🌸

struct npem_ops β€” backend specific callbacks. that's it, that's the whole personality: it's a little struct full of function pointers and metadata that a backend fills in so the rest of the NPEM code knows what it can do 🫢


✨ SYNOPSIS ✨

struct npem_ops {
    int (*get_active_indications)(struct npem *npem, u32 *inds);
    int (*set_active_indications)(struct npem *npem, u32 inds);
    const struct indication *inds;
    const char *name;
 };

look at her. four members. functioning. iconic πŸ’…


πŸ¦‹ Members πŸ¦‹

  • get_active_indications β€” the "what's literally happening rn" hook. it gets the active indications. npem: the NPEM device. inds: the response buffer. write the answer in there, bestie πŸ“₯
  • set_active_indications β€” the "make it so" hook. it sets new indications. npem: the npem device. inds: bit mask to set. sending the vibe out into the world πŸ“€
  • inds β€” supported indications array, and the set of indications is backend specific (so like, don't assume β€” every backend has its own taste πŸ’€). it's a const struct indication *. hands off, she's const πŸ”’
  • name β€” backend name. a const char *. just a little string so everyone knows who did this. main character energy πŸ‘‘
ngl, the important thing here is that inds being backend specific means you genuinely cannot guess what's in it from this page alone. that's not me being vague, that's just the facts, fr fr πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/pci/npem.c β€” the actual source, go read her 🧚
  • struct npem_led(9) β€” the LED side of things
  • struct npem(9) β€” the main NPEM struct herself
  • dsm_evaluate(9) β€” the DSM evaluate call, iykyk

and that's the page!! 🌈 source-wise she lives under ./drivers/pci, and the version/date stamp on this beauty is October 2026, which is giving slightly-future but we're rolling with it πŸ’œ slay, go forth and implement your backend πŸ“β­

πŸ“¦ where this page comes from