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/max1586: fix V3 gain calculation integer overflow
  regulator/max1586: support increased V3 voltage range
  regulator: lp3971 - fix driver link error when built-in.
  LP3971 PMIC regulator driver (updated and combined version)
  regulator: remove driver_data direct access of struct device
  regulator: Set MODULE_ALIAS for regulator drivers
  regulator: Support list_voltage for fixed voltage regulator
  regulator: Move regulator drivers to subsys_initcall()
  regulator: build fix for powerpc - renamed show_state
  regulator: add userspace-consumer driver
  Maxim 1586 regulator driver
  • Loading branch information
Linus Torvalds committed Jun 15, 2009
2 parents 9c7cb99 + c8f1e50 commit d3bf80b
Show file tree
Hide file tree
Showing 14 changed files with 1,236 additions and 8 deletions.
26 changes: 26 additions & 0 deletions drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ config REGULATOR_VIRTUAL_CONSUMER

If unsure, say no.

config REGULATOR_USERSPACE_CONSUMER
tristate "Userspace regulator consumer support"
default n
help
There are some classes of devices that are controlled entirely
from user space. Usersapce consumer driver provides ability to
control power supplies for such devices.

If unsure, say no.

config REGULATOR_BQ24022
tristate "TI bq24022 Dual Input 1-Cell Li-Ion Charger IC"
default n
Expand All @@ -56,6 +66,15 @@ config REGULATOR_BQ24022
charging select between 100 mA and 500 mA charging current
limit.

config REGULATOR_MAX1586
tristate "Maxim 1586/1587 voltage regulator"
depends on I2C
default n
help
This driver controls a Maxim 1586 or 1587 voltage output
regulator via I2C bus. The provided regulator is suitable
for PXA27x chips to control VCC_CORE and VCC_USIM voltages.

config REGULATOR_TWL4030
bool "TI TWL4030/TWL5030/TPS695x0 PMIC"
depends on TWL4030_CORE
Expand Down Expand Up @@ -91,4 +110,11 @@ config REGULATOR_PCF50633
Say Y here to support the voltage regulators and convertors
on PCF50633

config REGULATOR_LP3971
tristate "National Semiconductors LP3971 PMIC regulator driver"
depends on I2C
help
Say Y here to support the voltage regulators and convertors
on National Semiconductors LP3971 PMIC

endif
3 changes: 3 additions & 0 deletions drivers/regulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
obj-$(CONFIG_REGULATOR) += core.o
obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o

obj-$(CONFIG_REGULATOR_BQ24022) += bq24022.o
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
obj-$(CONFIG_REGULATOR_TWL4030) += twl4030-regulator.o
obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/da903x.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ static int __init da903x_regulator_init(void)
{
return platform_driver_register(&da903x_regulator_driver);
}
module_init(da903x_regulator_init);
subsys_initcall(da903x_regulator_init);

static void __exit da903x_regulator_exit(void)
{
Expand Down
18 changes: 16 additions & 2 deletions drivers/regulator/fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,22 @@ static int fixed_voltage_get_voltage(struct regulator_dev *dev)
return data->microvolts;
}

static int fixed_voltage_list_voltage(struct regulator_dev *dev,
unsigned selector)
{
struct fixed_voltage_data *data = rdev_get_drvdata(dev);

if (selector != 0)
return -EINVAL;

return data->microvolts;
}

static struct regulator_ops fixed_voltage_ops = {
.is_enabled = fixed_voltage_is_enabled,
.enable = fixed_voltage_enable,
.get_voltage = fixed_voltage_get_voltage,
.list_voltage = fixed_voltage_list_voltage,
};

static int regulator_fixed_voltage_probe(struct platform_device *pdev)
Expand All @@ -69,7 +81,8 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev)
}
drvdata->desc.type = REGULATOR_VOLTAGE;
drvdata->desc.owner = THIS_MODULE;
drvdata->desc.ops = &fixed_voltage_ops,
drvdata->desc.ops = &fixed_voltage_ops;
drvdata->desc.n_voltages = 1;

drvdata->microvolts = config->microvolts;

Expand Down Expand Up @@ -117,7 +130,7 @@ static int __init regulator_fixed_voltage_init(void)
{
return platform_driver_register(&regulator_fixed_voltage_driver);
}
module_init(regulator_fixed_voltage_init);
subsys_initcall(regulator_fixed_voltage_init);

static void __exit regulator_fixed_voltage_exit(void)
{
Expand All @@ -128,3 +141,4 @@ module_exit(regulator_fixed_voltage_exit);
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_DESCRIPTION("Fixed voltage regulator");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:reg-fixed-voltage");
Loading

0 comments on commit d3bf80b

Please sign in to comment.