regulator_get_optional(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… regulator_get_optional(9) β€” Kernel API Manual πŸ’…

okay bestie, welcome to the Kernel API Manual page for regulator_get_optional(9) β€” yes, the optional one, and she's lowkey iconic. πŸŽ€


✨ NAME ✨

regulator_get_optional β€” obtain optional access to a regulator. πŸ’–


🌸 SYNOPSIS 🌸

struct regulator * regulator_get_optional (struct device *dev , const
       char *id );

🫢 ARGUMENTS 🫢

  • dev β€” device for regulator "consumer" β€” like, the device that's doing the consuming, bestie. πŸ¦‹
  • id β€” Supply name or regulator ID. Slay, very straightforward. ✨

πŸŽ€ DESCRIPTION πŸŽ€

This one is intended for use by consumers for devices which can have some supplies unconnected in normal use, such as some MMC devices. Periodt. πŸ’…

It can allow the regulator core to provide stub supplies for other supplies requested using normal regulator_get calls without disrupting the operation of drivers that can handle absent supplies. No cap, that's the whole vibe. 🧚

Use of supply names configured via set_consumer_device_supply is strongly encouraged. It is recommended that the supply name used should match the name used for the supply and/or the relevant device pins in the datasheet. fr fr, matching names is the moment. 🌈


πŸ”₯ RETURN πŸ”₯

Pointer to a struct regulator corresponding to the regulator producer, or an ERR_PTR encoded negative error number. So you either get the pointer or the encoded error situation β€” check it, bestie. πŸ˜­πŸ’€


🌈 SEE ALSO 🌈

Kernel file: ./drivers/regulator/core.c β€” and here's the whole crew, every single one, no skipping πŸ‘‘


source: ./drivers/regulator Β· version/date: October 2026 Β· page: regulator_get_optional(9) β€” that's the footer info, bestie, and we are so done here πŸ’œβœ¨πŸ¦‹

πŸ“¦ where this page comes from