STRUCT STM_SOURCE_DATA(9)
β¨ struct stm_source_data(9) β¨
okay so bestie, welcome to the <stm_source_data> glow-up page β this is the Kernel API Manual entry for struct stm_source_data, and it's literally the blueprint for an STM source device: the description and the callbacks, all in one little struct. π
πΈ NAME πΈ
struct stm_source_data β STM source device description and callbacks π
π¦ SYNOPSIS π¦
struct stm_source_data {
const char *name;
struct stm_source_device *src;
unsigned int percpu;
unsigned int nr_chans;
unsigned int type;
int (*link)(struct stm_source_data *data);
void (*unlink)(struct stm_source_data *data);
};
like, that's the whole vibe right there π
π Members π
not me about to introduce every single field one by one, here we go π«Ά
nameβ the device name, and it's the one that gets used for policy lookup. so pick it cute, because it matters β¨srcβ internal structure, only used by stm class code. hands off, that's not yours πpercpuβ it's in the struct! the original page doesn't give it a blurb, so I'm not gonna invent one π (no cap, it's literally just listed as a member)nr_chansβ number of channels to allocate. count 'em π₯typeβ the type of STM source driver, represented bystm_source_type. iykyk π§linkβ called when this source gets linked to an STM device. it's giving main character energy πunlinkβ called when this source is about to get unlinked from its STM. say bye bestie π
β Description β
so here's the tea: fill in this structure before calling stm_source_register_device to register a source device. that's the whole assignment, bestie π
also β pass it to unregister and write calls too. it's not a one-time thing, it's an everywhere thing π«
π SEE ALSO π
- Kernel file
./include/linux/stm.h enum stp_packet_type(9)enum stp_packet_flags(9)enum stm_source_type(9)struct stm_data(9)
go read those, fr fr β they're the rest of the lore π
okay that's the page!! π big slay to ./include/linux for hosting it, shoutout to the October 2026 date, and this whole thing is struct stm_source_data(9) β catch you in the next manpage, bestie ππ¦β¨
π¦ 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