All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: system76_acpi: fix Kconfig dependencies
@ 2021-10-22 15:48 Arnd Bergmann
  2021-10-22 16:02 ` Andy Shevchenko
  2021-10-24  8:19 ` Hans de Goede
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-10-22 15:48 UTC (permalink / raw)
  To: Hans de Goede, Mark Gross, Jean Delvare, Guenter Roeck,
	Tim Crawford, Jeremy Soller
  Cc: Arnd Bergmann, Andy Shevchenko, Kate Hsuan, David E. Box,
	Linus Walleij, Maximilian Luz, Alexander Duyck,
	platform-driver-x86, linux-kernel, linux-hwmon

From: Arnd Bergmann <arnd@arndb.de>

When CONFIG_INPUT is disabled, this driver now fails to link:

ld.lld: error: undefined symbol: devm_input_allocate_device
>>> referenced by system76_acpi.c
>>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a

ld.lld: error: undefined symbol: input_set_capability
>>> referenced by system76_acpi.c
>>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a

ld.lld: error: undefined symbol: devm_hwmon_device_register_with_info
>>> referenced by system76_acpi.c
>>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a

ld.lld: error: undefined symbol: battery_hook_unregister
>>> referenced by system76_acpi.c
>>>               platform/x86/system76_acpi.o:(system76_remove) in archive drivers/built-in.a

Add Kconfig dependencies for each of these three.

Fixes: 0de30fc684b3 ("platform/x86: system76_acpi: Replace Fn+F2 function for OLED models")
Fixes: 95563d45b5da ("platform/x86: system76_acpi: Report temperature and fan speed")
Fixes: 76f7eba3e0a2 ("platform/x86: system76_acpi: Add battery charging thresholds")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/platform/x86/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 56bcf80da60a..c422ee785c56 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -923,6 +923,9 @@ config SONYPI_COMPAT
 config SYSTEM76_ACPI
 	tristate "System76 ACPI Driver"
 	depends on ACPI
+	depends on ACPI_BATTERY
+	depends on HWMON
+	depends on INPUT
 	select NEW_LEDS
 	select LEDS_CLASS
 	select LEDS_TRIGGERS
-- 
2.29.2


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

* Re: [PATCH] platform/x86: system76_acpi: fix Kconfig dependencies
  2021-10-22 15:48 [PATCH] platform/x86: system76_acpi: fix Kconfig dependencies Arnd Bergmann
@ 2021-10-22 16:02 ` Andy Shevchenko
  2021-10-24  8:19 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-10-22 16:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Hans de Goede, Mark Gross, Jean Delvare, Guenter Roeck,
	Tim Crawford, Jeremy Soller, Arnd Bergmann, Kate Hsuan,
	David E. Box, Linus Walleij, Maximilian Luz, Alexander Duyck,
	platform-driver-x86, linux-kernel, linux-hwmon

On Fri, Oct 22, 2021 at 05:48:40PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When CONFIG_INPUT is disabled, this driver now fails to link:
> 
> ld.lld: error: undefined symbol: devm_input_allocate_device
> >>> referenced by system76_acpi.c
> >>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a
> 
> ld.lld: error: undefined symbol: input_set_capability
> >>> referenced by system76_acpi.c
> >>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a
> 
> ld.lld: error: undefined symbol: devm_hwmon_device_register_with_info
> >>> referenced by system76_acpi.c
> >>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a
> 
> ld.lld: error: undefined symbol: battery_hook_unregister
> >>> referenced by system76_acpi.c
> >>>               platform/x86/system76_acpi.o:(system76_remove) in archive drivers/built-in.a
> 
> Add Kconfig dependencies for each of these three.

Thanks! FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

(See one comment below)

> Fixes: 0de30fc684b3 ("platform/x86: system76_acpi: Replace Fn+F2 function for OLED models")
> Fixes: 95563d45b5da ("platform/x86: system76_acpi: Report temperature and fan speed")
> Fixes: 76f7eba3e0a2 ("platform/x86: system76_acpi: Add battery charging thresholds")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/platform/x86/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 56bcf80da60a..c422ee785c56 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -923,6 +923,9 @@ config SONYPI_COMPAT
>  config SYSTEM76_ACPI
>  	tristate "System76 ACPI Driver"

>  	depends on ACPI
> +	depends on ACPI_BATTERY

ACPI_BATTERY depends on ACPI, do we need to keep ACPI above?

> +	depends on HWMON
> +	depends on INPUT
>  	select NEW_LEDS
>  	select LEDS_CLASS
>  	select LEDS_TRIGGERS

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] platform/x86: system76_acpi: fix Kconfig dependencies
  2021-10-22 15:48 [PATCH] platform/x86: system76_acpi: fix Kconfig dependencies Arnd Bergmann
  2021-10-22 16:02 ` Andy Shevchenko
@ 2021-10-24  8:19 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2021-10-24  8:19 UTC (permalink / raw)
  To: Arnd Bergmann, Mark Gross, Jean Delvare, Guenter Roeck,
	Tim Crawford, Jeremy Soller
  Cc: Arnd Bergmann, Andy Shevchenko, Kate Hsuan, David E. Box,
	Linus Walleij, Maximilian Luz, Alexander Duyck,
	platform-driver-x86, linux-kernel, linux-hwmon

Hi,

On 10/22/21 17:48, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When CONFIG_INPUT is disabled, this driver now fails to link:
> 
> ld.lld: error: undefined symbol: devm_input_allocate_device
>>>> referenced by system76_acpi.c
>>>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a
> 
> ld.lld: error: undefined symbol: input_set_capability
>>>> referenced by system76_acpi.c
>>>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a
> 
> ld.lld: error: undefined symbol: devm_hwmon_device_register_with_info
>>>> referenced by system76_acpi.c
>>>>               platform/x86/system76_acpi.o:(system76_add) in archive drivers/built-in.a
> 
> ld.lld: error: undefined symbol: battery_hook_unregister
>>>> referenced by system76_acpi.c
>>>>               platform/x86/system76_acpi.o:(system76_remove) in archive drivers/built-in.a
> 
> Add Kconfig dependencies for each of these three.
> 
> Fixes: 0de30fc684b3 ("platform/x86: system76_acpi: Replace Fn+F2 function for OLED models")
> Fixes: 95563d45b5da ("platform/x86: system76_acpi: Report temperature and fan speed")
> Fixes: 76f7eba3e0a2 ("platform/x86: system76_acpi: Add battery charging thresholds")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
>  drivers/platform/x86/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 56bcf80da60a..c422ee785c56 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -923,6 +923,9 @@ config SONYPI_COMPAT
>  config SYSTEM76_ACPI
>  	tristate "System76 ACPI Driver"
>  	depends on ACPI
> +	depends on ACPI_BATTERY
> +	depends on HWMON
> +	depends on INPUT
>  	select NEW_LEDS
>  	select LEDS_CLASS
>  	select LEDS_TRIGGERS
> 


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

end of thread, other threads:[~2021-10-24  8:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 15:48 [PATCH] platform/x86: system76_acpi: fix Kconfig dependencies Arnd Bergmann
2021-10-22 16:02 ` Andy Shevchenko
2021-10-24  8:19 ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.