mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 01:53:20 -04:00
Merge tag 'for-5.14-regulator' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into regulator-5.14
regulator: Changes for v5.14-rc1 This adds regulator_sync_voltage_rdev(), which is used as a dependency for new Tegra power domain code.
This commit is contained in:
@@ -4095,6 +4095,29 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(regulator_set_voltage_time_sel);
|
||||
|
||||
int regulator_sync_voltage_rdev(struct regulator_dev *rdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
regulator_lock(rdev);
|
||||
|
||||
if (!rdev->desc->ops->set_voltage &&
|
||||
!rdev->desc->ops->set_voltage_sel) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* balance only, if regulator is coupled */
|
||||
if (rdev->coupling_desc.n_coupled > 1)
|
||||
ret = regulator_balance_voltage(rdev, PM_SUSPEND_ON);
|
||||
else
|
||||
ret = -EOPNOTSUPP;
|
||||
|
||||
out:
|
||||
regulator_unlock(rdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* regulator_sync_voltage - re-apply last regulator output voltage
|
||||
* @regulator: regulator source
|
||||
|
||||
@@ -540,6 +540,7 @@ int regulator_set_current_limit_regmap(struct regulator_dev *rdev,
|
||||
int regulator_get_current_limit_regmap(struct regulator_dev *rdev);
|
||||
void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data);
|
||||
int regulator_set_ramp_delay_regmap(struct regulator_dev *rdev, int ramp_delay);
|
||||
int regulator_sync_voltage_rdev(struct regulator_dev *rdev);
|
||||
|
||||
/*
|
||||
* Helper functions intended to be used by regulator drivers prior registering
|
||||
|
||||
Reference in New Issue
Block a user