STRUCT STM_SOURCE_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 by stm_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