of_hwspin_lo...et_id_byname(9)
π 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_DEFERif the hwspinlock device is not yet registered π (she's just not ready yet, give her a sec)-EINVALon 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 π
__hwspin_trylock(9)__hwspin_lock_timeout(9)__hwspin_unlock(9)hwspin_lock_bust(9)of_hwspin_lock_simple_xlate(9)of_hwspin_lock_get_id(9)hwspin_lock_register(9)hwspin_lock_unregister(9)devm_hwspin_lock_unregister(9)devm_hwspin_lock_register(9)__hwspin_lock_request(9)hwspin_lock_request_specific(9)hwspin_lock_free(9)devm_hwspin_lock_free(9)devm_hwspin_lock_request_specific(9)
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
- 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