of_regulator_match(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ of_regulator_match(9) β€” the kernel API manual, but make it make sense

okay so bestie, welcome to the of_regulator_match(9) glow-up ✨ this is a Kernel API Manual page and honestly? it ate. let's get into it πŸŽ€


🌸 NAME 🌸

of_regulator_match β€” literally extract multiple regulator init data from device tree. that's the whole vibe. no cap. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int of_regulator_match (struct device *dev , struct device_node *node ,
       struct of_regulator_match *matches , unsigned int num_matches );

look at her. four arguments, zero chill. πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device that's asking for the data. she's the one making the request, main character energy fr.
  • node β€” the parent device node of the regulators. the momma node, if you will 🫢
  • matches β€” the match table for the regulators. this is the little spreadsheet of who's who.
  • num_matches β€” number of entries in the match table. yeah, gotta tell her how long the list is πŸ’€

✨ DESCRIPTION ✨

so this function uses a match table β€” one that the regulator driver hands over β€” to parse regulator init data out of the device tree. iykyk 🌈

node is expected to contain a set of child nodes, and each one provides the init data for one regulator. cute, right? one child, one regulator, no drama πŸ’–

the data parsed from a child node gets matched to a regulator based on either the deprecated property regulator-compatible, if present, or otherwise the child node's name. like, if regulator-compatible is there it wins, and if it's not, we go by the child node's name. simple as that ⭐

bestie, important: the match table is modified in place, and an additional of_node reference is taken for each matched regulator. so like… it's not a copy, she really is editing the original 😭 and those references are getting grabbed, so mind your refcounts, okay? that's not me being dramatic, that's just what the manpage says πŸ‘‘

πŸ’œ RETURN πŸ’œ

the number of matches found πŸŽ‰ or a negative error number on failure πŸ˜” β€” no in-between, honestly it's giving all or nothing.


πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/regulator/of_regulator.c β€” go read her, she's iconic 🧚

the whole friend group, fr fr 🫢🌸


okay that's the page!! shoutout to the ./drivers/regulator girlies and to the October 2026 release β€” this one's from the Kernel API Manual, of_regulator_match(9), and she slayed πŸ’…βœ¨ see u in the next manpage bestie πŸ’–

πŸ“¦ where this page comes from