Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754726AbbDUKqz (ORCPT ); Tue, 21 Apr 2015 06:46:55 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:37533 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbbDUKqx (ORCPT ); Tue, 21 Apr 2015 06:46:53 -0400 Message-ID: <55362A8C.8030601@ti.com> Date: Tue, 21 Apr 2015 13:46:36 +0300 From: Roger Quadros User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Maxime Ripard CC: Mathias Nyman , , , , , "Balbi, Felipe" , Subject: Re: [PATCH 2/5] usb: xhci: plat: Create both HCDs before adding them 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> In-Reply-To: <20150421080827.GA18628@lukather> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2901 Lines: 72 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 >>> >>> 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 also >>> 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 support" patch as >>> we will call xhci_add_hcd() for the first hcd much later, and it could 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. > > 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. It handles usb_phy as well. It just expects hcd->usb_phy to be set. cheers, - -roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVNiqDAAoJENJaa9O+djCTwy0QAMCz+99lbMbp9feC7wVOThgd MNjFEpWYMS+Cz0nlwoLQB+uV46WRclR5HNfHCJAclcfp/O+iNXmxrRgAmCVqdzAd d+54nquoWV4IJy/YdJ1GCiG7IDpEYBjJ2Cp99ZAUtqx3KchR6yVHH8CpM0738X9+ SZj9x2xqNeX29UaOIQtRRfoMB2g7SZjJqEa/sILXptVSVvVSbWnyFpKVelQD/MpX yIyFVapFvZ4podkB09YryHTj0xqo6VXTy4ngk9BTtO0Cf9f3Yea6G/hTJbCJ8WZA cyYaO0qJyMKCNQDYvabQ3UZk9IG7XPs//qDnmtzYMdZIJ9piBgQN8gw1cSrv/txi FVKdKSuR2lNDAB0XaRFnB9WIbpEr4Q/OKkTFKT6Cu7T1iMkTMrlartpboiWpRXQJ B4lz9sxiNGcYThOfXqdwQX0s62RZNwfOYA4qX61DJwttYiEyuagXdR/WtfkkAJ6C HYN5zEQhw+YkBuU+28+ulnJW4057nNAYUD2qbXJ7Dr7D7ThX8PkUYZu5D0BFjrF6 cIBksnbmgWuoUdBYtTDlYRbwGv/iZ/NnBZFE0xMqzNMKM7j7YQR/BkS2fbHZw+lk RvG5XUhpCeJ7olW/xgxSNmH9tSIxkRLHNJZ4xcmpjR1Ba3QRYDG22GhEX+pX9bcy 0TcyxgHvprTGH5OFZuHX =OA20 -----END PGP SIGNATURE----- -- 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/