Skip to contentSkip to conversation

extcon: cht_wc: add POWER_SUPPLY dependency

PATCH Applied Arnd Bergmann 3 participants 3 messages Aug 4, 2023 – Aug 5, 2023 External connector subsystem (extcon)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 extcon: cht_wc: add POWER_SUPPLY dependency

From: Arnd Bergmann <[email protected]>

The driver fails to link when CONFIG_POWER_SUPPLY is disabled:

x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_psy_get_prop':
extcon-intel-cht-wc.c:(.text+0x15ccda7): undefined reference to `power_supply_get_drvdata'
x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_pwrsrc_event':
extcon-intel-cht-wc.c:(.text+0x15cd3e9): undefined reference to `power_supply_changed'
x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_probe':
extcon-intel-cht-wc.c:(.text+0x15cd596): undefined reference to `devm_power_supply_register'

It should be possible to change the driver to not require this at compile time and still provide other functions, but adding a hard Kconfig dependency does not seem to have any practical downsides and is simpler since the option is normally enabled anyway.

Fixes 66e31186cd2aa ("extcon: intel-cht-wc: Add support for registering a power_supply class-device")
---
 drivers/extcon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/extcon/Kconfig +1 -0
index 0ef1971d22bb0..8de9023c2a387 100644
@@ -62,6 +62,7 @@ config EXTCON_INTEL_CHT_WC
 	tristate "Intel Cherrytrail Whiskey Cove PMIC extcon driver"
 	depends on INTEL_SOC_PMIC_CHTWC
 	depends on USB_SUPPORT
+	depends on POWER_SUPPLY
 	select USB_ROLE_SWITCH
 	help
 	  Say Y here to enable extcon support for charger detection / control
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The driver fails to link when CONFIG_POWER_SUPPLY is disabled:

x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_psy_get_prop':
extcon-intel-cht-wc.c:(.text+0x15ccda7): undefined reference to `power_supply_get_drvdata'
x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_pwrsrc_event':
extcon-intel-cht-wc.c:(.text+0x15cd3e9): undefined reference to `power_supply_changed'
x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_probe':
extcon-intel-cht-wc.c:(.text+0x15cd596): undefined reference to `devm_power_supply_register'

Quoted 7 lines

It should be possible to change the driver to not require this at compile time and still provide other functions, but adding a hard Kconfig dependency does not seem to have any practical downsides and is simpler since the option is normally enabled anyway.

Fixes 66e31186cd2aa ("extcon: intel-cht-wc: Add support for registering a power_supply class-device")

Thanks, patch looks good to me:

Regards,

Hans

Quoted 16 lines
---
 drivers/extcon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/extcon/Kconfig +1 -0
index 0ef1971d22bb0..8de9023c2a387 100644
@@ -62,6 +62,7 @@ config EXTCON_INTEL_CHT_WC
 	tristate "Intel Cherrytrail Whiskey Cove PMIC extcon driver"
 	depends on INTEL_SOC_PMIC_CHTWC
 	depends on USB_SUPPORT
+	depends on POWER_SUPPLY
 	select USB_ROLE_SWITCH
 	help
 	  Say Y here to enable extcon support for charger detection / control
Applied
#2 lore raw
In reply to Arnd Bergmann
Quoted 27 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The driver fails to link when CONFIG_POWER_SUPPLY is disabled:

x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_psy_get_prop':
extcon-intel-cht-wc.c:(.text+0x15ccda7): undefined reference to `power_supply_get_drvdata'
x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_pwrsrc_event':
extcon-intel-cht-wc.c:(.text+0x15cd3e9): undefined reference to `power_supply_changed'
x86_64-linux-ld: vmlinux.o: in function `cht_wc_extcon_probe':
extcon-intel-cht-wc.c:(.text+0x15cd596): undefined reference to `devm_power_supply_register'

It should be possible to change the driver to not require this at compile time and still provide other functions, but adding a hard Kconfig dependency does not seem to have any practical downsides and is simpler since the option is normally enabled anyway.

Fixes 66e31186cd2aa ("extcon: intel-cht-wc: Add support for registering a power_supply class-device")
---
 drivers/extcon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/extcon/Kconfig +0 -0
index 0ef1971d22bb0..8de9023c2a387 100644

drivers/extcon/Kconfig config EXTCON_INTEL_CHT_WC · line 68

Quoted 7 lines
drivers/extcon/Kconfig +1 -0
@@ -62,6 +62,7 @@ config EXTCON_INTEL_CHT_WC
 	tristate "Intel Cherrytrail Whiskey Cove PMIC extcon driver"
 	depends on INTEL_SOC_PMIC_CHTWC
 	depends on USB_SUPPORT
+	depends on POWER_SUPPLY
 	select USB_ROLE_SWITCH
 	help
 	  Say Y here to enable extcon support for charger detection / control

Applied it. Thanks.

Signature · 3 lines
Best Regards,
Samsung Electronics
Chanwoo Choi