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:
  regulator: Add MODULE_DEVICE_TABLE to max8997 and max8998
  regulator: fix tps6524x section mismatch
  regulator: Remove more wm831x-specific IRQ operations
  regulator: add ab8500 enable and raise time delays
  regulator: provide consumer interface for fall/rise time
  regulator: add set_voltage_time_sel infrastructure
  regulator: initialization for ab8500 regulators
  regulator: add support for USB voltage regulator
  regulator: switch the ab3100 to use enable_time()
  Regulator: add suspend-finish API for regulator core.
  regulator: fix typo in Kconfig
  regulator: Convert WM831x regulators to genirq
  regulator: If we fail when setting up a supply say which supply
  • Loading branch information
torvalds committed Mar 28, 2011
2 parents 7b724a2 + a51b907 commit 18bcd0c
Show file tree
Hide file tree
Showing 17 changed files with 509 additions and 65 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-ux500/board-mop500-regulators.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/ab8500.h>

extern struct ab8500_regulator_reg_init
ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];

#endif
1 change: 1 addition & 0 deletions arch/arm/mach-ux500/board-mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/amba/serial.h>
#include <linux/spi/spi.h>
#include <linux/mfd/ab8500.h>
#include <linux/regulator/ab8500.h>
#include <linux/mfd/tc3589x.h>
#include <linux/leds-lp5521.h>
#include <linux/input.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ config REGULATOR_MAX8998
and S5PC1XX chips to control VCC_CORE and VCC_USIM voltages.

config REGULATOR_TWL4030
bool "TI TWL4030/TWL5030/TWL6030/TPS695x0 PMIC"
bool "TI TWL4030/TWL5030/TWL6030/TPS659x0 PMIC"
depends on TWL4030_CORE
help
This driver supports the voltage regulators provided by
Expand Down
51 changes: 28 additions & 23 deletions drivers/regulator/ab3100.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,29 +206,6 @@ static int ab3100_enable_regulator(struct regulator_dev *reg)
return err;
}

/* Per-regulator power on delay from spec */
switch (abreg->regreg) {
case AB3100_LDO_A: /* Fallthrough */
case AB3100_LDO_C: /* Fallthrough */
case AB3100_LDO_D: /* Fallthrough */
case AB3100_LDO_E: /* Fallthrough */
case AB3100_LDO_H: /* Fallthrough */
case AB3100_LDO_K:
udelay(200);
break;
case AB3100_LDO_F:
udelay(600);
break;
case AB3100_LDO_G:
udelay(400);
break;
case AB3100_BUCK:
mdelay(1);
break;
default:
break;
}

return 0;
}

Expand Down Expand Up @@ -450,11 +427,37 @@ static int ab3100_get_voltage_regulator_external(struct regulator_dev *reg)
return abreg->plfdata->external_voltage;
}

static int ab3100_enable_time_regulator(struct regulator_dev *reg)
{
struct ab3100_regulator *abreg = reg->reg_data;

/* Per-regulator power on delay from spec */
switch (abreg->regreg) {
case AB3100_LDO_A: /* Fallthrough */
case AB3100_LDO_C: /* Fallthrough */
case AB3100_LDO_D: /* Fallthrough */
case AB3100_LDO_E: /* Fallthrough */
case AB3100_LDO_H: /* Fallthrough */
case AB3100_LDO_K:
return 200;
case AB3100_LDO_F:
return 600;
case AB3100_LDO_G:
return 400;
case AB3100_BUCK:
return 1000;
default:
break;
}
return 0;
}

static struct regulator_ops regulator_ops_fixed = {
.enable = ab3100_enable_regulator,
.disable = ab3100_disable_regulator,
.is_enabled = ab3100_is_enabled_regulator,
.get_voltage = ab3100_get_voltage_regulator,
.enable_time = ab3100_enable_time_regulator,
};

static struct regulator_ops regulator_ops_variable = {
Expand All @@ -464,6 +467,7 @@ static struct regulator_ops regulator_ops_variable = {
.get_voltage = ab3100_get_voltage_regulator,
.set_voltage = ab3100_set_voltage_regulator,
.list_voltage = ab3100_list_voltage_regulator,
.enable_time = ab3100_enable_time_regulator,
};

static struct regulator_ops regulator_ops_variable_sleepable = {
Expand All @@ -474,6 +478,7 @@ static struct regulator_ops regulator_ops_variable_sleepable = {
.set_voltage = ab3100_set_voltage_regulator,
.set_suspend_voltage = ab3100_set_suspend_voltage_regulator,
.list_voltage = ab3100_list_voltage_regulator,
.enable_time = ab3100_enable_time_regulator,
};

/*
Expand Down
Loading

0 comments on commit 18bcd0c

Please sign in to comment.