From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965460AbcBCWE2 (ORCPT ); Wed, 3 Feb 2016 17:04:28 -0500 Received: from mail-lf0-f49.google.com ([209.85.215.49]:32891 "EHLO mail-lf0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965324AbcBCWEZ (ORCPT ); Wed, 3 Feb 2016 17:04:25 -0500 From: Felipe Balbi To: Arnd Bergmann Cc: Bin Liu , Felipe Balbi , balbif@gmail.com, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: phy-am335x: clarify USB_COMMON dependency In-Reply-To: <9451477.tmYKHlsitn@wuerfel> References: <1749004.q1rSF7t8cz@wuerfel> <20160120180833.GA5433@uda0271908> <87wpqlptmt.fsf@ti.com> <9451477.tmYKHlsitn@wuerfel> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/25.0.90.1 (x86_64-pc-linux-gnu) Date: Thu, 04 Feb 2016 00:04:07 +0200 Message-ID: <87bn7xpi20.fsf@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Arnd Bergmann writes: >> > On Wed, Jan 20, 2016 at 11:56:34AM +0100, Arnd Bergmann wrote: >> >> The phy-am335x driver accidentally selects 'USB_COMMON', which is >> >> not correct as that symbol should indicate whether USB host or >> >> target mode is enabled, but it might not: >> >>=20 >> >> warning: (AM335X_PHY_USB) selects USB_COMMON which has unmet direct d= ependencies (USB_SUPPORT && (USB || USB_GADGET)) >> > >> > Is it possible to have a .config which has either USB nor USB_GADGET >> > set but AM335X_PHY_USB is set to be in the situation as in the warning >> > above? >> > >> >>=20 >> >> This changes the 'select' into 'depends on', as it should have >> >> been initially. >> > >> > Using 'depends on' causes AM335x_PHY_USB driver unable to built-in, >> > since USB_COMMON is an invisible option and its defualt is 'M'. >>=20 >>=20 >> yeah, USB_COMMON is supposed to be selected, not depended upon. > > > That means we should do something like the patch below? > > Fine with me too, but maybe you can write the changelog for that, > as I don't know the background behind the logic. > > Arnd > > diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig > index e7e117d5dbbe..df005f5a0e0c 100644 > --- a/drivers/phy/Kconfig > +++ b/drivers/phy/Kconfig > @@ -249,7 +249,8 @@ config PHY_SUN9I_USB > tristate "Allwinner sun9i SoC USB PHY driver" > depends on ARCH_SUNXI && HAS_IOMEM && OF > depends on RESET_CONTROLLER > - depends on USB_COMMON > + depends on USB_SUPPORT > + select USB_COMMON > select GENERIC_PHY > help > Enable this to support the transceiver that is part of Allwinner > diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig > index 8ed451dd651e..8689dcba5201 100644 > --- a/drivers/usb/Kconfig > +++ b/drivers/usb/Kconfig > @@ -31,8 +31,6 @@ if USB_SUPPORT >=20=20 > config USB_COMMON > tristate > - default y > - depends on USB || USB_GADGET >=20=20 > config USB_ARCH_HAS_HCD > def_bool y > @@ -41,6 +39,7 @@ config USB_ARCH_HAS_HCD > config USB > tristate "Support for Host-side USB" > depends on USB_ARCH_HAS_HCD > + select USB_COMMON > select NLS # for UTF-8 strings > ---help--- > Universal Serial Bus (USB) is a specification for a serial bus > diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig > index af5d922a8f5d..2057add439f0 100644 > --- a/drivers/usb/gadget/Kconfig > +++ b/drivers/usb/gadget/Kconfig > @@ -15,6 +15,7 @@ >=20=20 > menuconfig USB_GADGET > tristate "USB Gadget Support" > + select USB_COMMON > select NLS > help > USB is a master/slave protocol, organized with one master looks great to me. Care to send it in proper patch form ? =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWsnlYAAoJEIaOsuA1yqRENaUP/2tP1r/mjPQLtMWaGLhGcQmY 3O6hDA2JJNbd222QOLHU2F1Ae9m5TbEPjDkPFRxQxJI0d/8WYep6yx3vqoz1PMXH dwR/m3i4RdwSgulQfv8J+0ijRam4M6eLgajD5PPDmcvhFet7XeXCdo9rlr0IUewL 9rZXCGpvy7WLK1lggBQTyE+3++48V1O0QS0RQoCI6yDxzGcSbbl9TVaP3TILy8ek SwTpvH3x9FCb7TqCU82k2pLgaY58ofsca79minCRUwf3sILKqAZWsMWdZpOa8PQV msblx3sgM2hsAcAcFKwiOFhlpChv279MJxQpJqwWDBqnC7wA+YBEbjyMrCFKq0kU KHDbsK7oV0BXw5FA/7juXi82Z6WNqibeK8xwjrPyZX8ldj0zk7HzSVMMG84LAigI 1uIh7epGIcw+7UlqoKRPdWDy5rMojUjXcdDVGI8gSEMGT+Ak5fwR/pB8wKwA92ju XyIjZAIw3V+eKb+t2L0YFPhZ8QxtchQPrUmzdKu5nKoOIHbI2YzHyqPZlIi1GNyM 1NdD5cfQNw3+3XwxMXBPcMGCsvC+Jfzi+sk59lulb8LmDgxB/LrnVbR+SYagQ4Ga 29YZPllyzpFRYYh3s2Bhg9ArN4vZeRyLdvhwlp1NA8EzaaGkxPORfqjuLCW85qms ZELs45O7nHGzBEW0P/jp =GMnG -----END PGP SIGNATURE----- --=-=-=--