mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] phy: qcom-usb-hs: add extcon dependency
@ 2017-02-01 16:08 Arnd Bergmann
  2017-02-01 18:50 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-02-01 16:08 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Rob Herring, Stephen Boyd, Arnd Bergmann, Felipe Balbi,
	Guenter Roeck, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] phy: qcom-usb-hs: add extcon dependency
  2017-02-01 16:08 [PATCH] phy: qcom-usb-hs: add extcon dependency Arnd Bergmann
@ 2017-02-01 18:50 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2017-02-01 18:50 UTC (permalink / raw)
  To: Arnd Bergmann, Kishon Vijay Abraham I
  Cc: Rob Herring, Arnd Bergmann, Felipe Balbi, Guenter Roeck, linux-kernel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-01 18:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-01 16:08 [PATCH] phy: qcom-usb-hs: add extcon dependency Arnd Bergmann
2017-02-01 18:50 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®