From mboxrd@z Thu Jan 1 00:00:00 1970 From: mgautam@codeaurora.org Subject: [Question] ehci_hcd: inclusion of multiple platform drivers Date: Fri, 17 Jun 2011 05:48:16 -0700 (PDT) Message-ID: <4d6bde24de4d4824d89438ebe97c6e6c.squirrel@www.codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:51270 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756985Ab1FQMsQ (ORCPT ); Fri, 17 Jun 2011 08:48:16 -0400 Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: linux-usb@vger.kerne​, l.org@codeaurora.org Cc: linux-arm-msm@vger.kernel.org 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