regulator: Add support for power budget

Introduce power budget management for the regulator device. Enable tracking
of available power capacity by providing helpers to request and release
power budget allocations.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20250115-feature_regulator_pw_budget-v2-1-0a44b949e6bc@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kory Maincent
2025-01-15 15:41:57 +01:00
committed by Mark Brown
parent c3ad22ad34
commit 42d7c87b4e
5 changed files with 142 additions and 0 deletions

View File

@@ -656,6 +656,8 @@ struct regulator_dev {
int cached_err;
bool use_cached_err;
spinlock_t err_lock;
int pw_requested_mW;
};
/*