Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753897AbbBKTcq (ORCPT ); Wed, 11 Feb 2015 14:32:46 -0500 Received: from mga11.intel.com ([192.55.52.93]:15897 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421AbbBKTcp (ORCPT ); Wed, 11 Feb 2015 14:32:45 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,560,1418112000"; d="scan'208";a="453277589" Date: Wed, 11 Feb 2015 11:34:19 -0800 From: David Cohen To: Heikki Krogerus Cc: Felipe Balbi , Greg Kroah-Hartman , Baolu Lu , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/8] usb: dwc3: add ULPI interface support Message-ID: <20150211193419.GA28788@psi-dev26.jf.intel.com> References: <1422025978-178336-1-git-send-email-heikki.krogerus@linux.intel.com> <1422025978-178336-7-git-send-email-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422025978-178336-7-git-send-email-heikki.krogerus@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2346 Lines: 70 Hi Heikki, On Fri, Jan 23, 2015 at 05:12:56PM +0200, Heikki Krogerus wrote: > Registers DWC3's ULPI interface with the ULPI bus when it's > available. > > Signed-off-by: Heikki Krogerus > --- > drivers/usb/dwc3/Kconfig | 7 +++ > drivers/usb/dwc3/Makefile | 4 ++ > drivers/usb/dwc3/core.c | 6 +++ > drivers/usb/dwc3/core.h | 13 ++++++ > drivers/usb/dwc3/ulpi.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++ > 5 files changed, 142 insertions(+) > create mode 100644 drivers/usb/dwc3/ulpi.c > > diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig > index 58b5b2c..cda82ad 100644 > --- a/drivers/usb/dwc3/Kconfig > +++ b/drivers/usb/dwc3/Kconfig > @@ -11,6 +11,13 @@ config USB_DWC3 > > if USB_DWC3 > > +config USB_DWC3_ULPI > + bool "Register ULPI PHY Interface" > + depends on USB_ULPI_BUS=y > + help > + Select this if you have ULPI type PHY attached to your DWC3 > + controller. > + > choice > bool "DWC3 Mode Selection" > default USB_DWC3_DUAL_ROLE if (USB && USB_GADGET) > diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile > index bb34fbc..2fc44e0 100644 > --- a/drivers/usb/dwc3/Makefile > +++ b/drivers/usb/dwc3/Makefile > @@ -16,6 +16,10 @@ ifneq ($(filter y,$(CONFIG_USB_DWC3_GADGET) $(CONFIG_USB_DWC3_DUAL_ROLE)),) > dwc3-y += gadget.o ep0.o > endif > > +ifneq ($(CONFIG_USB_DWC3_ULPI),) > + dwc3-y += ulpi.o > +endif > + > ifneq ($(CONFIG_DEBUG_FS),) > dwc3-y += debugfs.o > endif > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > index a8c9062..66cbf38 100644 > --- a/drivers/usb/dwc3/core.c > +++ b/drivers/usb/dwc3/core.c > @@ -879,6 +879,10 @@ static int dwc3_probe(struct platform_device *pdev) > platform_set_drvdata(pdev, dwc); > dwc3_cache_hwparams(dwc); > > + ret = dwc3_ulpi_init(dwc); If I understood correctly, this call will result in enumerating the phy via ULPI bus, then registering the correct ULPI device. Can you guarantee ULPI will be always accessible at this point if we remove dwc3 module and load it again? Br, David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/