diff options
author | Li Jun <B47624@freescale.com> | 2014-03-31 20:00:42 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 12:02:33 -0400 |
commit | f8d17879c9594febb42fad3f8177ed515965a38e (patch) | |
tree | e2c1ea8157b6ae13300ccced1e75080a73999629 | |
parent | 3767c8168a3dee9032b9e77c6a12e919e0a7a514 (diff) |
ENGR00307558-2 usb: chipidea: host: vbus control change for OTG
Leave vbus on/off hanlded by OTG fsm if in OTG mode.
Signed-off-by: Li Jun <b47624@freescale.com>
-rw-r--r-- | drivers/usb/chipidea/host.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index ce3dc7345616..35506d9d62bd 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c | |||
@@ -264,7 +264,11 @@ static int host_start(struct ci_hdrc *ci) | |||
264 | ehci->has_hostpc = ci->hw_bank.lpm; | 264 | ehci->has_hostpc = ci->hw_bank.lpm; |
265 | ehci->imx28_write_fix = ci->imx28_write_fix; | 265 | ehci->imx28_write_fix = ci->imx28_write_fix; |
266 | 266 | ||
267 | if (ci->platdata->reg_vbus) { | 267 | /* |
268 | * vbus is always on if host is not in OTG FSM mode, | ||
269 | * otherwise should be controlled by OTG FSM | ||
270 | */ | ||
271 | if (ci->platdata->reg_vbus && !ci_otg_is_fsm_mode(ci)) { | ||
268 | ret = regulator_enable(ci->platdata->reg_vbus); | 272 | ret = regulator_enable(ci->platdata->reg_vbus); |
269 | if (ret) { | 273 | if (ret) { |
270 | dev_err(ci->dev, | 274 | dev_err(ci->dev, |
@@ -291,7 +295,7 @@ static int host_start(struct ci_hdrc *ci) | |||
291 | return ret; | 295 | return ret; |
292 | 296 | ||
293 | disable_reg: | 297 | disable_reg: |
294 | if (ci->platdata->reg_vbus) | 298 | if (ci->platdata->reg_vbus && !ci_otg_is_fsm_mode(ci)) |
295 | regulator_disable(ci->platdata->reg_vbus); | 299 | regulator_disable(ci->platdata->reg_vbus); |
296 | 300 | ||
297 | put_hcd: | 301 | put_hcd: |
@@ -307,7 +311,7 @@ static void host_stop(struct ci_hdrc *ci) | |||
307 | if (hcd) { | 311 | if (hcd) { |
308 | usb_remove_hcd(hcd); | 312 | usb_remove_hcd(hcd); |
309 | usb_put_hcd(hcd); | 313 | usb_put_hcd(hcd); |
310 | if (ci->platdata->reg_vbus) | 314 | if (ci->platdata->reg_vbus && !ci_otg_is_fsm_mode(ci)) |
311 | regulator_disable(ci->platdata->reg_vbus); | 315 | regulator_disable(ci->platdata->reg_vbus); |
312 | } | 316 | } |
313 | } | 317 | } |