Skip to contentSkip to conversation

platform/x86: x86-android-tablets: select PMIC_OPREGION to resolve a link error of intel_soc_pmic_exec_mipi_pmic_seq_element

PATCH In review Tom Rix 2 participants 3 messages Mar 10, 2023 – Mar 11, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 platform/x86: x86-android-tablets: select PMIC_OPREGION to resolve a link error of intel_soc_pmic_exec_mipi_pmic_seq_element

A rand config causes this link error drivers/platform/x86/x86-android-tablets/lenovo.o: In function `lenovo_yt3_init':
lenovo.c:(.init.text+0x6c): undefined reference to `intel_soc_pmic_exec_mipi_pmic_seq_element'

The rand config has
CONFIG_X86_ANDROID_TABLETS=y
CONFIG_PMIC_OPREGION=n

PMIC_OPREGION should be selected to build the
intel_soc_pmic_exec_mipi_pmic_seq_element symbol.

---
 drivers/platform/x86/x86-android-tablets/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/x86-android-tablets/Kconfig +1 -0
index 2b3daca5380b..65980229d783 100644
@@ -6,6 +6,7 @@
 config X86_ANDROID_TABLETS
 	tristate "X86 Android tablet support"
 	depends on I2C && SPI && SERIAL_DEV_BUS && ACPI && EFI && GPIOLIB
+	select PMIC_OPREGION
 	help
 	  X86 tablets which ship with Android as (part of) the factory image
 	  typically have various problems with their DSDTs. The factory kernels
Signature · 1 line
2.27.0
#1 lore raw

Hi,

Quoted 4 lines · Tom Rix

A rand config causes this link error drivers/platform/x86/x86-android-tablets/lenovo.o: In function `lenovo_yt3_init':
lenovo.c:(.init.text+0x6c): undefined reference to `intel_soc_pmic_exec_mipi_pmic_seq_element'

Quoted 8 lines

The rand config has
CONFIG_X86_ANDROID_TABLETS=y
CONFIG_PMIC_OPREGION=n

PMIC_OPREGION should be selected to build the
intel_soc_pmic_exec_mipi_pmic_seq_element symbol.

Thanks, but this is a dup with:

https://patchwork.kernel.org/project/platform-driver-x86/patch/[email protected]/

I just did not get around to pushing that out to pdx86/for-next yet. I have just pushed this to pdx86/for-next to avoid further duplicate fixes.

FWIW, since all other users of PMIC_OPREGION use depends on, not select this should have been a depends on too. Unless Kconfig symbols are explicitly intended to be selected (typically these are hidden Kconfig symbols (1)) then you should usually use depends on. Mixing depends on and select leads to Kconfig circular dependencies errors.

Regards,

Hans

1) A hidden Kconfig symbol is one which is e.g. just 'bool' not 'bool "Description of feature here"' these typically are libraries /

helpers.

Quoted 16 lines
---
 drivers/platform/x86/x86-android-tablets/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/x86-android-tablets/Kconfig +1 -0
index 2b3daca5380b..65980229d783 100644
@@ -6,6 +6,7 @@
 config X86_ANDROID_TABLETS
 	tristate "X86 Android tablet support"
 	depends on I2C && SPI && SERIAL_DEV_BUS && ACPI && EFI && GPIOLIB
+	select PMIC_OPREGION
 	help
 	  X86 tablets which ship with Android as (part of) the factory image
 	  typically have various problems with their DSDTs. The factory kernels
author
#2 lore raw
Quoted 19 lines · Hans de Goede

Hi,

Quoted 4 lines · Tom Rix

A rand config causes this link error drivers/platform/x86/x86-android-tablets/lenovo.o: In function `lenovo_yt3_init':
lenovo.c:(.init.text+0x6c): undefined reference to `intel_soc_pmic_exec_mipi_pmic_seq_element'

Quoted 8 lines

The rand config has
CONFIG_X86_ANDROID_TABLETS=y
CONFIG_PMIC_OPREGION=n

PMIC_OPREGION should be selected to build the
intel_soc_pmic_exec_mipi_pmic_seq_element symbol.

Thanks, but this is a dup with:

https://patchwork.kernel.org/project/platform-driver-x86/patch/[email protected]/

Quoted 8 lines

I just did not get around to pushing that out to pdx86/for-next yet. I have just pushed this to pdx86/for-next to avoid further duplicate fixes.

FWIW, since all other users of PMIC_OPREGION use depends on, not select this should have been a depends on too. Unless Kconfig symbols are explicitly intended to be selected (typically these are hidden Kconfig symbols (1)) then you should usually use depends on. Mixing depends on and select leads to Kconfig circular dependencies errors.

Ok, thanks for the pointer.

Tom

Quoted 30 lines

Regards,

Hans

1) A hidden Kconfig symbol is one which is e.g. just 'bool' not 'bool "Description of feature here"' these typically are libraries /

helpers.

Quoted 16 lines
---
  drivers/platform/x86/x86-android-tablets/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/platform/x86/x86-android-tablets/Kconfig +1 -0
index 2b3daca5380b..65980229d783 100644
@@ -6,6 +6,7 @@
  config X86_ANDROID_TABLETS
  	tristate "X86 Android tablet support"
  	depends on I2C && SPI && SERIAL_DEV_BUS && ACPI && EFI && GPIOLIB
+	select PMIC_OPREGION
  	help
  	  X86 tablets which ship with Android as (part of) the factory image
  	  typically have various problems with their DSDTs. The factory kernels