summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Li <Frank.Li@freescale.com>2010-04-12 12:24:18 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-25 11:20:22 +0200
commitb14efae4d3d254b1ed0366eaef0398403aa7b703 (patch)
treedac819096c2da82860dbfa12c831bf06fa7e6df9
parent8fb29b6f0ad8e1f855ef2f8c1b5d4869c7125608 (diff)
ENGR00122435 iMX23 Support USB current draw and fix power switch issue
Support USB current draw on mx23 and fix power switch issue. Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
-rw-r--r--arch/arm/mach-mx23/usb_dr.c7
-rw-r--r--drivers/power/mxs/linux.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-mx23/usb_dr.c b/arch/arm/mach-mx23/usb_dr.c
index 1a196e70458a..13f9a296909c 100644
--- a/arch/arm/mach-mx23/usb_dr.c
+++ b/arch/arm/mach-mx23/usb_dr.c
@@ -164,5 +164,8 @@ void fsl_phy_set_power(struct fsl_xcvr_ops *this,
gpio_free(USB_POWER_ENABLE);
}
-module_init(usb_dr_init);
-
+#ifdef CONFIG_MXS_VBUS_CURRENT_DRAW
+ fs_initcall(usb_dr_init);
+#else
+ module_init(usb_dr_init);
+#endif
diff --git a/drivers/power/mxs/linux.c b/drivers/power/mxs/linux.c
index 4c80c36529c2..6a3172415145 100644
--- a/drivers/power/mxs/linux.c
+++ b/drivers/power/mxs/linux.c
@@ -752,6 +752,8 @@ static int mxs_bat_probe(struct platform_device *pdev)
int ret = 0;
+ /* enable usb device presence detection */
+ fsl_enable_usb_plugindetect();
ret = ddi_power_init_battery();
if (ret) {
@@ -941,8 +943,6 @@ static int mxs_bat_probe(struct platform_device *pdev)
*/
init_protection(info);
- /* enable usb device presence detection */
- fsl_enable_usb_plugindetect();
return 0;