From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anirudh Ghayal Subject: Re: [Question] ehci_hcd: inclusion of multiple platform drivers Date: Fri, 17 Jun 2011 18:26:24 +0530 Message-ID: <4DFB4EF8.101@codeaurora.org> References: <4d6bde24de4d4824d89438ebe97c6e6c.squirrel@www.codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4d6bde24de4d4824d89438ebe97c6e6c.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-arm-msm@vger.kernel.org Including linux-usb. On 6/17/2011 6:18 PM, mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org wrote: > Hi, > > I am working on an SOC where requirement is to include more than one host > controller platform driver from ehci_hcd.c. > Since, the current framework supports inclusion of just one platform > driver, I was wondering if we can have some generic solution similar to > below in ehci_hcd.c: > > #ifdef CONFIG_USB_EHCI_FSL > #include "ehci-fsl.c" > #endif > > #ifdef CONFIG_USB_EHCI_MXC > #include "ehci-mxc.c" > #endif > > <...snip....> > > static struct platform_driver *plat_drivers[] = { #ifdef > CONFIG_USB_EHCI_FSL&ehci_fsl_driver, #endif > > #ifdef CONFIG_USB_EHCI_MXC > &ehci_mxc_driver, > #endif > > ..... > } > > And we can register all the drivers entries in a for loop from ehci_hcd_init. > > Kindly let me know if this approach looks fine. I shall then submit a patch. > I am sorry for not placing the actual patch in this mail for review. > > > Thanks, > Manu > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html