mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 02:30:53 +07:00
regulator: Fixes for v3.9
A few small things here and there, nothing major here really. The conversion of twl4030ldo_ops to get_voltage_sel is a fix, as covered in the commit log it fixes inconsistency in handling of the IS_UNSUP() feature in the driver. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJRNVWaAAoJELSic+t+oim9dosP/0lHA/JW75ryGElWXn0wgDe2 R+9vkDFGWTLueSjuDiwMnOHpLSjWHQFd8IN6/BmcXPAwVWo2y6obGmXcHrT2Y+Wj 2w0rkdYcF93bepZVHZgyRHcksKo1Liu1VF9h32cYBysOPQ3gwKD2nIR7S9iEuAUt R2ERt5KwtmFTrKRgsbY400s4fBQhBdKnkCevyuIDSk2KdhUpOhEHkv1jzo2NoRvk 7kD9LAIZjh/Ze0cy1H32T8Zo5nFR40JwZVOMrWXouoJvnhqY9pccaBQui4g33QRg BKZ0cSy/TVOT7oiKznFxyP8a1J+zwOkeSZRVweSs9pcGuZMpKpm+PYEuLJKL0WWb fSdmA9djq8NMc7nTx+GAnJAHk08O6eeLupLo2rr/VsWChTKf2MvEAsznLC1aOlwf /tau7L7sw1/5Yaj8XJ8lAprRcE4AULzIQn5/c2hvr7R71yTSN/Sg5fE7yWhDMSPz BmMtXpEo0XJIyotESe0FFjh3SJ6V6M1kYknmTlJTf90hhaskgFzF5Wdtz72QLoIZ /1xl19x7Rk03O5OrVHKd6vGZOUbwZve8FwS9PPICpqObzRIybo6mO0cfEFXwttkw ZECjf2M4gBLx3NgrRxLt/RW982gGxJFNoqwh/koyowhkwsobZEtHdng12BBk3i8s GLBjoi9ofEJf7k7xf0zX =wEGn -----END PGP SIGNATURE----- Merge tag 'regulator-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A few small things here and there, nothing major here really. The conversion of twl4030ldo_ops to get_voltage_sel is a fix, as covered in the commit log it fixes inconsistency in handling of the IS_UNSUP() feature in the driver." * tag 'regulator-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: fixed regulator_bulk_enable unwinding code regulator: twl: Convert twl4030ldo_ops to get_voltage_sel regulator: palmas: fix number of SMPS voltages regulator: core: fix documentation error in regulator_allow_bypass regulator: core: update kernel documentation for regulator_desc regulator: db8500-prcmu - remove incorrect __exit markup
This commit is contained in:
commit
d345243629
@ -2830,7 +2830,7 @@ EXPORT_SYMBOL_GPL(regulator_get_bypass_regmap);
|
||||
* regulator_allow_bypass - allow the regulator to go into bypass mode
|
||||
*
|
||||
* @regulator: Regulator to configure
|
||||
* @allow: enable or disable bypass mode
|
||||
* @enable: enable or disable bypass mode
|
||||
*
|
||||
* Allow the regulator to go into bypass mode if all other consumers
|
||||
* for the regulator also enable bypass mode and the machine
|
||||
@ -3057,9 +3057,13 @@ int regulator_bulk_enable(int num_consumers,
|
||||
return 0;
|
||||
|
||||
err:
|
||||
pr_err("Failed to enable %s: %d\n", consumers[i].supply, ret);
|
||||
while (--i >= 0)
|
||||
regulator_disable(consumers[i].consumer);
|
||||
for (i = 0; i < num_consumers; i++) {
|
||||
if (consumers[i].ret < 0)
|
||||
pr_err("Failed to enable %s: %d\n", consumers[i].supply,
|
||||
consumers[i].ret);
|
||||
else
|
||||
regulator_disable(consumers[i].consumer);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ static int db8500_regulator_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __exit db8500_regulator_remove(struct platform_device *pdev)
|
||||
static int db8500_regulator_remove(struct platform_device *pdev)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -553,7 +553,7 @@ static struct platform_driver db8500_regulator_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = db8500_regulator_probe,
|
||||
.remove = __exit_p(db8500_regulator_remove),
|
||||
.remove = db8500_regulator_remove,
|
||||
};
|
||||
|
||||
static int __init db8500_regulator_init(void)
|
||||
|
@ -4,6 +4,7 @@
|
||||
* Copyright 2011-2012 Texas Instruments Inc.
|
||||
*
|
||||
* Author: Graeme Gregory <gg@slimlogic.co.uk>
|
||||
* Author: Ian Lartey <ian@slimlogic.co.uk>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@ -156,7 +157,7 @@ static const struct regs_info palmas_regs_info[] = {
|
||||
*
|
||||
* So they are basically (maxV-minV)/stepV
|
||||
*/
|
||||
#define PALMAS_SMPS_NUM_VOLTAGES 116
|
||||
#define PALMAS_SMPS_NUM_VOLTAGES 117
|
||||
#define PALMAS_SMPS10_NUM_VOLTAGES 2
|
||||
#define PALMAS_LDO_NUM_VOLTAGES 50
|
||||
|
||||
|
@ -471,24 +471,23 @@ twl4030ldo_set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
|
||||
selector);
|
||||
}
|
||||
|
||||
static int twl4030ldo_get_voltage(struct regulator_dev *rdev)
|
||||
static int twl4030ldo_get_voltage_sel(struct regulator_dev *rdev)
|
||||
{
|
||||
struct twlreg_info *info = rdev_get_drvdata(rdev);
|
||||
int vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER,
|
||||
VREG_VOLTAGE);
|
||||
int vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_VOLTAGE);
|
||||
|
||||
if (vsel < 0)
|
||||
return vsel;
|
||||
|
||||
vsel &= info->table_len - 1;
|
||||
return LDO_MV(info->table[vsel]) * 1000;
|
||||
return vsel;
|
||||
}
|
||||
|
||||
static struct regulator_ops twl4030ldo_ops = {
|
||||
.list_voltage = twl4030ldo_list_voltage,
|
||||
|
||||
.set_voltage_sel = twl4030ldo_set_voltage_sel,
|
||||
.get_voltage = twl4030ldo_get_voltage,
|
||||
.get_voltage_sel = twl4030ldo_get_voltage_sel,
|
||||
|
||||
.enable = twl4030reg_enable,
|
||||
.disable = twl4030reg_disable,
|
||||
|
@ -199,6 +199,8 @@ enum regulator_type {
|
||||
* output when using regulator_set_voltage_sel_regmap
|
||||
* @enable_reg: Register for control when using regmap enable/disable ops
|
||||
* @enable_mask: Mask for control when using regmap enable/disable ops
|
||||
* @bypass_reg: Register for control when using regmap set_bypass
|
||||
* @bypass_mask: Mask for control when using regmap set_bypass
|
||||
*
|
||||
* @enable_time: Time taken for initial enable of regulator (in uS).
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user