瀏覽代碼

mfd: twl4030 regulator bug fixes

This contains two bugfixes to the initial twl4030 regulator
support patch related to USB:

 (a) always overwrite the old list of consumers ... else
     the regulator handles all use 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: Samuel Ortiz <sameo@openedhand.com>
David Brownell 16 年之前
父節點
當前提交
b73eac7871
共有 2 個文件被更改,包括 1 次插入11 次删除
  1. 1 10
      drivers/mfd/twl4030-core.c
  2. 0 1
      include/linux/i2c/twl4030.h

+ 1 - 10
drivers/mfd/twl4030-core.c

@@ -433,7 +433,7 @@ add_regulator_linked(int num, struct regulator_init_data *pdata,
 	if (!pdata)
 	if (!pdata)
 		return NULL;
 		return NULL;
 
 
-	if (consumers && !pdata->consumer_supplies) {
+	if (consumers) {
 		pdata->consumer_supplies = consumers;
 		pdata->consumer_supplies = consumers;
 		pdata->num_consumer_supplies = num_consumers;
 		pdata->num_consumer_supplies = num_consumers;
 	}
 	}
@@ -556,9 +556,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
 		static struct regulator_consumer_supply usb3v1 = {
 		static struct regulator_consumer_supply usb3v1 = {
 			.supply =	"usb3v1",
 			.supply =	"usb3v1",
 		};
 		};
-		static struct regulator_consumer_supply usbcp = {
-			.supply =	"usbcp",
-		};
 
 
 		/* this is a template that gets copied */
 		/* this is a template that gets copied */
 		struct regulator_init_data usb_fixed = {
 		struct regulator_init_data usb_fixed = {
@@ -573,7 +570,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
 		usb1v5.dev = usb_transceiver;
 		usb1v5.dev = usb_transceiver;
 		usb1v8.dev = usb_transceiver;
 		usb1v8.dev = usb_transceiver;
 		usb3v1.dev = usb_transceiver;
 		usb3v1.dev = usb_transceiver;
-		usbcp.dev = usb_transceiver;
 
 
 		child = add_regulator_linked(TWL4030_REG_VUSB1V5, &usb_fixed,
 		child = add_regulator_linked(TWL4030_REG_VUSB1V5, &usb_fixed,
 				&usb1v5, 1);
 				&usb1v5, 1);
@@ -589,11 +585,6 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
 				&usb3v1, 1);
 				&usb3v1, 1);
 		if (IS_ERR(child))
 		if (IS_ERR(child))
 			return PTR_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 */
 	/* maybe add LDOs that are omitted on cost-reduced parts */

+ 0 - 1
include/linux/i2c/twl4030.h

@@ -354,6 +354,5 @@ int twl4030_set_gpio_debounce(int gpio, int enable);
 #define TWL4030_REG_VUSB1V5	17
 #define TWL4030_REG_VUSB1V5	17
 #define TWL4030_REG_VUSB1V8	18
 #define TWL4030_REG_VUSB1V8	18
 #define TWL4030_REG_VUSB3V1	19
 #define TWL4030_REG_VUSB3V1	19
-#define TWL4030_REG_VUSBCP	20
 
 
 #endif /* End of __TWL4030_H */
 #endif /* End of __TWL4030_H */