sdhci_arasan_register_sdclk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

sdhci_arasan_register_sdclk β€” bestie, this is the one that registers the sdcardclk so a PHY can actually use it ✨

(oh also hiii, you're reading the Kernel API Manual page for this, and it's a whole vibe πŸŽ€)

🌸 SYNOPSIS 🌸

int sdhci_arasan_register_sdclk (struct sdhci_arasan_data *sdhci_arasan
, struct clk *clk_xin , struct device *dev );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • sdhci_arasan β€” our private data structure, it's giving main character energy ngl πŸ‘‘
  • clk_xin β€” pointer to the functional clock, she's the real one πŸ•
  • dev β€” pointer to our struct device, iconic as always πŸ’…

⭐ DESCRIPTION ⭐

okay so here's the tea πŸ“ β€” some PHY devices literally need to know what the actual card clock is. like, they can't function without it, no cap. and the way they find out? we hand them a clock through the common clock framework so they can go query it themselves. literally providing a service 😭🫢

πŸ’€ NOTE πŸ’€

so, real talk: without seriously re-architecting SDHCI's clock code and testing on all platforms, there's genuinely no way to create a totally beautiful clock here with all clock ops implemented. like, not happening, not today πŸ™ˆ

instead, we just create a clock that can be queried, and we set the CLK_GET_RATE_NOCACHE attribute to tell the common clock framework that we're doing things behind its back πŸ‘€ (sneaky, but it works). this should be sufficient to create nice clean device tree bindings, and later β€” if needed β€” we can try re-architecting SDHCI if we see some benefit to it. future us's problem, bestie πŸ’œ

πŸ”₯ RETURN πŸ”₯

0 on success, and an error value on error. that's it, that's the whole vibe check βœ…

🧚 SEE ALSO 🧚

kernel file ./drivers/mmc/host/sdhci-of-arasan.c plus the whole friend group:


and that's the page!! πŸŽ€ brought to you straight out of ./drivers/mmc/host, dated October 2026 β€” slay, see you in the next manpage bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from