Skip to content

Commit d3bf80b

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents 9c7cb99 + c8f1e50 commit d3bf80b

File tree

14 files changed

+1236
-8
lines changed

14 files changed

+1236
-8
lines changed

drivers/regulator/Kconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ config REGULATOR_VIRTUAL_CONSUMER
4747

4848
If unsure, say no.
4949

50+
config REGULATOR_USERSPACE_CONSUMER
51+
tristate "Userspace regulator consumer support"
52+
default n
53+
help
54+
There are some classes of devices that are controlled entirely
55+
from user space. Usersapce consumer driver provides ability to
56+
control power supplies for such devices.
57+
58+
If unsure, say no.
59+
5060
config REGULATOR_BQ24022
5161
tristate "TI bq24022 Dual Input 1-Cell Li-Ion Charger IC"
5262
default n
@@ -56,6 +66,15 @@ config REGULATOR_BQ24022
5666
charging select between 100 mA and 500 mA charging current
5767
limit.
5868

69+
config REGULATOR_MAX1586
70+
tristate "Maxim 1586/1587 voltage regulator"
71+
depends on I2C
72+
default n
73+
help
74+
This driver controls a Maxim 1586 or 1587 voltage output
75+
regulator via I2C bus. The provided regulator is suitable
76+
for PXA27x chips to control VCC_CORE and VCC_USIM voltages.
77+
5978
config REGULATOR_TWL4030
6079
bool "TI TWL4030/TWL5030/TPS695x0 PMIC"
6180
depends on TWL4030_CORE
@@ -91,4 +110,11 @@ config REGULATOR_PCF50633
91110
Say Y here to support the voltage regulators and convertors
92111
on PCF50633
93112

113+
config REGULATOR_LP3971
114+
tristate "National Semiconductors LP3971 PMIC regulator driver"
115+
depends on I2C
116+
help
117+
Say Y here to support the voltage regulators and convertors
118+
on National Semiconductors LP3971 PMIC
119+
94120
endif

drivers/regulator/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
obj-$(CONFIG_REGULATOR) += core.o
77
obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
88
obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
9+
obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o
910

1011
obj-$(CONFIG_REGULATOR_BQ24022) += bq24022.o
12+
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
13+
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
1114
obj-$(CONFIG_REGULATOR_TWL4030) += twl4030-regulator.o
1215
obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
1316
obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o

drivers/regulator/da903x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ static int __init da903x_regulator_init(void)
504504
{
505505
return platform_driver_register(&da903x_regulator_driver);
506506
}
507-
module_init(da903x_regulator_init);
507+
subsys_initcall(da903x_regulator_init);
508508

509509
static void __exit da903x_regulator_exit(void)
510510
{

drivers/regulator/fixed.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,22 @@ static int fixed_voltage_get_voltage(struct regulator_dev *dev)
4444
return data->microvolts;
4545
}
4646

47+
static int fixed_voltage_list_voltage(struct regulator_dev *dev,
48+
unsigned selector)
49+
{
50+
struct fixed_voltage_data *data = rdev_get_drvdata(dev);
51+
52+
if (selector != 0)
53+
return -EINVAL;
54+
55+
return data->microvolts;
56+
}
57+
4758
static struct regulator_ops fixed_voltage_ops = {
4859
.is_enabled = fixed_voltage_is_enabled,
4960
.enable = fixed_voltage_enable,
5061
.get_voltage = fixed_voltage_get_voltage,
62+
.list_voltage = fixed_voltage_list_voltage,
5163
};
5264

5365
static int regulator_fixed_voltage_probe(struct platform_device *pdev)
@@ -69,7 +81,8 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev)
6981
}
7082
drvdata->desc.type = REGULATOR_VOLTAGE;
7183
drvdata->desc.owner = THIS_MODULE;
72-
drvdata->desc.ops = &fixed_voltage_ops,
84+
drvdata->desc.ops = &fixed_voltage_ops;
85+
drvdata->desc.n_voltages = 1;
7386

7487
drvdata->microvolts = config->microvolts;
7588

@@ -117,7 +130,7 @@ static int __init regulator_fixed_voltage_init(void)
117130
{
118131
return platform_driver_register(&regulator_fixed_voltage_driver);
119132
}
120-
module_init(regulator_fixed_voltage_init);
133+
subsys_initcall(regulator_fixed_voltage_init);
121134

122135
static void __exit regulator_fixed_voltage_exit(void)
123136
{
@@ -128,3 +141,4 @@ module_exit(regulator_fixed_voltage_exit);
128141
MODULE_AUTHOR("Mark Brown <[email protected]>");
129142
MODULE_DESCRIPTION("Fixed voltage regulator");
130143
MODULE_LICENSE("GPL");
144+
MODULE_ALIAS("platform:reg-fixed-voltage");

0 commit comments

Comments
 (0)