Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1571692 > unrolled thread

[PATCH] phy: qcom-usb-hs: add extcon dependency

Started byArnd Bergmann <arnd@arndb.de>
First post2017-02-01 17:20 +0100
Last post2017-02-01 20:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] phy: qcom-usb-hs: add extcon dependency Arnd Bergmann <arnd@arndb.de> - 2017-02-01 17:20 +0100
    Re: [PATCH] phy: qcom-usb-hs: add extcon dependency Stephen Boyd <stephen.boyd@linaro.org> - 2017-02-01 20:00 +0100

#1571692 — [PATCH] phy: qcom-usb-hs: add extcon dependency

FromArnd Bergmann <arnd@arndb.de>
Date2017-02-01 17:20 +0100
Subject[PATCH] phy: qcom-usb-hs: add extcon dependency
Message-ID<t65Nw-8ap-21@gated-at.bofh.it>
If extcon is a loadable module and qcom-usb-hs is built-in,
we get a link failure:

drivers/phy/phy-qcom-usb-hs.o: In function `qcom_usb_hs_phy_power_off':
phy-qcom-usb-hs.c:(.text.qcom_usb_hs_phy_power_off+0x24): undefined reference to `extcon_unregister_notifier'
drivers/phy/phy-qcom-usb-hs.o: In function `qcom_usb_hs_phy_power_on':
phy-qcom-usb-hs.c:(.text.qcom_usb_hs_phy_power_on+0x1a0): undefined reference to `extcon_get_state'
phy-qcom-usb-hs.c:(.text.qcom_usb_hs_phy_power_on+0x1cc): undefined reference to `extcon_register_notifier'
drivers/phy/phy-qcom-usb-hs.o: In function `qcom_usb_hs_phy_probe':
phy-qcom-usb-hs.c:(.text.qcom_usb_hs_phy_probe+0x15c): undefined reference to `extcon_get_edev_by_phandle'

Adding a hard dependency avoids the problem. Alternatively we could
use "depends on EXTCON || !EXTCON" to allow building with extcon
disabled completely, but the other PHY drivers with extcon support
also just have a dependency, so this is more consistent.

Fixes: e2427b09ba92 ("phy: Add support for Qualcomm's USB HS phy")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 75907ecbef09..87c581f11297 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -443,6 +443,7 @@ config PHY_QCOM_UFS
 
 config PHY_QCOM_USB_HS
 	tristate "Qualcomm USB HS PHY module"
+	depends on EXTCON
 	depends on USB_ULPI_BUS
 	select GENERIC_PHY
 	help
-- 
2.9.0

[toc] | [next] | [standalone]


#1571900

FromStephen Boyd <stephen.boyd@linaro.org>
Date2017-02-01 20:00 +0100
Message-ID<t68il-17w-7@gated-at.bofh.it>
In reply to#1571692
Quoting Arnd Bergmann (2017-02-01 08:08:55)
> If extcon is a loadable module and qcom-usb-hs is built-in,
> we get a link failure:
> 
> drivers/phy/phy-qcom-usb-hs.o: In function `qcom_usb_hs_phy_power_off':
> phy-qcom-usb-hs.c:(.text.qcom_usb_hs_phy_power_off+0x24): undefined reference to `extcon_unregister_notifier'
> drivers/phy/phy-qcom-usb-hs.o: In function `qcom_usb_hs_phy_power_on':
> phy-qcom-usb-hs.c:(.text.qcom_usb_hs_phy_power_on+0x1a0): undefined reference to `extcon_get_state'
> phy-qcom-usb-hs.c:(.text.qcom_usb_hs_phy_power_on+0x1cc): undefined reference to `extcon_register_notifier'
> drivers/phy/phy-qcom-usb-hs.o: In function `qcom_usb_hs_phy_probe':
> phy-qcom-usb-hs.c:(.text.qcom_usb_hs_phy_probe+0x15c): undefined reference to `extcon_get_edev_by_phandle'
> 
> Adding a hard dependency avoids the problem. Alternatively we could
> use "depends on EXTCON || !EXTCON" to allow building with extcon
> disabled completely, but the other PHY drivers with extcon support
> also just have a dependency, so this is more consistent.
> 
> Fixes: e2427b09ba92 ("phy: Add support for Qualcomm's USB HS phy")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Kishon already sent a patch for this.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web