mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-12 13:34:13 -05:00
Merge tag 'regulator-fix-v4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown:
"Some driver specific fixes for the regulator subsystem:
- Some of the changes to the core that were merged in the last merge
window exposed the fact that the qcom-smd driver hadn't implemented
the voltage enumeration interfaces like it should. Since it's a
simple driver specific fix to implement them do that.
- Fix the ramp delay configuration for tps51632"
* tag 'regulator-fix-v4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: qcom_smd: add list_voltage callback
regulator: qcom_smd: add regulator ops for pm8941 lnldo
regulator: qcom_smd: add list_voltage callback
regulator: tps51632: Fix setting ramp delay
This commit is contained in:
@@ -140,6 +140,19 @@ static const struct regulator_ops rpm_smps_ldo_ops = {
|
||||
.enable = rpm_reg_enable,
|
||||
.disable = rpm_reg_disable,
|
||||
.is_enabled = rpm_reg_is_enabled,
|
||||
.list_voltage = regulator_list_voltage_linear_range,
|
||||
|
||||
.get_voltage = rpm_reg_get_voltage,
|
||||
.set_voltage = rpm_reg_set_voltage,
|
||||
|
||||
.set_load = rpm_reg_set_load,
|
||||
};
|
||||
|
||||
static const struct regulator_ops rpm_smps_ldo_ops_fixed = {
|
||||
.enable = rpm_reg_enable,
|
||||
.disable = rpm_reg_disable,
|
||||
.is_enabled = rpm_reg_is_enabled,
|
||||
.list_voltage = regulator_list_voltage_linear_range,
|
||||
|
||||
.get_voltage = rpm_reg_get_voltage,
|
||||
.set_voltage = rpm_reg_set_voltage,
|
||||
@@ -247,7 +260,7 @@ static const struct regulator_desc pm8941_nldo = {
|
||||
static const struct regulator_desc pm8941_lnldo = {
|
||||
.fixed_uV = 1740000,
|
||||
.n_voltages = 1,
|
||||
.ops = &rpm_smps_ldo_ops,
|
||||
.ops = &rpm_smps_ldo_ops_fixed,
|
||||
};
|
||||
|
||||
static const struct regulator_desc pm8941_switch = {
|
||||
|
||||
@@ -94,11 +94,14 @@ static int tps51632_dcdc_set_ramp_delay(struct regulator_dev *rdev,
|
||||
int ramp_delay)
|
||||
{
|
||||
struct tps51632_chip *tps = rdev_get_drvdata(rdev);
|
||||
int bit = ramp_delay/6000;
|
||||
int bit;
|
||||
int ret;
|
||||
|
||||
if (bit)
|
||||
bit--;
|
||||
if (ramp_delay == 0)
|
||||
bit = 0;
|
||||
else
|
||||
bit = DIV_ROUND_UP(ramp_delay, 6000) - 1;
|
||||
|
||||
ret = regmap_write(tps->regmap, TPS51632_SLEW_REGS, BIT(bit));
|
||||
if (ret < 0)
|
||||
dev_err(tps->dev, "SLEW reg write failed, err %d\n", ret);
|
||||
|
||||
Reference in New Issue
Block a user