Skip to contentSkip to conversation

platform/x86: system76_acpi: fix Kconfig dependencies

PATCH In review Arnd Bergmann 3 participants 3 messages Oct 22, 2021 – Oct 24, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: system76_acpi: fix Kconfig dependencies

From: Arnd Bergmann <[email protected]>

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

ld.lld: error: undefined symbol: devm_input_allocate_device

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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")
---
 drivers/platform/x86/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/platform/x86/Kconfig +3 -0
index 56bcf80da60a..c422ee785c56 100644
@@ -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
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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

ld.lld: error: undefined symbol: devm_input_allocate_device

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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,

(See one comment below)

Quoted 13 lines
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")
---
 drivers/platform/x86/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/platform/x86/Kconfig +0 -0
index 56bcf80da60a..c422ee785c56 100644

drivers/platform/x86/Kconfig config SONYPI_COMPAT · line 927

Quoted 5 lines
drivers/platform/x86/Kconfig +1 -0
@@ -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?

Quoted 5 lines
drivers/platform/x86/Kconfig +2 -0
+	depends on HWMON
+	depends on INPUT
 	select NEW_LEDS
 	select LEDS_CLASS

select LEDS_TRIGGERS

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
In reply to Arnd Bergmann

Hi,

Quoted 20 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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

ld.lld: error: undefined symbol: devm_input_allocate_device

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

referenced by system76_acpi.c
platform/x86/system76_acpi.o:(system76_remove) in archive drivers/built-in.a

Quoted 6 lines

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")

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

Quoted 19 lines
---
 drivers/platform/x86/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/platform/x86/Kconfig +3 -0
index 56bcf80da60a..c422ee785c56 100644
@@ -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