devm_regulator_get_optional(9)
π devm_regulator_get_optional β the Kernel API Manual tea π«Ά
okay so bestie, welcome to the devm_regulator_get_optional(9) page β¨ this is a Kernel API Manual moment, and honestly it's giving "small page, big energy" π
β¨ NAME β¨
devm_regulator_get_optional β the resource-managed glow-up of regulator_get_optional() πΈ
like, same vibe, but the kernel cleans up after you. iconic behavior tbh π
π¦ SYNOPSIS π¦
struct regulator * devm_regulator_get_optional (struct device *dev ,
const char *id );
yep that's the whole signature, no cap π she takes a device and an id string and hands you back a struct regulator * π
π ARGUMENTS π
devβ the device that's getting supplied π like, who's the consumer here, bestie?idβ the supply name or the regulator ID π·οΈ either one, she's flexible
π DESCRIPTION π
so. it's a managed regulator_get_optional. that's the whole bit π«Ά
regulators that come back from this function are automatically regulator_put on driver detach β no manual cleanup era, we love a self-cleaning queen π§β¨
for more info, go peek at regulator_get_optional β that's where the real lore lives π
ngl bestie,regulator_get_optionalis the un-managed one, so this page is basically saying "same thing but devm handles theputfor you" π don't @ me, that's literally what it says
π SEE ALSO π
the whole friend group π« and also the kernel file she lives in:
./drivers/regulator/devres.c π
devm_regulator_get(9)devm_regulator_get_exclusive(9)devm_regulator_get_enable_optional(9)devm_regulator_get_enable(9)devm_regulator_get_enable_read_voltage(9)devm_regulator_put(9)devm_regulator_bulk_get(9)devm_regulator_bulk_get_exclusive(9)devm_regulator_bulk_get_const(9)devm_regulator_bulk_put(9)devm_regulator_bulk_get_enable(9)devm_regulator_register(9)devm_regulator_register_supply_alias(9)devm_regulator_bulk_register_supply_alias(9)devm_regulator_register_notifier(9)devm_regulator_unregister_notifier(9)devm_regulator_irq_helper(9)devm_of_regulator_get(9)devm_of_regulator_get_optional(9)
like, that is a long list and every single one of them made it in here because we do not skip entries in this house ππ₯
and that's the page!! π big sign-off energy: this one lives out of ./drivers/regulator, dated October 2026, and the whole family is filed under devm_regulator_get_optional(9) π¦ slay, mwah π
β¨
π¦ 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