STRUCT STM32_SAI_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct stm32_sai_data(9) ✨

okay bestie, so this is a page from the Kernel API Manual, and it's literally all about struct stm32_sai_data β€” the private data of the SAI instance driver πŸ’…. no cap, that's the whole vibe. let's get into it πŸŽ€


🌸 NAME 🌸

struct stm32_sai_data β€” private data of SAI instance driver 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct stm32_sai_data {
    struct platform_device *pdev;
    void __iomem *base;
    struct clk *pclk;
    struct clk *clk_x8k;
    struct clk *clk_x11k;
    struct stm32_sai_conf conf;
    int irq;
    int (*set_sync)(struct stm32_sai_data *sai, struct device_node
*np_provider, int synco, int synci);
    u32 gcr;
 };

like, yes, that's the whole struct, copied exactly, character for character, because we do NOT mess with the source code in this house 😀✨


πŸ’– Members πŸ’–

so here's the breakdown of every single field, bestie, and honestly the way this struct is organized? iconic πŸ‘‘

  • pdev β€” device data pointer. it's giving "hey bestie, here's your device" energy 🫢
  • base β€” common register bank virtual base address. lowkey the home address of all the shared registers 🏠
  • pclk β€” SAI bus clock. your everyday bus clock, no drama ⏰
  • clk_x8k β€” SAI parent clock for sampling frequencies multiple of 8kHz. the 8k girlies have their own clock, slay 🎡
  • clk_x11k β€” SAI parent clock for sampling frequencies multiple of 11kHz. and the 11k girlies too, we love equal representation πŸ’œ
  • conf β€” SAI hardware capabitilites. yes that's how it's spelled in the original, i'm not fixing it, that's the author's main character moment πŸ™ˆβœ¨
  • irq β€” SAI interrupt line. the interrupt line is literally standing by to get your attention 😭πŸ”₯
  • set_sync β€” pointer to synchro mode configuration callback. it's a function pointer, so whenever you need the synchro mode configured, it's like "say less" and handles it πŸ’…
  • gcr β€” SAI Global Configuration Register. the global config register, the big boss, the finale πŸŒˆπŸ‘‘

🌟 SEE ALSO 🌟

  • Kernel file ./sound/soc/stm/stm32_sai.h
  • struct stm32_sai_conf(9) β€” the conf struct, which you already met up there in the members list, but now go read its own page πŸ¦‹

real talk, bestie: this page is short but every field matters, so don't skip the clocks or the callback, iykyk πŸ’€

mwah, that's the whole page πŸŽ€βœ¨ this little beauty lives at ./sound/soc/stm, from October 2026, in the Kernel API Manual, and we're officially done here β€” go forth and configure your SAI, you icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from