regulator: fixed: Get the configured limit for a current-limited regulator

Change-Id: I0154cdcda406828aff7dcdf884e63e1c74992e4b
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
This commit is contained in:
Shengfei Xu
2024-09-24 10:51:13 +08:00
committed by Tao Huang
parent 1f5f09ff39
commit d43bf47467

View File

@@ -157,7 +157,13 @@ of_get_fixed_voltage_config(struct device *dev,
return config;
}
static int fixed_voltage_get_current_limit(struct regulator_dev *rdev)
{
return rdev->constraints->max_uA;
}
static const struct regulator_ops fixed_voltage_ops = {
.get_current_limit = fixed_voltage_get_current_limit,
};
static const struct regulator_ops fixed_voltage_clkenabled_ops = {