Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (27 commits)
  regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()
  twl-regulator: Fix reg_disable functionality for 4030 and 6030
  twl-regulator: Add turnon delay to reg_enable
  twl-regulator: Restore REMAP configuration in regulator probe
  twl-regulator: Add turnon-delay and REMAP config to twlreg_info struct
  twl-regulator: Define critical regulators as always_on
  twl-regulator: Add all twl4030 regulators to twlreg_info
  regulator: mc13783-regulator: correct the probing time.
  regulator: Fix unbalanced disables/enables in regulator_bulk_{enable,disable} error path
  regulator: core.c: Small coding style cleanup (indentation fixup)
  drivers/regulator: use PTR_ERR to get error code
  regulator: consumer.h - fix build when consumer.h is #included first.
  regulator/mc13783: various cleanups
  regulator/mc13783: rename source file to match other drivers
  Fix some AB3100 regulator issues
  regulator: keep index within bounds in da9034_get_ldo12_voltage()
  regulator: Ensure val is initialised in 88pm8607 choose_voltage()
  regulator: Remove duplicate consts from ab3100
  regulator: Handle regulators without suspend mode configuration
  regulator: Factor out regulator name pretty printing
  ...
  • Loading branch information
Linus Torvalds committed Dec 17, 2009
2 parents 5a865c0 + 6f17c65 commit 22a8059
Show file tree
Hide file tree
Showing 17 changed files with 1,981 additions and 611 deletions.
685 changes: 685 additions & 0 deletions drivers/regulator/88pm8607.c

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ config REGULATOR_MAX1586
regulator via I2C bus. The provided regulator is suitable
for PXA27x chips to control VCC_CORE and VCC_USIM voltages.

config REGULATOR_MAX8660
tristate "Maxim 8660/8661 voltage regulator"
depends on I2C
help
This driver controls a Maxim 8660/8661 voltage output
regulator via I2C bus.

config REGULATOR_TWL4030
bool "TI TWL4030/TWL5030/TWL6030/TPS695x0 PMIC"
depends on TWL4030_CORE
Expand Down Expand Up @@ -157,5 +164,11 @@ config REGULATOR_TPS6507X
three step-down converters and two general-purpose LDO voltage regulators.
It supports TI's software based Class-2 SmartReflex implementation.

config REGULATOR_88PM8607
bool "Marvell 88PM8607 Power regulators"
depends on MFD_88PM8607=y
help
This driver supports 88PM8607 voltage regulator chips.

endif

4 changes: 3 additions & 1 deletion drivers/regulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ obj-$(CONFIG_REGULATOR_BQ24022) += bq24022.o
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o
obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o
obj-$(CONFIG_REGULATOR_WM831X) += wm831x-dcdc.o
obj-$(CONFIG_REGULATOR_WM831X) += wm831x-isink.o
obj-$(CONFIG_REGULATOR_WM831X) += wm831x-ldo.o
Expand All @@ -20,10 +21,11 @@ obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
obj-$(CONFIG_REGULATOR_DA903X) += da903x.o
obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o
obj-$(CONFIG_REGULATOR_MC13783) += mc13783.o
obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o

obj-$(CONFIG_REGULATOR_TPS65023) += tps65023-regulator.o
obj-$(CONFIG_REGULATOR_TPS6507X) += tps6507x-regulator.o
obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o

ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
33 changes: 7 additions & 26 deletions drivers/regulator/ab3100.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static const u8 ab3100_reg_init_order[AB3100_NUM_REGULATORS+2] = {
#define LDO_C_VOLTAGE 2650000
#define LDO_D_VOLTAGE 2650000

static const int const ldo_e_buck_typ_voltages[] = {
static const int ldo_e_buck_typ_voltages[] = {
1800000,
1400000,
1300000,
Expand All @@ -91,7 +91,7 @@ static const int const ldo_e_buck_typ_voltages[] = {
900000,
};

static const int const ldo_f_typ_voltages[] = {
static const int ldo_f_typ_voltages[] = {
1800000,
1400000,
1300000,
Expand All @@ -102,21 +102,21 @@ static const int const ldo_f_typ_voltages[] = {
2650000,
};

static const int const ldo_g_typ_voltages[] = {
static const int ldo_g_typ_voltages[] = {
2850000,
2750000,
1800000,
1500000,
};

static const int const ldo_h_typ_voltages[] = {
static const int ldo_h_typ_voltages[] = {
2750000,
1800000,
1500000,
1200000,
};

static const int const ldo_k_typ_voltages[] = {
static const int ldo_k_typ_voltages[] = {
2750000,
1800000,
};
Expand Down Expand Up @@ -241,24 +241,12 @@ static int ab3100_disable_regulator(struct regulator_dev *reg)
* LDO D is a special regulator. When it is disabled, the entire
* system is shut down. So this is handled specially.
*/
pr_info("Called ab3100_disable_regulator\n");
if (abreg->regreg == AB3100_LDO_D) {
int i;

dev_info(&reg->dev, "disabling LDO D - shut down system\n");
/*
* Set regulators to default values, ignore any errors,
* we're going DOWN
*/
for (i = 0; i < ARRAY_SIZE(ab3100_reg_init_order); i++) {
(void) ab3100_set_register_interruptible(abreg->ab3100,
ab3100_reg_init_order[i],
abreg->plfdata->reg_initvals[i]);
}

/* Setting LDO D to 0x00 cuts the power to the SoC */
return ab3100_set_register_interruptible(abreg->ab3100,
AB3100_LDO_D, 0x00U);

}

/*
Expand Down Expand Up @@ -607,13 +595,6 @@ static int __init ab3100_regulators_probe(struct platform_device *pdev)
}
}

if (err) {
dev_err(&pdev->dev,
"LDO D regulator initialization failed with error %d\n",
err);
return err;
}

/* Register the regulators */
for (i = 0; i < AB3100_NUM_REGULATORS; i++) {
struct ab3100_regulator *reg = &ab3100_regulators[i];
Expand Down Expand Up @@ -688,7 +669,7 @@ static __init int ab3100_regulators_init(void)

static __exit void ab3100_regulators_exit(void)
{
platform_driver_register(&ab3100_regulators_driver);
platform_driver_unregister(&ab3100_regulators_driver);
}

subsys_initcall(ab3100_regulators_init);
Expand Down
Loading

0 comments on commit 22a8059

Please sign in to comment.