Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a1e8ebc authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator fixes from Mark Brown:
 "A bunch of smallish fixes that came up during the merge window as
  things got more testing - even more fixes from Axel, a fix for error
  handling in more complex systems using -EPROBE_DEFER and a couple of
  small fixes for the new dummy regulators."

* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Remove non-existent parameter from fixed-helper.c kernel doc
  regulator: Fix setting new voltage in s5m8767_set_voltage
  regulator: fix sysfs name collision between dummy and fixed dummy regulator
  regulator: Fix deadlock on removal of regulators with supplies
  regulator: Fix comments in include/linux/regulator/machine.h
  regulator: Only update [LDOx|DCx]_HIB_MODE bits in wm8350_[ldo|dcdc]_set_suspend_disable
  regulator: Fix setting low power mode for wm831x aldo
  regulator: Return microamps in wm8350_isink_get_current
  regulator: wm8350: Fix the logic to choose best current limit setting
  regulator: wm831x-isink: Fix the logic to choose best current limit setting
  regulator: wm831x-dcdc: Fix the logic to choose best current limit setting
  regulator: anatop: patching to device-tree property "reg".
  regulator: Do proper shift to set correct bit for DC[2|5]_HIB_MODE setting
  regulator: Fix restoring pmic.dcdcx_hib_mode settings in wm8350_dcdc_set_suspend_enable
  regulator: Fix unbalanced lock/unlock in mc13892_regulator_probe error path
  regulator: Fix set and get current limit for wm831x_buckv
  regulator: tps6586x: Fix list minimal voltage setting for LDO0
parents 66cfb327 d49fe3c4
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
Anatop Voltage regulators

Required properties:
- compatible: Must be "fsl,anatop-regulator"
- anatop-reg-offset: Anatop MFD register offset
- anatop-vol-bit-shift: Bit shift for the register
- anatop-vol-bit-width: Number of bits used in the register
- anatop-min-bit-val: Minimum value of this register
- anatop-min-voltage: Minimum voltage of this regulator
- anatop-max-voltage: Maximum voltage of this regulator

Any property defined as part of the core regulator
binding, defined in regulator.txt, can also be used.

Example:

	regulator-vddpu {
		compatible = "fsl,anatop-regulator";
		regulator-name = "vddpu";
		regulator-min-microvolt = <725000>;
		regulator-max-microvolt = <1300000>;
		regulator-always-on;
		anatop-reg-offset = <0x140>;
		anatop-vol-bit-shift = <9>;
		anatop-vol-bit-width = <5>;
		anatop-min-bit-val = <1>;
		anatop-min-voltage = <725000>;
		anatop-max-voltage = <1300000>;
	};
+3 −2
Original line number Diff line number Diff line
@@ -138,9 +138,10 @@ static int __devinit anatop_regulator_probe(struct platform_device *pdev)
	rdesc->type = REGULATOR_VOLTAGE;
	rdesc->owner = THIS_MODULE;
	sreg->mfd = anatopmfd;
	ret = of_property_read_u32(np, "reg", &sreg->control_reg);
	ret = of_property_read_u32(np, "anatop-reg-offset",
				   &sreg->control_reg);
	if (ret) {
		dev_err(dev, "no reg property set\n");
		dev_err(dev, "no anatop-reg-offset property set\n");
		goto anatop_probe_end;
	}
	ret = of_property_read_u32(np, "anatop-vol-bit-width",
+2 −2
Original line number Diff line number Diff line
@@ -2992,14 +2992,14 @@ void regulator_unregister(struct regulator_dev *rdev)
	if (rdev == NULL)
		return;

	if (rdev->supply)
		regulator_put(rdev->supply);
	mutex_lock(&regulator_list_mutex);
	debugfs_remove_recursive(rdev->debugfs);
	flush_work_sync(&rdev->disable_work.work);
	WARN_ON(rdev->open_count);
	unset_regulator_supplies(rdev);
	list_del(&rdev->list);
	if (rdev->supply)
		regulator_put(rdev->supply);
	kfree(rdev->constraints);
	device_unregister(&rdev->dev);
	mutex_unlock(&regulator_list_mutex);
+1 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ static void regulator_fixed_release(struct device *dev)

/**
 * regulator_register_fixed - register a no-op fixed regulator
 * @name: supply name
 * @id: platform device id
 * @supplies: consumers for this regulator
 * @num_supplies: number of consumers
@@ -32,7 +31,7 @@ struct platform_device *regulator_register_fixed(int id,
	if (!data)
		return NULL;

	data->cfg.supply_name = "dummy";
	data->cfg.supply_name = "fixed-dummy";
	data->cfg.microvolts = 0;
	data->cfg.gpio = -EINVAL;
	data->cfg.enabled_at_boot = 1;
+5 −5
Original line number Diff line number Diff line
@@ -552,7 +552,7 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
	mc13xxx_lock(mc13892);
	ret = mc13xxx_reg_read(mc13892, MC13892_REVISION, &val);
	if (ret)
		goto err_free;
		goto err_unlock;

	/* enable switch auto mode */
	if ((val & 0x0000FFFF) == 0x45d0) {
@@ -562,7 +562,7 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
			MC13892_SWITCHERS4_SW1MODE_AUTO |
			MC13892_SWITCHERS4_SW2MODE_AUTO);
		if (ret)
			goto err_free;
			goto err_unlock;

		ret = mc13xxx_reg_rmw(mc13892, MC13892_SWITCHERS5,
			MC13892_SWITCHERS5_SW3MODE_M |
@@ -570,7 +570,7 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
			MC13892_SWITCHERS5_SW3MODE_AUTO |
			MC13892_SWITCHERS5_SW4MODE_AUTO);
		if (ret)
			goto err_free;
			goto err_unlock;
	}
	mc13xxx_unlock(mc13892);

@@ -612,10 +612,10 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
err:
	while (--i >= 0)
		regulator_unregister(priv->regulators[i]);
	return ret;

err_free:
err_unlock:
	mc13xxx_unlock(mc13892);

	return ret;
}

Loading