of_regulator_dev_lookup(9)
π of_regulator_dev_lookup(9) π
okay so bestie, this is the Kernel API Manual page for of_regulator_dev_lookup(9), and it's here to spill the tea on looking up a regulator device using device tree only. No extra sources, no side quests β just device tree vibes. β¨
π NAME π
of_regulator_dev_lookup β lookup a regulator device with device tree only.
β¨ SYNOPSIS β¨
struct regulator_dev * of_regulator_dev_lookup (struct device *dev , struct device_node *np , const char *supply );
π ARGUMENTS π
devβ Device pointer for regulator supply lookup. Like, the device bestie you're checking for a supply. π«Άnpβ Device node pointer for regulator supply lookup. The device-node bestie in the mix. π¦supplyβ Supply name or regulator ID. This is the name/ID you're hunting for, periodt. π
π₯ RETURN π₯
On success, you get a pointer to the struct regulator_dev β iconic. On error, you get an ERR_PTR encoded value. That's the whole return vibe. π
π¦ DESCRIPTION π¦
If it succeeds, it returns a pointer to the struct regulator_dev that corresponds to the name supply, and the embedded struct device refcount is incremented by one. β¨ The refcount must be dropped by calling put_device. No cap, don't forget that part β it's important. π«Ά
On failure, one of these ERR_PTR encoded values comes back:
-ENODEVif lookup fails permanently. It's giving "nope, not happening, ever." π-EPROBE_DEFERif lookup could succeed in the future. It's giving "not right now bestie, maybe later." β³
π SEE ALSO π
Kernel file: ./drivers/regulator/of_regulator.c
of_get_regulator_init_data(9)of_regulator_match(9)of_get_child_regulator(9)of_get_regulator(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)
xoxo bestie π
this of_regulator_dev_lookup(9) page's source/version is ./drivers/regulator, and it's dated October 2026. slay. π
π¦ 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