ahci_platform_find_clk(9)
π ahci_platform_find_clk(9) β like, the Kernel API Manual one, bestie π
okay so real talk, we're in the Kernel API Manual today, section 9, and the star of the show is ahci_platform_find_clk. it's giving "small function, big responsibilities" and honestly? we're obsessed. β¨
πΈ NAME πΈ
ahci_platform_find_clk β Find platform clock π°οΈβ¨ (yes that's literally it, she's a finder, that's her whole job, and she ate)
π¦ SYNOPSIS π¦
struct clk * ahci_platform_find_clk (struct ahci_host_priv *hpriv ,
const char *con_id );
like, she takes two things and gives you back a struct clk *. no cap. π
π ARGUMENTS π
hprivβ the host private area where config values get stored π«Ά (it's the lil' stash spot, iykyk)con_idβ the clock connection ID π (your ticket to the right clock, fr fr)
β DESCRIPTION β
okay so here's the tea: this function returns a pointer to the clock descriptor of the clock with the passed ID. that's it. that's the vibe check. π₯
you hand her a con_id, she hands you back the clock descriptor β match made in heaven, lowkey iconic. π
π§ RETURN π§
Pointer to the clock descriptor on success π β otherwise NULL π (and yes, NULL is the sad little "nope, didn't find her" ending, we've all been there)
π SEE ALSO π
first up, the actual source file (go read it, it's a whole mood):
- Kernel file
./drivers/ata/libahci_platform.c
and then the whole friend group π«Ά β the entire ahci_platform squad, all here, all linked, no one left behind:
ahci_platform_enable_phys(9)ahci_platform_disable_phys(9)ahci_platform_enable_clks(9)ahci_platform_disable_clks(9)ahci_platform_deassert_rsts(9)ahci_platform_assert_rsts(9)ahci_platform_enable_regulators(9)ahci_platform_disable_regulators(9)ahci_platform_enable_resources(9)ahci_platform_disable_resources(9)ahci_platform_get_resources(9)ahci_platform_init_host(9)ahci_platform_shutdown(9)ahci_platform_suspend_host(9)ahci_platform_resume_host(9)ahci_platform_suspend(9)ahci_platform_resume(9)
π quick reminder bestie: enable/disable, assert/deassert, suspend/resume β they come in pairs, do not mix them up, that's how you get main character energy of the wrong kind π
π SIGN-OFF π
that's the whole page, bestie! π¦ this lil' gem lives over in ./drivers/ata and it was dated October 2026 β so go forth, find your clocks, and remember: if it returns NULL, it's not you, it's the connection ID. π
ahci_platform_find_clk(9) β periodt. ππ
β¨
π¦ 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