projects/linux·commit c6d65bf2

Merge tag 'regulator-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

c6d65bf2 · Linus Torvalds <[email protected]> · 2013-11-12 14:55:17 +09:00

Pull regulator updates from Mark Brown:
 "Lots of driver updates here plus some nice new core features, the main
  one being the first:

   - Enable support for providing a dummy regulator when we know that
     one must exist for the device to be functional.  This makes it much
     easier to add regulator support to drivers since we don't require
     that the machine integration for all systems using the device be
     updated to provide regulators.
   - Substantial reduction in the amount of busy waiting done while
     waiting for enables to complete.
   - Allow MFDs to distribute regulator supplies to child devices so we
     don't have to expose the internal structure of MFDs outside of the
     driver.
   - Managed registeration for regulators"

* tag 'regulator-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (113 commits)
  regulator: s5m8767: Modify parsing method of the voltage table of buck2/3/4
  regulator: s5m8767: Modify parse_dt function to parse data related to ramp
  regulator: da9052: Revert se apply_[reg|bit] with regmap based voltage_sel operations
  mfd: arizona: Specify supply mappings for Arizona CODECs
  mfd: Allow mapping regulator supplies to MFD device from children
  regulator: core: Add ability to create a lookup alias for supply
  regulator: tps65910: Fix checkpatch issue
  regulator: tps65023: Fix checkpatch issue
  regulator: tps6105x: Fix checkpatch issue
  regulator: mc13783: Fix checkpatch issue
  regulator: max8997: Fix checkpatch issue
  regulator: lp3971: Fix checkpatch issue
  regulator: fixed: Fix checkpatch issue
  regulator: anatop: Fix checkpatch issue
  regulator: Add REGULATOR_LINEAR_RANGE macro
  regulator: Remove max_uV from struct regulator_linear_range
  regulator: ti-abb: Fix operator precedence typo
  regulator: tps65910: get regulators node from parent node only
  regulator: tps6586x: get regulators node from parent node only
  regulator: tps65090: get regulators node from parent node only
  ...
Commit
c6d65bf246fbba6e9042a35aba050d2a92f39505
Parents
4fc9ed33 · d4d5cef6

Merge commit. Changes below are compared with the first parent: 4fc9ed33.

Changes

83 files changed · +2582 −1519

FileStatusAddDelContent
Documentation/devicetree/bindings/regulator/as3722-regulator.txtadded+91−0View file
Documentation/devicetree/bindings/regulator/da9210.txtadded+21−0View file
Documentation/devicetree/bindings/regulator/palmas-pmic.txtmodified+9−3View file
Documentation/devicetree/bindings/regulator/regulator.txtmodified+5−0View file
Documentation/driver-model/devres.txtmodified+1−0View file
arch/arm/mach-s3c64xx/mach-crag6410.cmodified+0−12View file
drivers/mfd/arizona-core.cmodified+29−3View file
drivers/mfd/mfd-core.cmodified+17−5View file
drivers/regulator/88pm800.cmodified+4−8View file
drivers/regulator/88pm8607.cmodified+2−10View file
drivers/regulator/Kconfigmodified+16−10View file
drivers/regulator/Makefilemodified+3−1View file
drivers/regulator/aat2870-regulator.cmodified+1−10View file
drivers/regulator/ab3100.cmodified+1−2View file
drivers/regulator/ab8500-ext.cmodified+2−24View file
drivers/regulator/ad5398.cmodified+3−16View file
drivers/regulator/anatop-regulator.cmodified+3−4View file
drivers/regulator/arizona-ldo1.cmodified+1−11View file
drivers/regulator/arizona-micsupp.cmodified+3−11View file
drivers/regulator/as3711-regulator.cmodified+9−34View file
drivers/regulator/as3722-regulator.cadded+908−0View file
drivers/regulator/core.cmodified+243−212View file
drivers/regulator/da903x.cmodified+3−14View file
drivers/regulator/da9052-regulator.cmodified+38−17View file
drivers/regulator/da9055-regulator.cmodified+5−19View file
drivers/regulator/da9063-regulator.cmodified+5−18View file
drivers/regulator/da9210-regulator.cmodified+7−12View file
drivers/regulator/devres.cadded+415−0View file
drivers/regulator/fan53555.cmodified+1−11View file
drivers/regulator/fixed.cmodified+6−32View file
drivers/regulator/gpio-regulator.cmodified+0−1View file
drivers/regulator/helpers.cmodified+5−1View file
drivers/regulator/internal.hadded+38−0View file
drivers/regulator/isl6271a-regulator.cmodified+4−20View file
drivers/regulator/lp3971.cmodified+2−2View file
drivers/regulator/lp872x.cmodified+3−30View file
drivers/regulator/lp8788-buck.cmodified+1−11View file
drivers/regulator/lp8788-ldo.cmodified+2−22View file
drivers/regulator/max1586.cmodified+5−21View file
drivers/regulator/max77686.cmodified+3−20View file
drivers/regulator/max77693.cmodified+4−25View file
drivers/regulator/max8649.cmodified+2−12View file
drivers/regulator/max8660.cmodified+7−23View file
drivers/regulator/max8907-regulator.cmodified+3−20View file
drivers/regulator/max8925-regulator.cmodified+1−11View file
drivers/regulator/max8973-regulator.cmodified+1−10View file
drivers/regulator/max8997.cmodified+13−31View file
drivers/regulator/max8998.cmodified+8−27View file
drivers/regulator/mc13783-regulator.cmodified+18−35View file
drivers/regulator/mc13892-regulator.cmodified+3−19View file
drivers/regulator/of_regulator.cmodified+6−0View file
drivers/regulator/palmas-regulator.cmodified+171−37View file
drivers/regulator/pcap-regulator.cmodified+2−11View file
drivers/regulator/pcf50633-regulator.cmodified+2−11View file
drivers/regulator/rc5t583-regulator.cmodified+2−20View file
drivers/regulator/s2mps11.cmodified+3−20View file
drivers/regulator/s5m8767.cmodified+43−43View file
drivers/regulator/stw481x-vmmc.cadded+111−0View file
drivers/regulator/ti-abb-regulator.cmodified+28−58View file
drivers/regulator/tps51632-regulator.cmodified+1−10View file
drivers/regulator/tps6105x-regulator.cmodified+4−11View file
drivers/regulator/tps62360-regulator.cmodified+1−16View file
drivers/regulator/tps65023-regulator.cmodified+5−20View file
drivers/regulator/tps6507x-regulator.cmodified+3−20View file
drivers/regulator/tps65090-regulator.cmodified+6−31View file
drivers/regulator/tps65217-regulator.cmodified+12−38View file
drivers/regulator/tps6524x-regulator.cmodified+5−27View file
drivers/regulator/tps6586x-regulator.cmodified+7−26View file
drivers/regulator/tps65910-regulator.cmodified+8−25View file
drivers/regulator/tps65912-regulator.cmodified+7−26View file
drivers/regulator/tps80031-regulator.cmodified+5−25View file
drivers/regulator/twl-regulator.cmodified+1−2View file
drivers/regulator/vexpress.cmodified+1−2View file
drivers/regulator/wm831x-dcdc.cmodified+33−85View file
drivers/regulator/wm831x-isink.cmodified+7−18View file
drivers/regulator/wm831x-ldo.cmodified+19−56View file
drivers/regulator/wm8350-regulator.cmodified+4−8View file
drivers/regulator/wm8400-regulator.cmodified+4−15View file
drivers/regulator/wm8994-regulator.cmodified+3−11View file
include/linux/mfd/core.hmodified+6−0View file
include/linux/regulator/consumer.hmodified+79−0View file
include/linux/regulator/driver.hmodified+16−2View file
include/linux/regulator/machine.hmodified+2−5View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/regulator/as3722-regulator.txt

View file
diff --git a/Documentation/devicetree/bindings/regulator/as3722-regulator.txt b/Documentation/devicetree/bindings/regulator/as3722-regulator.txt
new file mode 100644
index 0000000..caad0c8
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/as3722-regulator.txt
@@ -0,0 +1,91 @@
+Regulator of AMS AS3722 PMIC.
+Name of the regulator subnode must be "regulators".
+
+Optional properties:
+--------------------
+The input supply of regulators are the optional properties on the
+regulator node. The AS3722 is having 7 DCDC step-down regulators as
+sd[0-6], 10 LDOs as ldo[0-7], ldo[9-11]. The input supply of these
+regulators are provided through following properties:
+vsup-sd2-supply: Input supply for SD2.
+vsup-sd3-supply: Input supply for SD3.
+vsup-sd4-supply: Input supply for SD4.
+vsup-sd5-supply: Input supply for SD5.
+vin-ldo0-supply: Input supply for LDO0.
+vin-ldo1-6-supply: Input supply for LDO1 and LDO6.
+vin-ldo2-5-7-supply: Input supply for LDO2, LDO5 and LDO7.
+vin-ldo3-4-supply: Input supply for LDO3 and LDO4.
+vin-ldo9-10-supply: Input supply for LDO9 and LDO10.
+vin-ldo11-supply: Input supply for LDO11.
+
+Optional nodes:
+--------------
+- regulators : Must contain a sub-node per regulator from the list below.
+ Each sub-node should contain the constraints and initialization
+ information for that regulator. See regulator.txt for a
+ description of standard properties for these sub-nodes.
+ Additional custom properties are listed below.
+ sd[0-6], ldo[0-7], ldo[9-11].
+
+ Optional sub-node properties:
+ ----------------------------
+ ams,ext-control: External control of the rail. The option of
+ this properties will tell which external input is
+ controlling this rail. Valid values are 0, 1, 2 ad 3.
+ 0: There is no external control of this rail.
+ 1: Rail is controlled by ENABLE1 input pin.
+ 2: Rail is controlled by ENABLE2 input pin.
+ 3: Rail is controlled by ENABLE3 input pin.
+ ams,enable-tracking: Enable tracking with SD1, only supported
+ by LDO3.
+
+Example:
+-------
+ ams3722: ams3722 {
+ compatible = "ams,as3722";
+ reg = <0x40>;
+ ...
+
+ regulators {
+ vsup-sd2-supply = <...>;
+ ...
+
+ sd0 {
+ regulator-name = "vdd_cpu";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ ams,ext-control = <2>;
+ };
+
+ sd1 {
+ regulator-name = "vdd_core";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ ams,ext-control = <1>;
+ };
+
+ sd2 {
+ regulator-name = "vddio_ddr";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-always-on;
+ };
+
+ sd4 {
+ regulator-name = "avdd-hdmi-pex";
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-always-on;
+ };
+
+ sd5 {
+ regulator-name = "vdd-1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+ ....
+ };
+ };

Documentation/devicetree/bindings/regulator/da9210.txt

View file
diff --git a/Documentation/devicetree/bindings/regulator/da9210.txt b/Documentation/devicetree/bindings/regulator/da9210.txt
new file mode 100644
index 0000000..f120f22
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/da9210.txt
@@ -0,0 +1,21 @@
+* Dialog Semiconductor DA9210 Voltage Regulator
+
+Required properties:
+
+- compatible: must be "diasemi,da9210"
+- reg: the i2c slave address of the regulator. It should be 0x68.
+
+Any standard regulator properties can be used to configure the single da9210
+DCDC.
+
+Example:
+
+ da9210@68 {
+ compatible = "diasemi,da9210";
+ reg = <0x68>;
+
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };

Documentation/devicetree/bindings/regulator/palmas-pmic.txt

View file
diff --git a/Documentation/devicetree/bindings/regulator/palmas-pmic.txt b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt
index 875639a..42e6b6b 100644
--- a/Documentation/devicetree/bindings/regulator/palmas-pmic.txt
+++ b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt
@@ -26,11 +26,17 @@ Optional nodes:
For ti,palmas-pmic - smps12, smps123, smps3 depending on OTP,
smps45, smps457, smps7 depending on variant, smps6, smps[8-9],
- smps10_out2, smps10_out1, do[1-9], ldoln, ldousb.
+ smps10_out2, smps10_out1, ldo[1-9], ldoln, ldousb.
Optional sub-node properties:
ti,warm-reset - maintain voltage during warm reset(boolean)
- ti,roof-floor - control voltage selection by pin(boolean)
+ ti,roof-floor - This takes as optional argument on platform supporting
+ the rail from desired external control. If there is no argument then
+ it will be assume that it is controlled by NSLEEP pin.
+ The valid value for external pins are:
+ ENABLE1 then 1,
+ ENABLE2 then 2 or
+ NSLEEP then 3.
ti,mode-sleep - mode to adopt in pmic sleep 0 - off, 1 - auto,
2 - eco, 3 - forced pwm
ti,smps-range - OTP has the wrong range set for the hardware so override
@@ -61,7 +67,7 @@ pmic {
regulator-always-on;
regulator-boot-on;
ti,warm-reset;
- ti,roof-floor;
+ ti,roof-floor = <1>; /* ENABLE1 control */
ti,mode-sleep = <0>;
ti,smps-range = <1>;
};

Documentation/devicetree/bindings/regulator/regulator.txt

View file
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index 2bd8f09..e2c7f1e 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -14,6 +14,11 @@ Optional properties:
- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
For hardwares which support disabling ramp rate, it should be explicitly
intialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay.
+- regulator-enable-ramp-delay: The time taken, in microseconds, for the supply
+ rail to reach the target voltage, plus/minus whatever tolerance the board
+ design requires. This property describes the total system ramp time
+ required due to the combination of internal ramping of the regulator itself,
+ and board design issues such as trace capacitance and load on the supply.
Deprecated properties:
- regulator-compatible: If a regulator chip contains multiple

Documentation/driver-model/devres.txt

View file
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index fcb34a5..3d9c2a7 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -283,6 +283,7 @@ REGULATOR
devm_regulator_get()
devm_regulator_put()
devm_regulator_bulk_get()
+ devm_regulator_register()
CLOCK
devm_clk_get()

arch/arm/mach-s3c64xx/mach-crag6410.c

View file
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 1a911df..aca7d16 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -310,10 +310,6 @@ static struct regulator_consumer_supply wallvdd_consumers[] = {
REGULATOR_SUPPLY("SPKVDDL", "spi0.1"),
REGULATOR_SUPPLY("SPKVDDR", "spi0.1"),
- REGULATOR_SUPPLY("SPKVDDL", "wm5102-codec"),
- REGULATOR_SUPPLY("SPKVDDR", "wm5102-codec"),
- REGULATOR_SUPPLY("SPKVDDL", "wm5110-codec"),
- REGULATOR_SUPPLY("SPKVDDR", "wm5110-codec"),
REGULATOR_SUPPLY("DC1VDD", "0-0034"),
REGULATOR_SUPPLY("DC2VDD", "0-0034"),
@@ -653,14 +649,6 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] = {
REGULATOR_SUPPLY("DBVDD3", "spi0.1"),
REGULATOR_SUPPLY("LDOVDD", "spi0.1"),
REGULATOR_SUPPLY("CPVDD", "spi0.1"),
-
- REGULATOR_SUPPLY("DBVDD2", "wm5102-codec"),
- REGULATOR_SUPPLY("DBVDD3", "wm5102-codec"),
- REGULATOR_SUPPLY("CPVDD", "wm5102-codec"),
-
- REGULATOR_SUPPLY("DBVDD2", "wm5110-codec"),
- REGULATOR_SUPPLY("DBVDD3", "wm5110-codec"),
- REGULATOR_SUPPLY("CPVDD", "wm5110-codec"),
};
static struct regulator_init_data pvdd_1v8 = {

drivers/mfd/arizona-core.c

View file
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 5ac3aa4..022b186 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -569,13 +569,25 @@ static struct mfd_cell early_devs[] = {
{ .name = "arizona-ldo1" },
};
+static const char *wm5102_supplies[] = {
+ "DBVDD2",
+ "DBVDD3",
+ "CPVDD",
+ "SPKVDDL",
+ "SPKVDDR",
+};
+
static struct mfd_cell wm5102_devs[] = {
{ .name = "arizona-micsupp" },
{ .name = "arizona-extcon" },
{ .name = "arizona-gpio" },
{ .name = "arizona-haptics" },
{ .name = "arizona-pwm" },
- { .name = "wm5102-codec" },
+ {
+ .name = "wm5102-codec",
+ .parent_supplies = wm5102_supplies,
+ .num_parent_supplies = ARRAY_SIZE(wm5102_supplies),
+ },
};
static struct mfd_cell wm5110_devs[] = {
@@ -584,7 +596,17 @@ static struct mfd_cell wm5110_devs[] = {
{ .name = "arizona-gpio" },
{ .name = "arizona-haptics" },
{ .name = "arizona-pwm" },
- { .name = "wm5110-codec" },
+ {
+ .name = "wm5110-codec",
+ .parent_supplies = wm5102_supplies,
+ .num_parent_supplies = ARRAY_SIZE(wm5102_supplies),
+ },
+};
+
+static const char *wm8997_supplies[] = {
+ "DBVDD2",
+ "CPVDD",
+ "SPKVDD",
};
static struct mfd_cell wm8997_devs[] = {
@@ -593,7 +615,11 @@ static struct mfd_cell wm8997_devs[] = {
{ .name = "arizona-gpio" },
{ .name = "arizona-haptics" },
{ .name = "arizona-pwm" },
- { .name = "wm8997-codec" },
+ {
+ .name = "wm8997-codec",
+ .parent_supplies = wm8997_supplies,
+ .num_parent_supplies = ARRAY_SIZE(wm8997_supplies),
+ },
};
int arizona_dev_init(struct arizona *arizona)

drivers/mfd/mfd-core.c

View file
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index f421586..adc8ea3 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/irqdomain.h>
#include <linux/of.h>
+#include <linux/regulator/consumer.h>
static struct device_type mfd_dev_type = {
.name = "mfd_device",
@@ -99,6 +100,13 @@ static int mfd_add_device(struct device *parent, int id,
pdev->dev.dma_mask = parent->dma_mask;
pdev->dev.dma_parms = parent->dma_parms;
+ ret = devm_regulator_bulk_register_supply_alias(
+ &pdev->dev, cell->parent_supplies,
+ parent, cell->parent_supplies,
+ cell->num_parent_supplies);
+ if (ret < 0)
+ goto fail_res;
+
if (parent->of_node && cell->of_compatible) {
for_each_child_of_node(parent->of_node, np) {
if (of_device_is_compatible(np, cell->of_compatible)) {
@@ -112,12 +120,12 @@ static int mfd_add_device(struct device *parent, int id,
ret = platform_device_add_data(pdev,
cell->platform_data, cell->pdata_size);
if (ret)
- goto fail_res;
+ goto fail_alias;
}
ret = mfd_platform_add_cell(pdev, cell);
if (ret)
- goto fail_res;
+ goto fail_alias;
for (r = 0; r < cell->num_resources; r++) {
res[r].name = cell->resources[r].name;
@@ -152,17 +160,17 @@ static int mfd_add_device(struct device *parent, int id,
if (!cell->ignore_resource_conflicts) {
ret = acpi_check_resource_conflict(&res[r]);
if (ret)
- goto fail_res;
+ goto fail_alias;
}
}
ret = platform_device_add_resources(pdev, res, cell->num_resources);
if (ret)
- goto fail_res;
+ goto fail_alias;
ret = platform_device_add(pdev);
if (ret)
- goto fail_res;
+ goto fail_alias;
if (cell->pm_runtime_no_callbacks)
pm_runtime_no_callbacks(&pdev->dev);
@@ -171,6 +179,10 @@ static int mfd_add_device(struct device *parent, int id,
return 0;
+fail_alias:
+ devm_regulator_bulk_unregister_supply_alias(&pdev->dev,
+ cell->parent_supplies,
+ cell->num_parent_supplies);
fail_res:
kfree(res);
fail_device:

drivers/regulator/88pm800.c

View file
diff --git a/drivers/regulator/88pm800.c b/drivers/regulator/88pm800.c
index 3459f60..d333f7e 100644
--- a/drivers/regulator/88pm800.c
+++ b/drivers/regulator/88pm800.c
@@ -141,18 +141,14 @@ struct pm800_regulators {
/* Ranges are sorted in ascending order. */
static const struct regulator_linear_range buck1_volt_range[] = {
- { .min_uV = 600000, .max_uV = 1587500, .min_sel = 0, .max_sel = 0x4f,
- .uV_step = 12500 },
- { .min_uV = 1600000, .max_uV = 1800000, .min_sel = 0x50,
- .max_sel = 0x54, .uV_step = 50000 },
+ REGULATOR_LINEAR_RANGE(600000, 0, 0x4f, 12500),
+ REGULATOR_LINEAR_RANGE(1600000, 0x50, 0x54, 50000),
};
/* BUCK 2~5 have same ranges. */
static const struct regulator_linear_range buck2_5_volt_range[] = {
- { .min_uV = 600000, .max_uV = 1587500, .min_sel = 0, .max_sel = 0x4f,
- .uV_step = 12500 },
- { .min_uV = 1600000, .max_uV = 3300000, .min_sel = 0x50,
- .max_sel = 0x72, .uV_step = 50000 },
+ REGULATOR_LINEAR_RANGE(600000, 0, 0x4f, 12500),
+ REGULATOR_LINEAR_RANGE(1600000, 0x50, 0x72, 50000),
};
static const unsigned int ldo1_volt_table[] = {

drivers/regulator/88pm8607.c

View file
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index 7023097..f704d83 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -391,7 +391,8 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
else
config.regmap = chip->regmap_companion;
- info->regulator = regulator_register(&info->desc, &config);
+ info->regulator = devm_regulator_register(&pdev->dev, &info->desc,
+ &config);
if (IS_ERR(info->regulator)) {
dev_err(&pdev->dev, "failed to register regulator %s\n",
info->desc.name);
@@ -402,14 +403,6 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int pm8607_regulator_remove(struct platform_device *pdev)
-{
- struct pm8607_regulator_info *info = platform_get_drvdata(pdev);
-
- regulator_unregister(info->regulator);
- return 0;
-}
-
static struct platform_device_id pm8607_regulator_driver_ids[] = {
{
.name = "88pm860x-regulator",
@@ -428,7 +421,6 @@ static struct platform_driver pm8607_regulator_driver = {
.owner = THIS_MODULE,
},
.probe = pm8607_regulator_probe,
- .remove = pm8607_regulator_remove,
.id_table = pm8607_regulator_driver_ids,
};

drivers/regulator/Kconfig

View file
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index dfe5809..ce785f4 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -28,16 +28,6 @@ config REGULATOR_DEBUG
help
Say yes here to enable debugging support.
-config REGULATOR_DUMMY
- bool "Provide a dummy regulator if regulator lookups fail"
- help
- If this option is enabled then when a regulator lookup fails
- and the board has not specified that it has provided full
- constraints the regulator core will provide an always
- enabled dummy regulator, allowing consumer drivers to continue.
-
- A warning will be generated when this substitution is done.
-
config REGULATOR_FIXED_VOLTAGE
tristate "Fixed voltage regulator support"
help
@@ -133,6 +123,14 @@ config REGULATOR_AS3711
This driver provides support for the voltage regulators on the
AS3711 PMIC
+config REGULATOR_AS3722
+ tristate "AMS AS3722 PMIC Regulators"
+ depends on MFD_AS3722
+ help
+ This driver provides support for the voltage regulators on the
+ AS3722 PMIC. This will enable support for all the software
+ controllable DCDC/LDO regulators.
+
config REGULATOR_DA903X
tristate "Dialog Semiconductor DA9030/DA9034 regulators"
depends on PMIC_DA903X
@@ -429,6 +427,14 @@ config REGULATOR_TI_ABB
on TI SoCs may be unstable without enabling this as it provides
device specific optimized bias to allow/optimize functionality.
+config REGULATOR_STW481X_VMMC
+ bool "ST Microelectronics STW481X VMMC regulator"
+ depends on MFD_STW481X
+ default y if MFD_STW481X
+ help
+ This driver supports the internal VMMC regulator in the STw481x
+ PMIC chips.
+
config REGULATOR_TPS51632
tristate "TI TPS51632 Power Regulator"
depends on I2C

drivers/regulator/Makefile

View file
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 185cce2..01c597e 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -3,7 +3,7 @@
#
-obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o helpers.o
+obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o helpers.o devres.o
obj-$(CONFIG_OF) += of_regulator.o
obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
@@ -18,6 +18,7 @@ obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o
obj-$(CONFIG_REGULATOR_ANATOP) += anatop-regulator.o
obj-$(CONFIG_REGULATOR_ARIZONA) += arizona-micsupp.o arizona-ldo1.o
obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o
+obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o
obj-$(CONFIG_REGULATOR_DA903X) += da903x.o
obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
obj-$(CONFIG_REGULATOR_DA9055) += da9055-regulator.o
@@ -56,6 +57,7 @@ obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
obj-$(CONFIG_REGULATOR_RC5T583) += rc5t583-regulator.o
obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o
obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
+obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
obj-$(CONFIG_REGULATOR_TPS62360) += tps62360-regulator.o

drivers/regulator/aat2870-regulator.c

View file
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
index 881159d..f70a9bf 100644
--- a/drivers/regulator/aat2870-regulator.c
+++ b/drivers/regulator/aat2870-regulator.c
@@ -176,7 +176,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
config.driver_data = ri;
config.init_data = dev_get_platdata(&pdev->dev);
- rdev = regulator_register(&ri->desc, &config);
+ rdev = devm_regulator_register(&pdev->dev, &ri->desc, &config);
if (IS_ERR(rdev)) {
dev_err(&pdev->dev, "Failed to register regulator %s\n",
ri->desc.name);
@@ -187,21 +187,12 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int aat2870_regulator_remove(struct platform_device *pdev)
-{
- struct regulator_dev *rdev = platform_get_drvdata(pdev);
-
- regulator_unregister(rdev);
- return 0;
-}
-
static struct platform_driver aat2870_regulator_driver = {
.driver = {
.name = "aat2870-regulator",
.owner = THIS_MODULE,
},
.probe = aat2870_regulator_probe,
- .remove = aat2870_regulator_remove,
};
static int __init aat2870_regulator_init(void)

drivers/regulator/ab3100.c

View file
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
index 7d5eaa8..77b46d0 100644
--- a/drivers/regulator/ab3100.c
+++ b/drivers/regulator/ab3100.c
@@ -535,7 +535,7 @@ static int ab3100_regulator_register(struct platform_device *pdev,
config.dev = &pdev->dev;
config.driver_data = reg;
- rdev = regulator_register(desc, &config);
+ rdev = devm_regulator_register(&pdev->dev, desc, &config);
if (IS_ERR(rdev)) {
err = PTR_ERR(rdev);
dev_err(&pdev->dev,
@@ -616,7 +616,6 @@ static int ab3100_regulators_remove(struct platform_device *pdev)
for (i = 0; i < AB3100_NUM_REGULATORS; i++) {
struct ab3100_regulator *reg = &ab3100_regulators[i];
- regulator_unregister(reg->rdev);
reg->rdev = NULL;
}
return 0;

drivers/regulator/ab8500-ext.c

View file
diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c
index 02ff691..29c0faa 100644
--- a/drivers/regulator/ab8500-ext.c
+++ b/drivers/regulator/ab8500-ext.c
@@ -413,16 +413,12 @@ static int ab8500_ext_regulator_probe(struct platform_device *pdev)
&pdata->ext_regulator[i];
/* register regulator with framework */
- info->rdev = regulator_register(&info->desc, &config);
+ info->rdev = devm_regulator_register(&pdev->dev, &info->desc,
+ &config);
if (IS_ERR(info->rdev)) {
err = PTR_ERR(info->rdev);
dev_err(&pdev->dev, "failed to register regulator %s\n",
info->desc.name);
- /* when we fail, un-register all earlier regulators */
- while (--i >= 0) {
- info = &ab8500_ext_regulator_info[i];
- regulator_unregister(info->rdev);
- }
return err;
}
@@ -433,26 +429,8 @@ static int ab8500_ext_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int ab8500_ext_regulator_remove(struct platform_device *pdev)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(ab8500_ext_regulator_info); i++) {
- struct ab8500_ext_regulator_info *info = NULL;
- info = &ab8500_ext_regulator_info[i];
-
- dev_vdbg(rdev_get_dev(info->rdev),
- "%s-remove\n", info->desc.name);
-
- regulator_unregister(info->rdev);
- }
-
- return 0;
-}
-
static struct platform_driver ab8500_ext_regulator_driver = {
.probe = ab8500_ext_regulator_probe,
- .remove = ab8500_ext_regulator_remove,
.driver = {
.name = "ab8500-ext-regulator",

This diff is incomplete. Download the complete patch.

drivers/regulator/ad5398.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/anatop-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/arizona-ldo1.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/arizona-micsupp.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/as3711-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/as3722-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/core.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/da903x.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/da9052-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/da9055-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/da9063-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/da9210-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/devres.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/fan53555.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/fixed.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/gpio-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/helpers.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/internal.h

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/isl6271a-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/lp3971.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/lp872x.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/lp8788-buck.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/lp8788-ldo.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max1586.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max77686.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max77693.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max8649.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max8660.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max8907-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max8925-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max8973-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max8997.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/max8998.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/mc13783-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/mc13892-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/of_regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/palmas-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/pcap-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/pcf50633-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/rc5t583-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/s2mps11.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/s5m8767.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/stw481x-vmmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/ti-abb-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps51632-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps6105x-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps62360-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps65023-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps6507x-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps65090-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps65217-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps6524x-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps6586x-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps65910-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps65912-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/tps80031-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/twl-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/vexpress.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/wm831x-dcdc.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/wm831x-isink.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/wm831x-ldo.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/wm8350-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/wm8400-regulator.c

View file

This diff is incomplete. Download the complete patch.

drivers/regulator/wm8994-regulator.c

View file

This diff is incomplete. Download the complete patch.

include/linux/mfd/core.h

View file

This diff is incomplete. Download the complete patch.

include/linux/regulator/consumer.h

View file

This diff is incomplete. Download the complete patch.

include/linux/regulator/driver.h

View file

This diff is incomplete. Download the complete patch.

include/linux/regulator/machine.h

View file

This diff is incomplete. Download the complete patch.