From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754435AbdBASyd (ORCPT ); Wed, 1 Feb 2017 13:54:33 -0500 Received: from mail-pg0-f43.google.com ([74.125.83.43]:34256 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753237AbdBASyc (ORCPT ); Wed, 1 Feb 2017 13:54:32 -0500 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 To: Kishon Vijay Abraham I , gregkh@linuxfoundation.org From: Stephen Boyd In-Reply-To: <1485937664-25545-1-git-send-email-kishon@ti.com> Cc: linux-kernel@vger.kernel.org, Arnd Bergmann References: <1485937664-25545-1-git-send-email-kishon@ti.com> Message-ID: <148597526575.11383.16198703484869555373@sboyd-linaro> User-Agent: alot/0.3.7 Subject: Re: [PATCH] phy: qcom-usb-hs: Add depends on EXTCON Date: Wed, 01 Feb 2017 10:54:25 -0800 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v11IsmMg015317 Quoting Kishon Vijay Abraham I (2017-02-01 00:27:44) > commit e2427b09ba929c2b9 (phy: Add support for Qualcomm's USB HS phy") > while using extcon API's in qcom-usb-hs failed to add > 'depends on EXTCON' resulting in the following compile errors if > EXTCON is not enabled. > drivers/built-in.o: In function `qcom_usb_hs_phy_power_off': > phy-qcom-usb-hs.c:(.text+0x1089): undefined reference to `extcon_unregister_notifier' > drivers/built-in.o: In function `qcom_usb_hs_phy_probe': > phy-qcom-usb-hs.c:(.text+0x11b5): undefined reference to `extcon_get_edev_by_phandle' > drivers/built-in.o: In function `qcom_usb_hs_phy_power_on': > phy-qcom-usb-hs.c:(.text+0x128e): undefined reference to `extcon_get_state' > phy-qcom-usb-hs.c:(.text+0x12a9): undefined reference to `extcon_register_notifier' > > Fix it here. > > Fixes: 9994a33865f4 e2427b09ba929c2b9 (phy: Add support for Qualcomm's USB > HS phy") > > Cc: Stephen Boyd > Signed-off-by: Kishon Vijay Abraham I The extcon is optional in the binding, so "depends on EXTCON" is incorrect. It should follow the modular or non-modular nature of extcon if extcon is enabled and still compile if extcon is disabled. So we want this instead. Care to replace it with this patch? ----8<---- diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index bb5cf6f49b06..3c2822457784 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -441,6 +441,7 @@ config PHY_QCOM_UFS config PHY_QCOM_USB_HS tristate "Qualcomm USB HS PHY module" depends on USB_ULPI_BUS + depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in select GENERIC_PHY help Support for the USB high-speed ULPI compliant phy on Qualcomm