STRUCT NPEM_OPS(9)
π 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 aconst struct indication *. hands off, she's const πnameβ backend name. aconst 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 thingsstruct npem(9)β the main NPEM struct herselfdsm_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
- 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