]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
twl4030 usb regulator support tweaks
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 1 Dec 2008 21:24:21 +0000 (13:24 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 15 Dec 2008 19:31:36 +0000 (11:31 -0800)
This contains two bugfixes to the initial twl4030 regulator
support patch related to USB:

 (a) always overwrite the old list of consumers ... else
     the regulators all share the same "usb1v5" name;
 (b) don't set up the "usbcp" regulator, which turns out
     to be managed through separate controls, usually ULPI
     directly from the OTG controller.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/mfd/twl4030-core.c
drivers/regulator/twl4030-regulator.c
include/linux/i2c/twl4030.h

index 26dea6b448f6b4a808a89567b6327283afa356a6..1b178cd40131899a33c5c3049cc1b890af0e2c79 100644 (file)
@@ -441,7 +441,7 @@ add_regulator_linked(int num, struct regulator_init_data *pdata,
        if (!pdata)
                return NULL;
 
-       if (consumers && !pdata->consumer_supplies) {
+       if (consumers) {
                pdata->consumer_supplies = consumers;
                pdata->num_consumer_supplies = num_consumers;
        }
@@ -564,9 +564,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
                static struct regulator_consumer_supply usb3v1 = {
                        .supply =       "usb3v1",
                };
-               static struct regulator_consumer_supply usbcp = {
-                       .supply =       "usbcp",
-               };
 
                /* this is a template that gets copied */
                struct regulator_init_data usb_fixed = {
@@ -581,7 +578,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
                usb1v5.dev = usb_transceiver;
                usb1v8.dev = usb_transceiver;
                usb3v1.dev = usb_transceiver;
-               usbcp.dev = usb_transceiver;
 
                child = add_regulator_linked(TWL4030_REG_VUSB1V5, &usb_fixed,
                                &usb1v5, 1);
@@ -597,11 +593,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
                                &usb3v1, 1);
                if (IS_ERR(child))
                        return PTR_ERR(child);
-
-               child = add_regulator_linked(TWL4030_REG_VUSBCP, &usb_fixed,
-                               &usbcp, 1);
-               if (IS_ERR(child))
-                       return PTR_ERR(child);
        }
 
        /* maybe add LDOs that are omitted on cost-reduced parts */
index 7b70df85850f339118cc70c656a7b7ba48b4566a..472c35a218cafe0d0177ae2230eaf34f6c301774 100644 (file)
@@ -391,7 +391,7 @@ static struct twlreg_info twl4030_regs[] = {
        TWL_FIXED_LDO(VUSB1V5, 0x71, 1500, 17),
        TWL_FIXED_LDO(VUSB1V8, 0x74, 1800, 18),
        TWL_FIXED_LDO(VUSB3V1, 0x77, 3100, 19),
-       TWL_FIXED_LDO(VUSBCP, 0x7a, 4800, 21),
+       /* VUSBCP is managed *only* by the USB subchip */
 };
 
 static int twl4030reg_probe(struct platform_device *pdev)
index e606d50b685d7b97a22f059dc8b4a18f505ccecd..93d483d1096782489061aedff1c84d062b1d0a77 100644 (file)
@@ -417,6 +417,5 @@ int twl4030_sih_setup(int module);
 #define TWL4030_REG_VUSB1V5    17
 #define TWL4030_REG_VUSB1V8    18
 #define TWL4030_REG_VUSB3V1    19
-#define TWL4030_REG_VUSBCP     20
 
 #endif /* End of __TWL4030_H */