mfd: intel_soc_pmic: Select designware i2c-bus driver
PATCH v2 1/2 mfd: intel_soc_pmic: Select designware i2c-bus driver
The Crystal Cove PMIC provides an ACPI OPRegion handler, which must be available before other drivers using it are loaded, which is why INTEL_SOC_PMIC is a bool.
Just having the driver is not enough, the driver for the i2c-bus must also be built in, to ensure this, this patch adds a select for it.
This fixes errors like these during boot:
mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion] (20170119/evregion-166) ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-299)
ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93543b0cde10), AE_NOT_EXIST (20170119/psparse-543) ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Node ffff93543b0b5cd0), AE_NOT_EXIST (20170119/psparse-543) acpi 80860F14:02: Failed to change power state to D0
While at it this patch also changes the human readable name of the Kconfig option to make clear the INTEL_SOC_PMIC option selects support for the Intel Crystal Cove PMIC and documents why this is a bool.
---
Note this patch will partially conflicts with (contains the same changes as) a patch in Andy Shevchenko's tree.
---
Changes in v2:
-Fix Kconfig depends and selects to fix warning reported by kbuild test robot -Improve commit msg (add example of ACPI errors this avoids)
--- drivers/mfd/Kconfig | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/mfd/Kconfig +11 -4
@@ -425,14 +425,21 @@ config LPC_SCH System Management Bus and General Purpose I/O. config INTEL_SOC_PMIC - bool "Support for Intel Atom SoC PMIC" - depends on GPIOLIB - depends on I2C=y + # This is a bool as it provides an ACPI Opregion which must be + # available as soon as possible + bool "Support for Intel Crystal Cove PMIC" + select GPIOLIB select MFD_CORE select REGMAP_I2C select REGMAP_IRQ + # In order for the ACPI Opregion to be available the i2c-adapter + # driver must be builtin too, select it and its deps + depends on HAS_IOMEM + select I2C + select COMMON_CLK + select I2C_DESIGNWARE_PLATFORM help - Select this option to enable support for the PMIC device + Select this option to enable support for the Crystal Cove PMIC on some Intel SoC systems. The PMIC provides ADC, GPIO, thermal, charger and related power management functions on these systems.
Signature · 1 line
2.9.3
PATCH v2 2/2 mfd: axp20c-i2c: Select designware i2c-bus driver on x86
On x86 the axp288 PMIC provides an ACPI OPRegion handler, which must be available before other drivers using it are loaded, which can only be ensured if the mfd, opregion driver and i2c-bus drivers are built in.
The opregion driver is a bool depending on MFD_AXP20X_I2C ensuring that it will be builtin if the opregion driver is to be enabled, add a select for the designware-options to ensure those get built in too.
This fixes errors like these during boot:
mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion] ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-2 ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93 ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Node ffff93543b acpi 80860F14:02: Failed to change power state to D0
---
Changes in v2:
-Fix Kconfig depends and selects to fix warning reported by kbuild test robot -Improve commit msg (add example of ACPI errors this avoids)
--- drivers/mfd/Kconfig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/mfd/Kconfig +12 -1
@@ -148,7 +148,14 @@ config MFD_AXP20X_I2C tristate "X-Powers AXP series PMICs with I2C" select MFD_AXP20X select REGMAP_I2C - depends on I2C + # In order for the ACPI Opregion this provides on x86 to be available + # the i2c-adapter driver must be builtin too, select it and its deps + depends on X86=n || (ACPI && HAS_IOMEM) + select I2C + select IOSF_MBI if X86 + select COMMON_CLK if X86 + select I2C_DESIGNWARE_PLATFORM if X86 + select I2C_DESIGNWARE_BAYTRAIL if X86 help If you say Y here you get support for the X-Powers AXP series power management ICs (PMICs) controlled with I2C.
@@ -156,6 +163,10 @@ config MFD_AXP20X_I2C components like regulators or the PEK (Power Enable Key) under the corresponding menus. + Note on x86 this provides an ACPI Opregion, so this must be 'y' + (builtin) and not a module, as the OPregion must be available as + soon as possible. + config MFD_AXP20X_RSB tristate "X-Powers AXP series PMICs with RSB" select MFD_AXP20X
Signature · 1 line
2.9.3
kbuild test robot
build botRe: [PATCH v2 2/2] mfd: axp20c-i2c: Select designware i2c-bus driver on x86
reproduce:
Hi Hans,
[auto build test ERROR on ljones-mfd/for-mfd-next]
[also build test ERROR on v4.11-rc4 next-20170329]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Hans-de-Goede/mfd-intel_soc_pmic-Select-designware-i2c-bus-driver/20170330-102517 base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next config: i386-randconfig-r0-201713 (attached as .config) compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904 reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/built-in.o: In function `reset_semaphore':
>> i2c-designware-baytrail.c:(.text+0x136c3b): undefined reference to `iosf_mbi_read' >> i2c-designware-baytrail.c:(.text+0x136c65): undefined reference to `iosf_mbi_write' drivers/built-in.o: In function `baytrail_i2c_acquire': i2c-designware-baytrail.c:(.text+0x136ce6): undefined reference to `iosf_mbi_write' i2c-designware-baytrail.c:(.text+0x136d26): undefined reference to `iosf_mbi_read' i2c-designware-baytrail.c:(.text+0x136da1): undefined reference to `iosf_mbi_read' drivers/built-in.o: In function `i2c_dw_eval_lock_support': >> (.text+0x136f01): undefined reference to `iosf_mbi_available'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botRe: [PATCH v2 2/2] mfd: axp20c-i2c: Select designware i2c-bus driver on x86
In reply to Hans de Goedereproduce:
Hi Hans,
[auto build test WARNING on ljones-mfd/for-mfd-next]
[also build test WARNING on v4.11-rc4 next-20170329]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Hans-de-Goede/mfd-intel_soc_pmic-Select-designware-i2c-bus-driver/20170330-102517 base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next config: i386-randconfig-x074-201713 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386
All warnings (new ones prefixed by >>):
warning: (MFD_AXP20X_I2C) selects I2C_DESIGNWARE_BAYTRAIL which has unmet direct dependencies (I2C && HAS_IOMEM && ACPI && (I2C_DESIGNWARE_PLATFORM=m && IOSF_MBI || I2C_DESIGNWARE_PLATFORM=y && IOSF_MBI=y))
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH v2 2/2] mfd: axp20c-i2c: Select designware i2c-bus driver on x86
In reply to Hans de GoedeQuoted 17 lines · Hans de Goede
On x86 the axp288 PMIC provides an ACPI OPRegion handler, which must be available before other drivers using it are loaded, which can only be ensured if the mfd, opregion driver and i2c-bus drivers are built in.
The opregion driver is a bool depending on
MFD_AXP20X_I2Censuring that it will be builtin if the opregion driver is to be enabled, add a select for the designware-options to ensure those get built in too.This fixes errors like these during boot:
mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion] ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-2 ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93 ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Nodeffff93543bacpi 80860F14:02: Failed to change power state to D0
Quoted 4 lines
Signed-off-by Hans de Goede <[email protected]>---
Changes in v2:
-FixKconfigdepends and selects to fix warning reported by kbuild test robot
Looks like there is still an issue.
Quoted 36 lines
(quoted diff) +0
-2-Improve commit msg (add example of ACPI errors this avoids) --- drivers/mfd/Kconfig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)drivers/mfd/Kconfig +12
-1@@ -148,7 +148,14 @@ config MFD_AXP20X_I2C tristate "X-Powers AXP series PMICs with I2C" select MFD_AXP20X select REGMAP_I2C - depends on I2C + # In order for the ACPI Opregion this provides on x86 to be available + # the i2c-adapter driver must be builtin too, select it and its deps + depends on X86=n || (ACPI && HAS_IOMEM) + select I2C + select IOSF_MBI if X86 + select COMMON_CLK if X86 + select I2C_DESIGNWARE_PLATFORM if X86 + select I2C_DESIGNWARE_BAYTRAIL if X86 help If you say Y here you get support for the X-Powers AXP series power management ICs (PMICs) controlled with I2C.@@ -156,6 +163,10 @@ config MFD_AXP20X_I2C components like regulators or the PEK (Power Enable Key) under the corresponding menus. + Note on x86 this provides an ACPI Opregion, so this must be 'y' + (builtin) and not a module, as the OPregion must be available as + soon as possible. + config MFD_AXP20X_RSB tristate "X-Powers AXP series PMICs with RSB" select MFD_AXP20X
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v2 2/2] mfd: axp20c-i2c: Select designware i2c-bus driver on x86
Hi,
Quoted 19 lines · Lee Jones
Quoted 17 lines · Hans de Goede
On x86 the axp288 PMIC provides an ACPI OPRegion handler, which must be available before other drivers using it are loaded, which can only be ensured if the mfd, opregion driver and i2c-bus drivers are built in.
The opregion driver is a bool depending on
MFD_AXP20X_I2Censuring that it will be builtin if the opregion driver is to be enabled, add a select for the designware-options to ensure those get built in too.This fixes errors like these during boot:
mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
ACPI Error: No handler for Region [REGS] (ffff93543b0cc3a8) [UserDefinedRegion] ACPI Error: Region UserDefinedRegion (ID=143) has no handler (20170119/exfldio-2 ACPI Error: Method parse/execution failed [\_SB.PCI0.I2C7.PMI5.GET] (Node ffff93 ACPI Error: Method parse/execution failed [\_SB.PCI0.SHC1._PS0] (Nodeffff93543bacpi 80860F14:02: Failed to change power state to D0
Quoted 6 lines
Quoted 4 lines
Signed-off-by Hans de Goede <[email protected]>---
Changes in v2:
-FixKconfigdepends and selects to fix warning reported by kbuild test robotLooks like there is still an issue.
Yes I noticed the new kbuild test mails I will take a look at this and do a v3 as time permits.
Regards,
Hans
Quoted 38 lines
Quoted 37 lines
(quoted diff) +0
-2-Improve commit msg (add example of ACPI errors this avoids) --- drivers/mfd/Kconfig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)drivers/mfd/Kconfig +12
-1@@ -148,7 +148,14 @@ config MFD_AXP20X_I2C tristate "X-Powers AXP series PMICs with I2C" select MFD_AXP20X select REGMAP_I2C - depends on I2C + # In order for the ACPI Opregion this provides on x86 to be available + # the i2c-adapter driver must be builtin too, select it and its deps + depends on X86=n || (ACPI && HAS_IOMEM) + select I2C + select IOSF_MBI if X86 + select COMMON_CLK if X86 + select I2C_DESIGNWARE_PLATFORM if X86 + select I2C_DESIGNWARE_BAYTRAIL if X86 help If you say Y here you get support for the X-Powers AXP series power management ICs (PMICs) controlled with I2C.@@ -156,6 +163,10 @@ config MFD_AXP20X_I2C components like regulators or the PEK (Power Enable Key) under the corresponding menus. + Note on x86 this provides an ACPI Opregion, so this must be 'y' + (builtin) and not a module, as the OPregion must be available as + soon as possible. + config MFD_AXP20X_RSB tristate "X-Powers AXP series PMICs with RSB" select MFD_AXP20X