Skip to contentSkip to conversation

platform/x86: lenovo-yogabook: add I2C dependency

PATCH In review Arnd Bergmann 2 participants 2 messages May 19, 2023 – May 23, 2023 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: lenovo-yogabook: add I2C dependency

From: Arnd Bergmann <[email protected]>

The added platform_driver support fails to link when I2C core support is not rechable:

x86_64-linux-ld: drivers/platform/x86/lenovo-yogabook.o: in function `yogabook_pdev_probe':
lenovo-yogabook.c:(.text+0x5a5): undefined reference to `i2c_bus_type'

Add a Kconfig dependency to enforce a working configuration.

Fixes 6df1523fa0b7 ("platform/x86: lenovo-yogabook: Add platform driver support")
---
 drivers/platform/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
index 9fe974d5f645..63637ea99c2f 100644
@@ -125,6 +125,7 @@ config YOGABOOK
 	tristate "Lenovo Yoga Book tablet key driver"
 	depends on ACPI_WMI
 	depends on INPUT
+	depends on I2C
 	select LEDS_CLASS
 	select NEW_LEDS
 	help
Signature · 1 line
2.39.2
#1 lore raw

Hi Arnd,

Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The added platform_driver support fails to link when I2C core support is not rechable:

Quoted 7 lines

x86_64-linux-ld: drivers/platform/x86/lenovo-yogabook.o: in function `yogabook_pdev_probe':
lenovo-yogabook.c:(.text+0x5a5): undefined reference to `i2c_bus_type'

Add a Kconfig dependency to enforce a working configuration.

Fixes 6df1523fa0b7 ("platform/x86: lenovo-yogabook: Add platform driver support")

Thank you I have pushed this to pdx86/for-next now.

Regards,

Hans

Quoted 16 lines
---
 drivers/platform/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
index 9fe974d5f645..63637ea99c2f 100644
@@ -125,6 +125,7 @@ config YOGABOOK
 	tristate "Lenovo Yoga Book tablet key driver"
 	depends on ACPI_WMI
 	depends on INPUT
+	depends on I2C
 	select LEDS_CLASS
 	select NEW_LEDS
 	help