]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: chipidea: udc: fix misuse of REGS_SHARED and PULLUP_ON_VBUS flags
authorPeter Chen <peter.chen@freescale.com>
Mon, 12 Aug 2013 01:22:57 +0000 (09:22 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:54:50 +0000 (09:54 +0800)
commitb55b1290375c9b83d654ebaff2c804ec812f3290
treebcb3a33a77f8a3d60a1af18fcb879f4a379a1f0c
parent04ddfc482d4c9f7f18bda1ab7b0ed8addc67e895
usb: chipidea: udc: fix misuse of REGS_SHARED and PULLUP_ON_VBUS flags

CI_HDRC_REGS_SHARED stands for the controller registers is shared
with other USB drivers, if all USB drivers are at chipidea/, it doesn't
needed to be set.
CI_HDRC_PULLUP_ON_VBUS stands for pullup dp when the vbus is on. This
flag doesn't need to be set if the vbus is always on for gadget
since dp has always pulled up after the gadget has initialized.

So, the current code seems to misuse this two flags.
- When the gadget initializes, the controller doesn't need to run if
it depends on vbus (CI_HDRC_PULLUP_ON_VBUS), it does not relate to
shared register.
- When the gadget starts (load one gadget module), the controller
can run if vbus is on (CI_HDRC_PULLUP_ON_VBUS), it also does not
relate to shared register.

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/udc.c