public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: reset: odroid-go-ultra: fix I2C dependency
@ 2023-02-15 12:47 Arnd Bergmann
  2023-02-15 13:24 ` Neil Armstrong
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-02-15 12:47 UTC (permalink / raw)
  To: Sebastian Reichel, Neil Armstrong
  Cc: Arnd Bergmann, Asmaa Mnebhi, linux-pm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/reset/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index 7059bd1f2ee7..8c87eeda0fec 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -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.39.1


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

* Re: [PATCH] power: reset: odroid-go-ultra: fix I2C dependency
  2023-02-15 12:47 [PATCH] power: reset: odroid-go-ultra: fix I2C dependency Arnd Bergmann
@ 2023-02-15 13:24 ` Neil Armstrong
  2023-02-16  0:05   ` Sebastian Reichel
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Armstrong @ 2023-02-15 13:24 UTC (permalink / raw)
  To: Arnd Bergmann, Sebastian Reichel
  Cc: Arnd Bergmann, Asmaa Mnebhi, linux-pm, linux-kernel

On 15/02/2023 13:47, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for the fix !

Acked-by: Neil Armstrong <neil.armstrong@linaro.org>

> ---
>   drivers/power/reset/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> index 7059bd1f2ee7..8c87eeda0fec 100644
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
> @@ -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.
>   


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

* Re: [PATCH] power: reset: odroid-go-ultra: fix I2C dependency
  2023-02-15 13:24 ` Neil Armstrong
@ 2023-02-16  0:05   ` Sebastian Reichel
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2023-02-16  0:05 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Arnd Bergmann, Arnd Bergmann, Asmaa Mnebhi, linux-pm,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1550 bytes --]

Hi,

On Wed, Feb 15, 2023 at 02:24:01PM +0100, Neil Armstrong wrote:
> On 15/02/2023 13:47, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > 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")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Thanks for the fix !
> 
> Acked-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks, queued.

-- Sebastian

> 
> > ---
> >   drivers/power/reset/Kconfig | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> > index 7059bd1f2ee7..8c87eeda0fec 100644
> > --- a/drivers/power/reset/Kconfig
> > +++ b/drivers/power/reset/Kconfig
> > @@ -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.
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2023-02-16  0:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 12:47 [PATCH] power: reset: odroid-go-ultra: fix I2C dependency Arnd Bergmann
2023-02-15 13:24 ` Neil Armstrong
2023-02-16  0:05   ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox