Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

+24
+23
drivers/regulator/core.c
··· 4095 4095 } 4096 4096 EXPORT_SYMBOL_GPL(regulator_set_voltage_time_sel); 4097 4097 4098 + int regulator_sync_voltage_rdev(struct regulator_dev *rdev) 4099 + { 4100 + int ret; 4101 + 4102 + regulator_lock(rdev); 4103 + 4104 + if (!rdev->desc->ops->set_voltage && 4105 + !rdev->desc->ops->set_voltage_sel) { 4106 + ret = -EINVAL; 4107 + goto out; 4108 + } 4109 + 4110 + /* balance only, if regulator is coupled */ 4111 + if (rdev->coupling_desc.n_coupled > 1) 4112 + ret = regulator_balance_voltage(rdev, PM_SUSPEND_ON); 4113 + else 4114 + ret = -EOPNOTSUPP; 4115 + 4116 + out: 4117 + regulator_unlock(rdev); 4118 + return ret; 4119 + } 4120 + 4098 4121 /** 4099 4122 * regulator_sync_voltage - re-apply last regulator output voltage 4100 4123 * @regulator: regulator source
+1
include/linux/regulator/driver.h
··· 540 540 int regulator_get_current_limit_regmap(struct regulator_dev *rdev); 541 541 void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); 542 542 int regulator_set_ramp_delay_regmap(struct regulator_dev *rdev, int ramp_delay); 543 + int regulator_sync_voltage_rdev(struct regulator_dev *rdev); 543 544 544 545 /* 545 546 * Helper functions intended to be used by regulator drivers prior registering