of_hwspin_lo...et_id_byname(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_hwspin_lock_get_id_byname πŸ’…

okay bestie, welcome to the Kernel API Manual β€” yes, that's the manual name, we're fancy here ✨ β€” and today's main character is of_hwspin_lock_get_id_byname, a function whose name is honestly longer than my attention span but we're gonna slay it anyway πŸŽ€


✨ NAME ✨

of_hwspin_lock_get_id_byname β€” get the lock id for a specified hwlock name 🫢

Like, you give it a name, it gives you the id. Matchmaking, but for hardware locks πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int of_hwspin_lock_get_id_byname (struct device_node *np , const char
       *name );

the way it returns an int and takes two args… iconic, lowkey ✨


🌸 ARGUMENTS 🌸

  • np β€” the device node you're requesting the specific hwlock from 🌈 (yes, the device node, not just any node, don't be messy)
  • name β€” the hwlock name, literally just the name, that's her whole job πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe: this function is a whole means for DT users of the hwspinlock module πŸ‘‘

It lets them get the global lock id of a specific hwspinlock by using the specified name of the hwspinlock device β€” so that afterwards it can be requested using the normal hwspin_lock_request_specific API πŸ”₯ like, it's the little matchmaker that gets you the id so the real API can do the actual requesting. no cap.


😭 RETURN 😭

  • the global lock id number on success πŸŽ‰ (slay)
  • -EPROBE_DEFER if the hwspinlock device is not yet registered πŸ™ˆ (she's just not ready yet, give her a sec)
  • -EINVAL on invalid args specifier value πŸ’€ (you gave her nonsense, she's telling you)
  • or an appropriate error as returned from the OF parsing of the DT client node 🫢 (whatever the OF parsing hands back, you get β€” fr fr)

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/hwspinlock/hwspinlock_core.c β€” go read it, iykyk πŸ“–

like, the whole friend group, honestly πŸ§šπŸ’–


okay that's the whole page bestie, no notes πŸ’… and for the cute sign-off: this one lives in ./drivers/hwspinlock, dated October 2026, and yes it still goes by of_hwspin_lo...et_id_byname(9) because the header had to truncate it and honestly? relatable πŸ“βœ¨ bye!! πŸŽ€

πŸ“¦ where this page comes from