]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts
authorPeter Chen <peter.chen@freescale.com>
Mon, 12 Aug 2013 01:22:56 +0000 (09:22 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:54:50 +0000 (09:54 +0800)
commit04ddfc482d4c9f7f18bda1ab7b0ed8addc67e895
tree7e56eecf3184a577cb3bd18a18310664f2da4dc4
parentc8abeb2809f81ab8f653f698ffe91f48877721f4
usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts

When the gadget role starts, we need to make sure the vbus is lower
than OTGSC_BSV, or there will be an vbus interrupt since we use
B_SESSION_VALID as vbus interrupt to indicate connect and disconnect.
When the host role starts, it may not be useful to wait vbus to lower
than OTGSC_BSV, but it can indicate some hardware problems like the
vbus is still higher than OTGSC_BSV after we disconnect to host some
time later (5000 milliseconds currently), which is obvious not correct.

Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
drivers/usb/chipidea/ci.h
drivers/usb/chipidea/core.c
drivers/usb/chipidea/otg.c