public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.28-rc6-omap-git] twl4030 usb regulator support tweaks
@ 2008-12-01 21:24 David Brownell
  2008-12-15 19:31 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: David Brownell @ 2008-12-01 21:24 UTC (permalink / raw)
  To: linux-omap

From: David Brownell <dbrownell@users.sourceforge.net>

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>
---
NOTE:  the version of this patch going to mainline doesn't
include the twl4030-regulator.c fragment, since that driver
has not yet gone to mainline.

 drivers/mfd/twl4030-core.c            |   11 +----------
 drivers/regulator/twl4030-regulator.c |    2 +-
 include/linux/i2c/twl4030.h           |    1 -
 3 files changed, 2 insertions(+), 12 deletions(-)

--- a/drivers/mfd/twl4030-core.c
+++ b/drivers/mfd/twl4030-core.c
@@ -441,7 +441,7 @@ add_regulator_linked(int num, struct reg
 	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_dat
 		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_dat
 		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_dat
 				&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 */
--- a/drivers/regulator/twl4030-regulator.c
+++ b/drivers/regulator/twl4030-regulator.c
@@ -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)
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -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 */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 2.6.28-rc6-omap-git] twl4030 usb regulator support tweaks
  2008-12-01 21:24 [patch 2.6.28-rc6-omap-git] twl4030 usb regulator support tweaks David Brownell
@ 2008-12-15 19:31 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2008-12-15 19:31 UTC (permalink / raw)
  To: David Brownell; +Cc: linux-omap

* David Brownell <david-b@pacbell.net> [081201 13:55]:
> From: David Brownell <dbrownell@users.sourceforge.net>
> 
> 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>
> ---
> NOTE:  the version of this patch going to mainline doesn't
> include the twl4030-regulator.c fragment, since that driver
> has not yet gone to mainline.

Pushing this to l-o tree today.

Tony

> 
>  drivers/mfd/twl4030-core.c            |   11 +----------
>  drivers/regulator/twl4030-regulator.c |    2 +-
>  include/linux/i2c/twl4030.h           |    1 -
>  3 files changed, 2 insertions(+), 12 deletions(-)
> 
> --- a/drivers/mfd/twl4030-core.c
> +++ b/drivers/mfd/twl4030-core.c
> @@ -441,7 +441,7 @@ add_regulator_linked(int num, struct reg
>  	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_dat
>  		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_dat
>  		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_dat
>  				&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 */
> --- a/drivers/regulator/twl4030-regulator.c
> +++ b/drivers/regulator/twl4030-regulator.c
> @@ -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)
> --- a/include/linux/i2c/twl4030.h
> +++ b/include/linux/i2c/twl4030.h
> @@ -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 */
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-15 19:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01 21:24 [patch 2.6.28-rc6-omap-git] twl4030 usb regulator support tweaks David Brownell
2008-12-15 19:31 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox