linux/drivers/usb/chipidea
Sascha Hauer 05986ba9b0 USB: chipidea: i.MX: simplify usbmisc
The chipidea i.MX driver is split into two drivers. The ci_hdrc_imx driver
handles the chipidea cores and the usbmisc_imx driver handles the noncore
registers common to all chipidea cores (but SoC specific). Current flow is:

- usbmisc sets an ops pointer in the ci_hdrc_imx driver during probe
- ci_hdrc_imx checks if the pointer is valid during probe, if yes calls
  the functions in the ops pointer.
- usbmisc_imx calls back into the ci_hdrc_imx driver to get additional
  data

This is overly complicated and has problems if the drivers are compiled
as modules. In this case the usbmisc_imx driver can be unloaded even if
the ci_hdrc_imx driver still needs usbmisc functionality.

This patch changes this by letting the ci_hdrc_imx driver calling functions
from the usbmisc_imx driver. This way the symbol resolving during module
load makes sure the ci_hdrc_imx driver depends on the usbmisc_imx driver.

Also instead of letting the usbmisc_imx driver call back into the ci_hdrc_imx
driver, pass the needed data in the first place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 12:37:20 -07:00
..
Kconfig usb: chipidea: improve kconfig 2.0 2013-08-14 12:34:16 -07:00
Makefile usb: chipidea: otg: add otg file used to access otgsc 2013-08-14 12:37:19 -07:00
bits.h usb: chipidea: otg: add otg file used to access otgsc 2013-08-14 12:37:19 -07:00
ci.h usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts 2013-08-14 12:37:20 -07:00
ci_hdrc_imx.c USB: chipidea: i.MX: simplify usbmisc 2013-08-14 12:37:20 -07:00
ci_hdrc_imx.h USB: chipidea: i.MX: simplify usbmisc 2013-08-14 12:37:20 -07:00
ci_hdrc_msm.c usb: chipidea: retire flag CI_HDRC_PULLUP_ON_VBUS 2013-08-14 12:37:20 -07:00
ci_hdrc_pci.c usb: chipidea: drop "13xxx" infix 2013-06-24 16:16:55 -07:00
core.c usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts 2013-08-14 12:37:20 -07:00
debug.c usb: chipidea: drop "13xxx" infix 2013-06-24 16:16:55 -07:00
debug.h usb: chipidea: drop "13xxx" infix 2013-06-24 16:16:55 -07:00
host.c usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
host.h usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
otg.c usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts 2013-08-14 12:37:20 -07:00
otg.h usb: chipidea: add vbus interrupt handler 2013-08-14 12:37:20 -07:00
udc.c usb: chipidea: udc: .pullup is valid only when vbus is there 2013-08-14 12:37:20 -07:00
udc.h usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
usbmisc_imx.c USB: chipidea: i.MX: simplify usbmisc 2013-08-14 12:37:20 -07:00