of_hwspin_lock_get_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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_DEFER if the hwspinlock device is not yet registered
  • -EINVAL on 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:


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