All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: qcom-usb-hs: Add depends on EXTCON
@ 2017-02-01  8:27 Kishon Vijay Abraham I
  2017-02-01 18:54 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Kishon Vijay Abraham I @ 2017-02-01  8:27 UTC (permalink / raw)
  To: gregkh; +Cc: kishon, linux-kernel, Stephen Boyd

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 <stephen.boyd@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index bb5cf6f..c11aba6 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -440,6 +440,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
-- 
1.7.9.5

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

* Re: [PATCH] phy: qcom-usb-hs: Add depends on EXTCON
  2017-02-01  8:27 [PATCH] phy: qcom-usb-hs: Add depends on EXTCON Kishon Vijay Abraham I
@ 2017-02-01 18:54 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2017-02-01 18:54 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, gregkh; +Cc: linux-kernel, Arnd Bergmann

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 <stephen.boyd@linaro.org>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

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

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-01  8:27 [PATCH] phy: qcom-usb-hs: Add depends on EXTCON Kishon Vijay Abraham I
2017-02-01 18:54 ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.