acpm_get_by_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ acpm_get_by_node(9) ✨

okay so bestie, welcome to the Kernel API Manual, section 9 β€” yes we're in the big-kid kernel-functions section, put some respect on it πŸ’… this page is literally all about acpm_get_by_node, and it's giving "small function, big job" energy fr fr.


🌸 NAME 🌸

acpm_get_by_node β€” get the ACPM handle using node pointer. that's it, that's the whole vibe: you hand it a node pointer, it hands you a handle 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct acpm_handle * acpm_get_by_node (struct device *dev , struct device_node *np );

look at that signature, iconic, no notes πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” device pointer requesting the ACPM handle. it's the one doing the asking, main character energy honestly πŸ’–
  • np β€” the ACPM device tree node. the node in question, the one we're keying off of 🌸

⭐ RETURN ⭐

pointer to the handle on success πŸŽ‰ and ERR_PTR(-errno) otherwise 😭 β€” so yeah, do the IS_ERR() check, bestie, don't just raw-dog the pointer, i'm begging πŸ™ˆ


πŸ’€ NOTE πŸ’€

the handle CANNOT be pointer to const. like, cannot. not "shouldn't", not "maybe don't" β€” CANNOT. so don't go slapping const on it and acting surprised when things go sideways, ngl that's on you πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/firmware/samsung/exynos-acpm.c β€” that's the source of truth, go read it, iykyk πŸ“– and then the whole friend group:

that's the whole squad, all (9), all slaying in their own way 🌈


okay that's the page!! πŸ“ this lil beauty lives in ./drivers/firmware/samsung, stamped October 2026, and it's brought to you by the acpm_get_by_node(9) page of the Kernel API Manual β€” mwah, go get that handle bestie, and remember: check for ERR_PTR πŸ’œβœ¨πŸ§š

πŸ“¦ where this page comes from