diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-22 18:16:38 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-22 18:16:38 +0100 |
commit | d6560052c2f73db59834e9a3c0aba20579aa7059 (patch) | |
tree | f446d04ca3c3f4fc354f3969dfcda550f39757e0 /drivers/regulator/core.c | |
parent | Merge tag 'regmap-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bro... (diff) | |
parent | Merge remote-tracking branch 'regulator/for-5.12' into regulator-next (diff) | |
download | linux-d6560052c2f73db59834e9a3c0aba20579aa7059.tar.xz linux-d6560052c2f73db59834e9a3c0aba20579aa7059.zip |
Merge tag 'regulator-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"Quite an active release for driver specific updates but very little
going on at the subsystem level this time for the regulator API.
Summary:
- Overhaul of the Qualcomm LABIBB driver.
- Allow use of regulator_sync_voltage() on coupled regulators.
- Support for Action ATC260x, Mediatek DVSRC and MT6315, Qualcomm
PCM8180/c and PM8009-1 and Richtek RT4831
- Removal of the AB3100 driver"
* tag 'regulator-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (49 commits)
regulator: bd718x7, bd71828, Fix dvs voltage levels
regulator: pca9450: Add sd-vsel GPIO
regulator: pca9450: Enable system reset on WDOG_B assertion
regulator: pca9450: Add SD_VSEL GPIO for LDO5
regulator: qcom-rpmh: fix pm8009 ldo7
regulator: mt6315: Add support for MT6315 regulator
regulator: document binding for MT6315 regulator
regulator: dt-bindings: Document charger-supply for max8997
regulator: qcom-labibb: Use disable_irq_nosync from isr
regulator: pf8x00: Fix typo for PF8200 chip name
regulator: pf8x00: set ramp_delay for bucks
regulator: core: Avoid debugfs: Directory ... already present! error
regulator: pf8x00: Add suspend support
regulator: Make regulator_sync_voltage() usable by coupled regulators
regulator: s5m8767: Drop regulators OF node reference
regulator: qcom-rpmh: Add pmc8180 and pmc8180c
regulator: qcom-rpmh: Add pmc8180 and pmc8180c
regulator: s5m8767: Fix reference count leak
regulator: remove ab3100 driver
regulator: axp20x: Fix reference cout leak
...
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 67a768fe5b2a..16114aea099a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1617,7 +1617,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, const char *supply_name) { struct regulator *regulator; - int err; + int err = 0; if (dev) { char buf[REG_STR_SIZE]; @@ -1663,8 +1663,8 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, } } - regulator->debugfs = debugfs_create_dir(supply_name, - rdev->debugfs); + if (err != -EEXIST) + regulator->debugfs = debugfs_create_dir(supply_name, rdev->debugfs); if (!regulator->debugfs) { rdev_dbg(rdev, "Failed to create debugfs directory\n"); } else { @@ -2042,7 +2042,7 @@ struct regulator *_regulator_get(struct device *dev, const char *id, * Returns a struct regulator corresponding to the regulator producer, * or IS_ERR() condition containing errno. * - * Use of supply names configured via regulator_set_device_supply() is + * Use of supply names configured via set_consumer_device_supply() is * strongly encouraged. It is recommended that the supply name used * should match the name used for the supply and/or the relevant * device pins in the datasheet. @@ -2069,7 +2069,7 @@ EXPORT_SYMBOL_GPL(regulator_get); * regulator off for correct operation of the hardware they are * controlling. * - * Use of supply names configured via regulator_set_device_supply() is + * Use of supply names configured via set_consumer_device_supply() is * strongly encouraged. It is recommended that the supply name used * should match the name used for the supply and/or the relevant * device pins in the datasheet. @@ -2095,7 +2095,7 @@ EXPORT_SYMBOL_GPL(regulator_get_exclusive); * disrupting the operation of drivers that can handle absent * supplies. * - * Use of supply names configured via regulator_set_device_supply() is + * Use of supply names configured via set_consumer_device_supply() is * strongly encouraged. It is recommended that the supply name used * should match the name used for the supply and/or the relevant * device pins in the datasheet. @@ -4153,7 +4153,11 @@ int regulator_sync_voltage(struct regulator *regulator) if (ret < 0) goto out; - ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); + /* balance only, if regulator is coupled */ + if (rdev->coupling_desc.n_coupled > 1) + ret = regulator_balance_voltage(rdev, PM_SUSPEND_ON); + else + ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); out: regulator_unlock(rdev); |