Skip to contentSkip to conversation

phy: qcom-qusb2: add NVMEM dependency

PATCH Applied Tobias Regnery 2 participants 2 messages Apr 10, 2017 Generic PHY framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: qcom-qusb2: add NVMEM dependency

With CONFIG_NVMEM=m and CONFIG_PHY_QCOM_QUSB2=y we get a link error from calls to devm_nvmem_cell_get and nvmem_cell_read:

drivers/built-in.o: In function `qusb2_phy_probe':
binder.c:(.text+0x4750): undefined reference to devm_nvmem_cell_get' drivers/built-in.o: In function qusb2_phy_init':
binder.c:(.text+0x489c): undefined reference to `nvmem_cell_read'

Fix this by adding a Kconfig dependency to ensure we can only have this driver built in when the nvmem functions are also built in or we see the empty stub functions. We can still build this driver as a module when the nvmem core is build as module, too.

Fixes deffad633413 ("phy: qcom-qusb2: New driver for QUSB2 PHY on Qcom chips")
---
 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
index c120071fd2c8..30a2a612ff20 100644
@@ -450,6 +450,7 @@ config PHY_QCOM_QMP
 config PHY_QCOM_QUSB2
 	tristate "Qualcomm QUSB2 PHY Driver"
 	depends on OF && (ARCH_QCOM || COMPILE_TEST)
+	depends on NVMEM || !NVMEM
 	select GENERIC_PHY
 	help
 	  Enable this to support the HighSpeed QUSB2 PHY transceiver for USB
Signature · 1 line
2.11.0
#1 lore raw
Quoted 8 lines · Tobias Regnery

With CONFIG_NVMEM=m and CONFIG_PHY_QCOM_QUSB2=y we get a link error from calls to devm_nvmem_cell_get and nvmem_cell_read:

drivers/built-in.o: In function `qusb2_phy_probe':
binder.c:(.text+0x4750): undefined reference to devm_nvmem_cell_get' drivers/built-in.o: In function qusb2_phy_init':
binder.c:(.text+0x489c): undefined reference to `nvmem_cell_read'

Quoted 7 lines

Fix this by adding a Kconfig dependency to ensure we can only have this driver built in when the nvmem functions are also built in or we see the empty stub functions. We can still build this driver as a module when the nvmem core is build as module, too.

Fixes deffad633413 ("phy: qcom-qusb2: New driver for QUSB2 PHY on Qcom chips")

merged, thanks!

-Kishon

Quoted 17 lines
---
 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
index c120071fd2c8..30a2a612ff20 100644
@@ -450,6 +450,7 @@ config PHY_QCOM_QMP
 config PHY_QCOM_QUSB2
 	tristate "Qualcomm QUSB2 PHY Driver"
 	depends on OF && (ARCH_QCOM || COMPILE_TEST)
+	depends on NVMEM || !NVMEM
 	select GENERIC_PHY
 	help
 	  Enable this to support the HighSpeed QUSB2 PHY transceiver for USB