Skip to content

Commit

Permalink
Merge remote-tracking branches 'regulator/topic/88pm800', 'regulator/…
Browse files Browse the repository at this point in the history
…topic/ab8500', 'regulator/topic/act8865', 'regulator/topic/as3722' and 'regulator/topic/bcm590xx' into regulator-next
  • Loading branch information
Mark Brown committed Aug 5, 2014
6 parents b7b045a + ce44beb + 03187c7 + 7cad4c8 + a181c1c + c969faa commit 862f9f8
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 201 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
ACT8865 regulator
ACT88xx regulators
-------------------

Required properties:
- compatible: "active-semi,act8865"
- compatible: "active-semi,act8846" or "active-semi,act8865"
- reg: I2C slave address

Any standard regulator properties can be used to configure the single regulator.

The valid names for regulators are:
- for act8846:
REG1, REG2, REG3, REG4, REG5, REG6, REG7, REG8, REG9, REG10, REG11, REG12
- for act8865:
DCDC_REG1, DCDC_REG2, DCDC_REG3, LDO_REG1, LDO_REG2, LDO_REG3, LDO_REG4.

Example:
Expand Down
1 change: 0 additions & 1 deletion drivers/regulator/88pm800.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#define PM800_BUCK1_3 (0x3F)
#define PM800_BUCK2 (0x40)
#define PM800_BUCK3 (0x41)
#define PM800_BUCK3 (0x41)
#define PM800_BUCK4 (0x42)
#define PM800_BUCK4_1 (0x43)
#define PM800_BUCK4_2 (0x44)
Expand Down
38 changes: 9 additions & 29 deletions drivers/regulator/ab8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -3037,28 +3037,12 @@ static int ab8500_regulator_register(struct platform_device *pdev,
return 0;
}

static int
ab8500_regulator_of_probe(struct platform_device *pdev,
struct device_node *np)
{
struct of_regulator_match *match = abx500_regulator.match;
int err, i;

for (i = 0; i < abx500_regulator.info_size; i++) {
err = ab8500_regulator_register(
pdev, match[i].init_data, i, match[i].of_node);
if (err)
return err;
}

return 0;
}

static int ab8500_regulator_probe(struct platform_device *pdev)
{
struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
struct device_node *np = pdev->dev.of_node;
int err;
struct of_regulator_match *match;
int err, i;

if (!ab8500) {
dev_err(&pdev->dev, "null mfd parent\n");
Expand All @@ -3075,24 +3059,20 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
"Error parsing regulator init data: %d\n", err);
return err;
}
return ab8500_regulator_of_probe(pdev, np);
}

static int ab8500_regulator_remove(struct platform_device *pdev)
{
int err;

/* remove regulator debug */
err = ab8500_regulator_debug_exit(pdev);
if (err)
return err;
match = abx500_regulator.match;
for (i = 0; i < abx500_regulator.info_size; i++) {
err = ab8500_regulator_register(pdev, match[i].init_data, i,
match[i].of_node);
if (err)
return err;
}

return 0;
}

static struct platform_driver ab8500_regulator_driver = {
.probe = ab8500_regulator_probe,
.remove = ab8500_regulator_remove,
.driver = {
.name = "ab8500-regulator",
.owner = THIS_MODULE,
Expand Down
Loading

0 comments on commit 862f9f8

Please sign in to comment.