Re: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation units

From: Andy Shevchenko
Date: Sun Mar 26 2017 - 08:43:50 EST


On Thu, 2017-03-23 at 12:12 +0000, Lee Jones wrote:
> On Fri, 17 Mar 2017, Andy Shevchenko wrote:
>
> > Crystal Cove and Whiskey Cove are two different PMICs which are
> > installed on Intel Atom SoC based platforms.
> >
> > Moreover there are two independent drivers that by some reason were
> > supposed (*) to get into one kernel module.
> >
> > Fix the mess by clarifying Kconfig option for Crystal Cove and split
> > Whiskey Cove out of it.
> >
> > (*) It looks like the configuration was never tested with
> > ÂÂÂÂINTEL_SOC_PMIC=n. The line in Makefile is actually wrong.
> >
> > Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx> (supporter:ACPI)
> > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx> (maintainer:GPIO
> > SUBSYSTEM)
> > Cc: Zhang Rui <rui.zhang@xxxxxxxxx> (supporter:THERMAL)
> > Cc: Eduardo Valentin <edubezval@xxxxxxxxx> (supporter:THERMAL)
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > ---
> > - make option visible
> > - fix dependencies
> > Âdrivers/acpi/KconfigÂÂÂÂÂÂÂÂÂ|ÂÂ2 +-
>
> This needs an ACPI Ack before I can do anything with it.

Rafael, can you give you tag?

>
> > Âdrivers/gpio/KconfigÂÂÂÂÂÂÂÂÂ|ÂÂ2 +-
> > Âdrivers/mfd/KconfigÂÂÂÂÂÂÂÂÂÂ| 14 ++++++++++++--
> > Âdrivers/mfd/MakefileÂÂÂÂÂÂÂÂÂ|ÂÂ2 +-
> > Âdrivers/platform/x86/Kconfig |ÂÂ2 +-
> > Âdrivers/thermal/KconfigÂÂÂÂÂÂ|ÂÂ2 +-
> > Â6 files changed, 17 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> > index 83e5f7e1a20d..03708e08fcb4 100644
> > --- a/drivers/acpi/Kconfig
> > +++ b/drivers/acpi/Kconfig
> > @@ -512,7 +512,7 @@ config XPOWER_PMIC_OPREGION
> > Â
> > Âconfig BXT_WC_PMIC_OPREGION
> > Â bool "ACPI operation region support for BXT WhiskeyCove
> > PMIC"
> > - depends on INTEL_SOC_PMIC
> > + depends on INTEL_SOC_PMIC_BXTWC
> > Â help
> > Â ÂÂThis config adds ACPI operation region support for BXT
> > WhiskeyCove PMIC.
> > Â
> > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> > index 05043071fc98..9b1bcb4d0df7 100644
> > --- a/drivers/gpio/Kconfig
> > +++ b/drivers/gpio/Kconfig
> > @@ -1054,7 +1054,7 @@ config GPIO_UCB1400
> > Â
> > Âconfig GPIO_WHISKEY_COVE
> > Â tristate "GPIO support for Whiskey Cove PMIC"
> > - depends on (X86 || COMPILE_TEST) && INTEL_SOC_PMIC
> > + depends on (X86 || COMPILE_TEST) && INTEL_SOC_PMIC_BXTWC
> > Â select GPIOLIB_IRQCHIP
> > Â help
> > Â ÂÂSupport for GPIO pins on Whiskey Cove PMIC.
> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > index 55ecdfb74d31..e43afb8956ea 100644
> > --- a/drivers/mfd/Kconfig
> > +++ b/drivers/mfd/Kconfig
> > @@ -425,18 +425,28 @@ config LPC_SCH
> > Â ÂÂSystem Management Bus and General Purpose I/O.
> > Â
> > Âconfig INTEL_SOC_PMIC
> > - bool "Support for Intel Atom SoC PMIC"
> > + bool "Support for Crystal Cove PMIC"
> > Â depends on GPIOLIB
> > Â depends on I2C=y
> > Â select MFD_CORE
> > Â select REGMAP_I2C
> > Â select REGMAP_IRQ
> > Â help
> > - ÂÂSelect this option to enable support for the PMIC device
> > + ÂÂSelect this option to enable support for Crystal Cove
> > PMIC
> > Â ÂÂon some Intel SoC systems. The PMIC provides ADC, GPIO,
> > Â ÂÂthermal, charger and related power management functions
> > Â ÂÂon these systems.
> > Â
> > +config INTEL_SOC_PMIC_BXTWC
> > + tristate "Support for Intel Broxton Whiskey Cove PMIC"
> > + select MFD_CORE
> > + select REGMAP_IRQ
> > + help
> > + ÂÂSelect this option to enable support for Whiskey Cove
> > PMIC
> > + ÂÂon Intel Broxton systems. The PMIC provides ADC, GPIO,
> > + ÂÂthermal, charger and related power management functions
> > + ÂÂon these systems.
> > +
> > Âconfig MFD_INTEL_LPSS
> > Â tristate
> > Â select COMMON_CLK
> > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> > index 31ce07611a6f..201aeaf5112a 100644
> > --- a/drivers/mfd/Makefile
> > +++ b/drivers/mfd/Makefile
> > @@ -207,8 +207,8 @@ obj-$(CONFIG_MFD_RT5033) += rt5033.o
> > Âobj-$(CONFIG_MFD_SKY81452) += sky81452.o
> > Â
> > Âintel-soc-pmic-objs := intel_soc_pmic_core.o
> > intel_soc_pmic_crc.o
> > -intel-soc-pmic-$(CONFIG_INTEL_PMC_IPC) +=
> > intel_soc_pmic_bxtwc.o
> > Âobj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o
> > +obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o
> > Âobj-$(CONFIG_MFD_MT6397) += mt6397-core.o
> > Â
> > Âobj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o
> > diff --git a/drivers/platform/x86/Kconfig
> > b/drivers/platform/x86/Kconfig
> > index e1bffc9bb194..883fbe7a2466 100644
> > --- a/drivers/platform/x86/Kconfig
> > +++ b/drivers/platform/x86/Kconfig
> > @@ -1019,7 +1019,7 @@ config INTEL_PMC_IPC
> > Âconfig INTEL_BXTWC_PMIC_TMU
> > Â tristate "Intel BXT Whiskey Cove TMU Driver"
> > Â depends on REGMAP
> > - depends on INTEL_SOC_PMIC && INTEL_PMC_IPC
> > + depends on INTEL_SOC_PMIC_BXTWC && INTEL_PMC_IPC
> > Â ---help---
> > Â ÂÂSelect this driver to use Intel BXT Whiskey Cove PMIC TMU
> > feature.
> > Â ÂÂThis driver enables the alarm wakeup functionality in the
> > TMU unit
> > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> > index 776b34396144..751e50a3d946 100644
> > --- a/drivers/thermal/Kconfig
> > +++ b/drivers/thermal/Kconfig
> > @@ -365,7 +365,7 @@ endmenu
> > Â
> > Âconfig INTEL_BXT_PMIC_THERMAL
> > Â tristate "Intel Broxton PMIC thermal driver"
> > - depends on X86 && INTEL_SOC_PMIC && REGMAP
> > + depends on X86 && INTEL_SOC_PMIC_BXTWC && REGMAP
> > Â help
> > Â ÂÂSelect this driver for Intel Broxton PMIC with ADC
> > channels monitoring
> > Â ÂÂsystem temperature measurements and alerts.
>
>

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy