Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757145AbbDVNuI (ORCPT ); Wed, 22 Apr 2015 09:50:08 -0400 Received: from down.free-electrons.com ([37.187.137.238]:53626 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756129AbbDVNuG (ORCPT ); Wed, 22 Apr 2015 09:50:06 -0400 Date: Wed, 22 Apr 2015 15:46:58 +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: <20150422134658.GB28007@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> <20150421080827.GA18628@lukather> <55362A8C.8030601@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NDin8bjvE/0mNLFQ" Content-Disposition: inline In-Reply-To: <55362A8C.8030601@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: 3426 Lines: 95 --NDin8bjvE/0mNLFQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 21, 2015 at 01:46:36PM +0300, Roger Quadros wrote: > On 21/04/15 11:08, Maxime Ripard wrote: > > On Tue, Apr 21, 2015 at 12:49:54PM +0300, Roger Quadros wrote: > >> On 20/04/15 15:35, Mathias Nyman wrote: > >>> Hi > >>> > >>> 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. > >>>> > >>> > >>> This doesn't apply as=20 > >>> > >>> commit 7b8ef22ea547b80475ac7feab06fb15e0fc143d8 > >>> usb: xhci: plat: Add USB phy support > >>> > >>> changed xhci-plat.c since. > >>> > >>> I rebased it, and the changed version is sitting in the for-usb-next = branch in: > >>> git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git > >>> > >>> But it appeared to me that usb_add_hcd() and usb_remove_hcd() will al= so > >>> call phy init and remove functions. As the order how hcds are created= and added > >>> would change I'd need some more eyes on this to see if it will cause = regression. > >>> > >>> Or maybe in the best case we could get rid of the "Add USB phy suppor= t" patch as > >>> we will call xhci_add_hcd() for the first hcd much later, and it coul= d maybe init > >>> the phy for us? > >> > >> I thought usb_phy_*() stuff would be deprecated and we should use > >> phy framework instead i.e. phy_init() and friends. > >=20 > > Except that all drivers have not been converted yet... So it's not > > really an option until then. > >=20 > >> In fact usb_add_hcd() is already handling the phy for us. > >=20 > > If it handles USB phy, then I don't really have an issue with it. >=20 > It handles usb_phy as well. It just expects hcd->usb_phy to be set. Ok, perfect then. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --NDin8bjvE/0mNLFQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVN6ZSAAoJEBx+YmzsjxAgvV8QAJALIE3BPFB+2hvDNygk6ETX NuDwkINBCnsIM2SJhz7BcuvbfThlCtDAJys02MpmLNAtJh4q33CZromax7PHwo0C yPClWp733EPjE2bYdvQvejJZjmtZ1oY48jZvMelYccMVaHjZLZilje7QIyAGNo+Z m240Xq0xcVsZ812Ef4W0x4owSuy5Ln+VRDS0o65AuIjXji6uEMUOxHIt5cTi65Tn 85pfOiP66Cknsc/C5e3m/WW7oCxBr+pMwQ02ZLyociJfc1y1OOLJH7RDWP02XpxC Rp/oO9iDOvDAHBg0EZwDfLVFeUoq9gdqdTjyxUpPvE8iZsh4vqAywmdBlOUH6oNc zWhmZelM0X1cVSz6UWmoQDvxbqyqYRfLZWWIEUNsKnPPcdTa4A+ZcQ1YivHgkTRZ e7lOj+SuAEGo0xMfd2ftVRQMdW564v1NgvQt7LvJJ8XyV1t9hFcZsbGX0hQ4cWx7 g+rnGK8f4enbr3Npv6rxHj62LUSJJ0SOvsuZOBnPot3fgDFEdrpWiX4OowTRFSed ZVeGZk3cSOgL6u3jRyTnGnefBFw0mIkMvUqBMJwOvDh1TV5dhYIapfhYt8L+ep20 oq+U4qzYsGxlrfXqgvkskF5IX27Vf7VR/JYkVldA3retykEUVMq/ezGyPILB1yJU sFydBtxd7SRsSY0Fg2y9 =0rRY -----END PGP SIGNATURE----- --NDin8bjvE/0mNLFQ-- -- 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/