Skip to contentSkip to conversation

power: reset: odroid-go-ultra: fix I2C dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Feb 15, 2023 – Feb 16, 2023 System reset/shutdown drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: reset: odroid-go-ultra: fix I2C dependency

From: Arnd Bergmann <[email protected]>

Since this driver can only be built-in, it fails to link when the I2C layer is in a loadable module:

x86_64-linux-ld: drivers/power/reset/odroid-go-ultra-poweroff.o: in function `odroid_go_ultra_poweroff_get_pmic_device':
odroid-go-ultra-poweroff.c:(.text+0x30): undefined reference to `i2c_find_device_by_fwnode'

Tighten the dependency to only allow enabling POWER_RESET_ODROID_GO_ULTRA_POWEROFF is I2C is built-in as well.

Fixes cec3b46b8bda ("power: reset: add Odroid Go Ultra poweroff driver")
---
 drivers/power/reset/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/Kconfig +1 -1
index 7059bd1f2ee7..8c87eeda0fec 100644
@@ -144,7 +144,7 @@ config POWER_RESET_OCELOT_RESET
 config POWER_RESET_ODROID_GO_ULTRA_POWEROFF
 	bool "Odroid Go Ultra power-off driver"
 	depends on ARCH_MESON || COMPILE_TEST
-	depends on I2C && OF
+	depends on I2C=y && OF
 	help
 	  This driver supports Power off for Odroid Go Ultra device.
 
Signature · 1 line
2.39.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Since this driver can only be built-in, it fails to link when the I2C layer is in a loadable module:

Quoted 8 lines

x86_64-linux-ld: drivers/power/reset/odroid-go-ultra-poweroff.o: in function `odroid_go_ultra_poweroff_get_pmic_device':
odroid-go-ultra-poweroff.c:(.text+0x30): undefined reference to `i2c_find_device_by_fwnode'

Tighten the dependency to only allow enabling POWER_RESET_ODROID_GO_ULTRA_POWEROFF is I2C is built-in as well.

Fixes cec3b46b8bda ("power: reset: add Odroid Go Ultra poweroff driver")

Thanks for the fix !

Quoted 17 lines
---
  drivers/power/reset/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/Kconfig +1 -1
index 7059bd1f2ee7..8c87eeda0fec 100644
@@ -144,7 +144,7 @@ config POWER_RESET_OCELOT_RESET
  config POWER_RESET_ODROID_GO_ULTRA_POWEROFF
  	bool "Odroid Go Ultra power-off driver"
  	depends on ARCH_MESON || COMPILE_TEST
-	depends on I2C && OF
+	depends on I2C=y && OF
  	help
  	  This driver supports Power off for Odroid Go Ultra device.
 
#2 lore raw

Hi,

Quoted 12 lines · Neil Armstrong
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Since this driver can only be built-in, it fails to link when the I2C layer is in a loadable module:

x86_64-linux-ld: drivers/power/reset/odroid-go-ultra-poweroff.o: in function `odroid_go_ultra_poweroff_get_pmic_device':
odroid-go-ultra-poweroff.c:(.text+0x30): undefined reference to `i2c_find_device_by_fwnode'

Tighten the dependency to only allow enabling POWER_RESET_ODROID_GO_ULTRA_POWEROFF is I2C is built-in as well.

Quoted 6 lines
Quoted 2 lines
Fixes cec3b46b8bda ("power: reset: add Odroid Go Ultra poweroff driver")

Thanks for the fix !

Thanks, queued.

-- Sebastian

Quoted 18 lines
Quoted 17 lines
---
  drivers/power/reset/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/reset/Kconfig +1 -1
index 7059bd1f2ee7..8c87eeda0fec 100644
@@ -144,7 +144,7 @@ config POWER_RESET_OCELOT_RESET
  config POWER_RESET_ODROID_GO_ULTRA_POWEROFF
  	bool "Odroid Go Ultra power-off driver"
  	depends on ARCH_MESON || COMPILE_TEST
-	depends on I2C && OF
+	depends on I2C=y && OF
  	help
  	  This driver supports Power off for Odroid Go Ultra device.