Re: [PATCH 2/2] USB: chipidea: i.MX: simplify usbmisc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> writes:

> 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@xxxxxxxxxxxxxx>

Applied and pushed, thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux