STRUCT REGULATOR_COUPLER(9)
π struct regulator_coupler(9) β kernel API manual, bestie edition β¨
okay so this is a page straight out of the Kernel API Manual, and it's all about struct regulator_coupler β the little struct that lets you have a customized regulator's coupler π ngl it's niche but it ate.
πΈ NAME πΈ
struct regulator_coupler β a customized regulator's coupler, fr fr π
β¨ SYNOPSIS β¨
here's the whole thing, copied exactly, no cap:
struct regulator_coupler {
struct list_head list;
int (*attach_regulator)(struct regulator_coupler *coupler, struct
regulator_dev *rdev);
int (*detach_regulator)(struct regulator_coupler *coupler, struct
regulator_dev *rdev);
int (*balance_voltage)(struct regulator_coupler *coupler, struct
regulator_dev *rdev, suspend_state_t state);
};
like, look at those function pointers π«Ά iconic behavior honestly.
π¦ Members π¦
listβ couplers list entry. that's it, that's the whole vibe, it's just the list entry bestie πattach_regulatorβ the callback that gets invoked on creation of a coupled regulator. β οΈ important: couples are unresolved at this point. so the callee should check that it could handle the regulator, and then return0on success,-errnoon failure, and1if the given regulator is not suitable for this coupler (which is the case of having multiple regulators in a system, iykyk). and heads up β this callback shall be implemented. like it's not optional, periodt πdetach_regulatorβ the callback invoked on destruction of a coupled regulator. this one is optional and could beNULLπ lowkey the chill one of the group.balance_voltageβ the callback invoked when the voltage of a coupled regulator is changing. it gets called with all of the coupled rdev's being held under"consumer lock"π. the callee should perform voltage balancing, changing the voltage of the coupled regulators as needed. and it's up to the coupler to verify the voltage before changing it in hardware β i.e. the coupler should check consumer's min/max and etc. this callback is optional and could beNULL, in which case a generic voltage balancer will be used. so like, if you don't show up, the generic one shows up for you, no stress π
π Description π
Regulator's coupler allows to customize the coupling algorithm. that's the whole thesis statement, bestie β it's the customization hook π
π₯ SEE ALSO π₯
- Kernel file
./include/linux/regulator/coupler.hβ go read it, it's giving main character energy π
ok that's the page!! every flag, every return value, every NULL, all of it preserved, nothing skipped π«Ά
and that's a wrap on this ./include/linux/regulator situation, October 2026 edition β thanks for reading my little manpage era, 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