of_hwspin_lock_get_id(9)
okay so bestie, welcome to the of_hwspin_lock_get_id(9) page from the Kernel API Manual β it's all about getting a lock id for an OF phandle-based specific lock. Let's get into it π
β¨
π NAME π
of_hwspin_lock_get_id β get lock id for an OF phandle-based specific lock. That's the whole vibe, no cap.
β¨ SYNOPSIS β¨
int of_hwspin_lock_get_id (struct device_node *np , int index );
π«Ά ARGUMENTS π«Ά
npβ device node from which to request the specific hwlock. That's the node you're pulling from, bestie.indexβ index of the hwlock in the list of values. It's literally telling you which one in the list, iykyk.
π DESCRIPTION π
So here's the tea: this function gives DT users of the hwspinlock module a way to get the global lock id of a specific hwspinlock by using the phandle of the hwspinlock device. Why are we doing this? So it can be requested using the normal hwspin_lock_request_specific API. Iconic little lookup moment, fr fr πΈ
π RETURN π
On success you get the global lock id number β slay β¨. Otherwise:
-EPROBE_DEFERif the hwspinlock device is not yet registered-EINVALon invalid args specifier value- or an appropriate error as returned from the OF parsing of the DT client node
π¦ SEE ALSO π¦
Kernel file: ./drivers/hwspinlock/hwspinlock_core.c β the source file in question π
And the whole crew:
__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_byname(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)
okay bye bestie π«Ά this page's source/version is ./drivers/hwspinlock, dated October 2026, and it's filed under of_hwspin_lock_get_id(9) β stay hydrated and keep those locks iconic πβ¨
π¦ 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