Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753706AbbDUIKJ (ORCPT ); Tue, 21 Apr 2015 04:10:09 -0400 Received: from down.free-electrons.com ([37.187.137.238]:48110 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750948AbbDUIKE (ORCPT ); Tue, 21 Apr 2015 04:10:04 -0400 Date: Tue, 21 Apr 2015 10:08:27 +0200 From: Maxime Ripard To: Roger Quadros Cc: Mathias Nyman , mathias.nyman@intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "Balbi, Felipe" , kishon@ti.comg Subject: Re: [PATCH 2/5] usb: xhci: plat: Create both HCDs before adding them Message-ID: <20150421080827.GA18628@lukather> References: <1427977409-7671-1-git-send-email-rogerq@ti.com> <1427977409-7671-3-git-send-email-rogerq@ti.com> <5534F296.8000104@linux.intel.com> <55361D42.8040101@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline In-Reply-To: <55361D42.8040101@ti.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: 3142 Lines: 88 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 21, 2015 at 12:49:54PM +0300, Roger Quadros wrote: > On 20/04/15 15:35, Mathias Nyman wrote: > > Hi > >=20 > > On 02.04.2015 15:23, Roger Quadros wrote: > >> As xhci_hcd is now allocated by usb_create_hcd(), we don't > >> need to add the primary HCD before creating the shared HCD. > >> > >> Creating the shared HCD before adding the primary HCD is particularly > >> useful for the OTG use case so that we know at the OTG core if > >> the HCD is in single configuration or dual (primary + shared) > >> configuration. > >> > >=20 > > This doesn't apply as=20 > >=20 > > commit 7b8ef22ea547b80475ac7feab06fb15e0fc143d8 > > usb: xhci: plat: Add USB phy support > >=20 > > changed xhci-plat.c since. > >=20 > > I rebased it, and the changed version is sitting in the for-usb-next br= anch in: > > git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git > >=20 > > But it appeared to me that usb_add_hcd() and usb_remove_hcd() will also > > call phy init and remove functions. As the order how hcds are created a= nd added > > would change I'd need some more eyes on this to see if it will cause re= gression. > >=20 > > Or maybe in the best case we could get rid of the "Add USB phy support"= patch as > > we will call xhci_add_hcd() for the first hcd much later, and it could = maybe init > > the phy for us? >=20 > I thought usb_phy_*() stuff would be deprecated and we should use > phy framework instead i.e. phy_init() and friends. Except that all drivers have not been converted yet... So it's not really an option until then. > In fact usb_add_hcd() is already handling the phy for us. If it handles USB phy, then I don't really have an issue with it. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVNgV7AAoJEBx+YmzsjxAguc0P/A36y9KjfooM86TDagn7qCc7 bV/JmUFrFCvy1PumARMY/GL9wFIGonISV8IiTVhYIHgPh96z4Roro9oA4aOyPoFo OtMpldmKGUKR1giVNk1ZdYzw8InCZDGFNtD9YWMUAjI2wsBqFVZnlOxEAxUqopX9 L+njdyNnV0YIo+H0mcv5obYLMuAaFCS+JHg0dsT/MeR/5gFtcJlUm0xMgk8fZ8oS uNIQafH58o93OWKan/HhmjlDqydRh5wc8cg/dfHyR4AOBWvtM2kd6ZyBQqJzbLhC IZvAryIKoHFiSsHvAIxVsPI+rsfnnHsfGcjdgalyMjOK83CUctknguu76gqejuX3 aKkuKtq1GC/jlCViGTcI9UsP+n+XNmiIYoML7nfajz8qp64iBH19MZ5cErsZvyxi HzA97/ejTBSwACqS2W8dBldSJf9iReekHYvSAb78dkHDeZqaR+342W9qS4PymcOI BqbWU3kkBpL+UeAfC5RCR7rON5xJQ57kN9m4x3TiH+fZY1id9pSSNWFIQEaRIhPY VpOCQSU/ZgKypapmzro4b0+Zb1pdvEcr0H0c3ROKsL9tS1NiGsW0TmiTppjb7nck Z4PEfwhWNQrhiNJb5VV5NqsVNVZ8Foz+YHKAKzhUiGSvvMtpSpTrnGmoARe7zF7O myR6AobIgVJQUVgdC6Zp =tXWE -----END PGP SIGNATURE----- --82I3+IH0IqGh5yIs-- -- 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/