Skip to content

Commit

Permalink
Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/broonie/regulator into next/drivers

The pxa regulator branch removes the bq24022 driver, while a lot of
other regulator drivers got added in the regulator tree. This
resolves the trivial conflicts by merging in the regulator patches
that are already merged into v3.4.

Conflicts:
	drivers/regulator/Kconfig
	drivers/regulator/Makefile

Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
arndb committed Mar 24, 2012
2 parents f907ab0 + 4992fa1 commit 511f1cb
Show file tree
Hide file tree
Showing 48 changed files with 3,654 additions and 1,042 deletions.
68 changes: 68 additions & 0 deletions Documentation/devicetree/bindings/regulator/twl-regulator.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
TWL family of regulators

Required properties:
For twl6030 regulators/LDOs
- compatible:
- "ti,twl6030-vaux1" for VAUX1 LDO
- "ti,twl6030-vaux2" for VAUX2 LDO
- "ti,twl6030-vaux3" for VAUX3 LDO
- "ti,twl6030-vmmc" for VMMC LDO
- "ti,twl6030-vpp" for VPP LDO
- "ti,twl6030-vusim" for VUSIM LDO
- "ti,twl6030-vana" for VANA LDO
- "ti,twl6030-vcxio" for VCXIO LDO
- "ti,twl6030-vdac" for VDAC LDO
- "ti,twl6030-vusb" for VUSB LDO
- "ti,twl6030-v1v8" for V1V8 LDO
- "ti,twl6030-v2v1" for V2V1 LDO
- "ti,twl6030-clk32kg" for CLK32KG RESOURCE
- "ti,twl6030-vdd1" for VDD1 SMPS
- "ti,twl6030-vdd2" for VDD2 SMPS
- "ti,twl6030-vdd3" for VDD3 SMPS
For twl6025 regulators/LDOs
- compatible:
- "ti,twl6025-ldo1" for LDO1 LDO
- "ti,twl6025-ldo2" for LDO2 LDO
- "ti,twl6025-ldo3" for LDO3 LDO
- "ti,twl6025-ldo4" for LDO4 LDO
- "ti,twl6025-ldo5" for LDO5 LDO
- "ti,twl6025-ldo6" for LDO6 LDO
- "ti,twl6025-ldo7" for LDO7 LDO
- "ti,twl6025-ldoln" for LDOLN LDO
- "ti,twl6025-ldousb" for LDOUSB LDO
- "ti,twl6025-smps3" for SMPS3 SMPS
- "ti,twl6025-smps4" for SMPS4 SMPS
- "ti,twl6025-vio" for VIO SMPS
For twl4030 regulators/LDOs
- compatible:
- "ti,twl4030-vaux1" for VAUX1 LDO
- "ti,twl4030-vaux2" for VAUX2 LDO
- "ti,twl5030-vaux2" for VAUX2 LDO
- "ti,twl4030-vaux3" for VAUX3 LDO
- "ti,twl4030-vaux4" for VAUX4 LDO
- "ti,twl4030-vmmc1" for VMMC1 LDO
- "ti,twl4030-vmmc2" for VMMC2 LDO
- "ti,twl4030-vpll1" for VPLL1 LDO
- "ti,twl4030-vpll2" for VPLL2 LDO
- "ti,twl4030-vsim" for VSIM LDO
- "ti,twl4030-vdac" for VDAC LDO
- "ti,twl4030-vintana2" for VINTANA2 LDO
- "ti,twl4030-vio" for VIO LDO
- "ti,twl4030-vdd1" for VDD1 SMPS
- "ti,twl4030-vdd2" for VDD2 SMPS
- "ti,twl4030-vintana1" for VINTANA1 LDO
- "ti,twl4030-vintdig" for VINTDIG LDO
- "ti,twl4030-vusb1v5" for VUSB1V5 LDO
- "ti,twl4030-vusb1v8" for VUSB1V8 LDO
- "ti,twl4030-vusb3v1" for VUSB3V1 LDO

Optional properties:
- Any optional property defined in bindings/regulator/regulator.txt

Example:

xyz: regulator@0 {
compatible = "ti,twl6030-vaux1";
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <3000000>;
};
5 changes: 5 additions & 0 deletions Documentation/driver-model/devres.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,8 @@ IOMAP
pcim_iounmap()
pcim_iomap_table() : array of mapped addresses indexed by BAR
pcim_iomap_regions() : do request_region() and iomap() on multiple BARs

REGULATOR
devm_regulator_get()
devm_regulator_put()
devm_regulator_bulk_get()
9 changes: 9 additions & 0 deletions arch/arm/mach-imx/mach-pcm037.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <linux/usb/ulpi.h>
#include <linux/gfp.h>
#include <linux/memblock.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>

#include <media/soc_camera.h>

Expand Down Expand Up @@ -570,6 +572,11 @@ static int __init pcm037_otg_mode(char *options)
}
__setup("otg_mode=", pcm037_otg_mode);

static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
REGULATOR_SUPPLY("vddvario", "smsc911x"),
};

/*
* Board specific initialization.
*/
Expand All @@ -579,6 +586,8 @@ static void __init pcm037_init(void)

imx31_soc_init();

regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

mxc_iomux_set_gpr(MUX_PGP_UH2, 1);

mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins),
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-u300/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ static struct regulator_consumer_supply supply_ldo_c[] = {
*/
static struct regulator_consumer_supply supply_ldo_d[] = {
{
.dev = NULL,
.supply = "vana15", /* Powers the SoC (CPU etc) */
},
};
Expand Down Expand Up @@ -92,7 +91,6 @@ static struct regulator_consumer_supply supply_ldo_k[] = {
*/
static struct regulator_consumer_supply supply_ldo_ext[] = {
{
.dev = NULL,
.supply = "vext", /* External power */
},
};
Expand Down
9 changes: 9 additions & 0 deletions arch/arm/plat-mxc/3ds_debugboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/smsc911x.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>

#include <mach/hardware.h>

Expand Down Expand Up @@ -148,6 +150,11 @@ static struct irq_chip expio_irq_chip = {
.irq_unmask = expio_unmask_irq,
};

static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
REGULATOR_SUPPLY("vddvario", "smsc911x"),
};

int __init mxc_expio_init(u32 base, u32 p_irq)
{
int i;
Expand Down Expand Up @@ -188,6 +195,8 @@ int __init mxc_expio_init(u32 base, u32 p_irq)
irq_set_chained_handler(p_irq, mxc_expio_irq_handler);

/* Register Lan device on the debugboard */
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

smsc911x_resources[0].start = LAN9217_BASE_ADDR(base);
smsc911x_resources[0].end = LAN9217_BASE_ADDR(base) + 0x100 - 1;
platform_device_register(&smsc_lan9217_device);
Expand Down
49 changes: 44 additions & 5 deletions drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ add_regulator_linked(int num, struct regulator_init_data *pdata,
unsigned num_consumers, unsigned long features)
{
unsigned sub_chip_id;
struct twl_regulator_driver_data drv_data;

/* regulator framework demands init_data ... */
if (!pdata)
return NULL;
Expand All @@ -626,7 +628,19 @@ add_regulator_linked(int num, struct regulator_init_data *pdata,
pdata->num_consumer_supplies = num_consumers;
}

pdata->driver_data = (void *)features;
if (pdata->driver_data) {
/* If we have existing drv_data, just add the flags */
struct twl_regulator_driver_data *tmp;
tmp = pdata->driver_data;
tmp->features |= features;
} else {
/* add new driver data struct, used only during init */
drv_data.features = features;
drv_data.set_voltage = NULL;
drv_data.get_voltage = NULL;
drv_data.data = NULL;
pdata->driver_data = &drv_data;
}

/* NOTE: we currently ignore regulator IRQs, e.g. for short circuits */
sub_chip_id = twl_map[TWL_MODULE_PM_MASTER].sid;
Expand Down Expand Up @@ -749,9 +763,9 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)

/* we need to connect regulators to this transceiver */
if (twl_has_regulator() && child) {
usb1v5.dev = child;
usb1v8.dev = child;
usb3v1.dev = child;
usb1v5.dev_name = dev_name(child);
usb1v8.dev_name = dev_name(child);
usb3v1.dev_name = dev_name(child);
}
}
if (twl_has_usb() && pdata->usb && twl_class_is_6030()) {
Expand Down Expand Up @@ -797,7 +811,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
return PTR_ERR(child);
/* we need to connect regulators to this transceiver */
if (twl_has_regulator() && child)
usb3v3.dev = child;
usb3v3.dev_name = dev_name(child);
} else if (twl_has_regulator() && twl_class_is_6030()) {
if (features & TWL6025_SUBCLASS)
child = add_regulator(TWL6025_REG_LDOUSB,
Expand Down Expand Up @@ -933,6 +947,31 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
/* twl6030 regulators */
if (twl_has_regulator() && twl_class_is_6030() &&
!(features & TWL6025_SUBCLASS)) {
child = add_regulator(TWL6030_REG_VDD1, pdata->vdd1,
features);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VDD2, pdata->vdd2,
features);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VDD3, pdata->vdd3,
features);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_V1V8, pdata->v1v8,
features);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_V2V1, pdata->v2v1,
features);
if (IS_ERR(child))
return PTR_ERR(child);

child = add_regulator(TWL6030_REG_VMMC, pdata->vmmc,
features);
if (IS_ERR(child))
Expand Down
Loading

0 comments on commit 511f1cb

Please sign in to comment.