Skip to contentSkip to conversation

power: supply: cpcap-charger: add OMAP_USB2 dependency

PATCH Applied Arnd Bergmann 2 participants 2 messages Jul 21, 2017 – Jul 24, 2017 Power supply

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: supply: cpcap-charger: add OMAP_USB2 dependency

When CONFIG_OMAP_USB2 is set to 'm' and the charger driver is built-in, we get this link failure:

drivers/power/supply/cpcap-charger.o: In function `cpcap_charger_probe':
cpcap-charger.c:(.text+0x48c): undefined reference to omap_usb2_set_comparator' drivers/power/supply/cpcap-charger.o: In function cpcap_charger_remove':
cpcap-charger.c:(.text+0x774): undefined reference to `omap_usb2_set_comparator'

This adds a dependency to prevent that problem, while still allowing compile-testing with the OMAP_USB2 driver completely disabled.

Fixes 0c9888e3c192 ("power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger")
---
 drivers/power/supply/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/power/supply/Kconfig +1 -0
index 969f5005669c..765f9ac0a4e7 100644
@@ -365,6 +365,7 @@ config BATTERY_RX51
 config CHARGER_CPCAP
 	tristate "CPCAP PMIC Charger Driver"
 	depends on MFD_CPCAP && IIO
+	depends on OMAP_USB2 || (!OMAP_USB2 && COMPILE_TEST)
 	default MFD_CPCAP
 	help
 	  Say Y to enable support for CPCAP PMIC charger driver for Motorola
Signature · 1 line
2.9.0
maintainer Applied
#1 lore raw

Hi,

Quoted 8 lines · Arnd Bergmann

When CONFIG_OMAP_USB2 is set to 'm' and the charger driver is built-in, we get this link failure:

drivers/power/supply/cpcap-charger.o: In function `cpcap_charger_probe':
cpcap-charger.c:(.text+0x48c): undefined reference to omap_usb2_set_comparator' drivers/power/supply/cpcap-charger.o: In function cpcap_charger_remove':
cpcap-charger.c:(.text+0x774): undefined reference to `omap_usb2_set_comparator'

Quoted 6 lines

This adds a dependency to prevent that problem, while still allowing compile-testing with the OMAP_USB2 driver completely disabled.

Fixes 0c9888e3c192 ("power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger")

---

Thanks, applied to power-supply's fixes branch.

-- Sebastian