of_regulator_match(9)
π 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 π§
of_get_regulator_init_data(9)of_get_child_regulator(9)of_get_regulator(9)of_regulator_dev_lookup(9)of_regulator_get(9)of_regulator_get_optional(9)of_check_coupling_data(9)of_parse_coupled_regulator(9)of_regulator_bulk_get_all(9)
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
- 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