of_find_mat...de_and_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

hey bestie, welcome to the Kernel API Manual page for of_find_matching_node_and_match β€” yes, the header abbreviates it as of_find_mat...de_and_match(9), but we are spelling it all the way out πŸ’…. It does one iconic thing: find a node based on an of_device_id match table. periodt.

✨ SYNOPSIS ✨

struct device_node * of_find_matching_node_and_match (struct device_node
*from , const struct of_device_id *matches , const struct of_device_id
**match );

πŸŽ€ ARGUMENTS πŸŽ€

  • from β€” the node to start searching from, or NULL. The node you pass will not be searched β€” only the next one will. Typically, you pass what the previous call returned. of_node_put will be called on it. bestie, that cleanup detail matters 🫢
  • matches β€” array of of device match structures to search in. this is the match-table squad you're checking against ✨
  • match β€” updated to point at the matches entry which matched. slay, now you know which one hit πŸ’–

πŸ¦‹ RETURN πŸ¦‹

A node pointer with refcount incremented β€” use of_node_put on it when done. do the cleanup, no cap 🧚

πŸ’… SEE ALSO πŸ’…

okay so the related squad is huge, and every single one is section 9; also peep the kernel file ./drivers/of/base.c:


mwah πŸ’‹ β€” source/version: ./drivers/of, date: October 2026, for of_find_mat...de_and_match(9). that's the whole page, bestie; go be the main character of your device tree πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from