Skip to contentSkip to conversation

mfd: intel_soc_pmic: Fix a mess with compilation units

PATCH Superseded Andy Shevchenko 2 participants 5 messages Mar 13, 2017 – Mar 17, 2017

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mfd: intel_soc_pmic: Fix a mess with compilation units

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 are 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 ever tested. The line in
Makefile is actually wrong.

---
 drivers/mfd/Kconfig          | 9 +++++++--
 drivers/mfd/Makefile         | 2 +-
 drivers/platform/x86/Kconfig | 1 +
 3 files changed, 9 insertions(+), 3 deletions(-)
drivers/mfd/Kconfig +7 -2
index 55ecdfb74d31..83609acd55ef 100644
@@ -425,18 +425,23 @@ 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
+	select MFD_CORE
+	select REGMAP_IRQ
+
 config MFD_INTEL_LPSS
 	tristate
 	select COMMON_CLK
drivers/mfd/Makefile +1 -1
index 31ce07611a6f..201aeaf5112a 100644
@@ -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
drivers/platform/x86/Kconfig +1 -0
index e1bffc9bb194..afbff6d9834b 100644
@@ -1011,6 +1011,7 @@ config PVPANIC
 config INTEL_PMC_IPC
 	tristate "Intel PMC IPC Driver"
 	depends on ACPI
+	select INTEL_SOC_PMIC_BXTWC
 	---help---
 	This driver provides support for PMC control on some Intel platforms.
 	The PMC is an ARC processor which defines IPC commands for communication
Signature · 1 line
2.11.0
#1 lore raw
Quoted 35 lines · Andy Shevchenko

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 are 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 ever tested. The line in
Makefile is actually wrong.

---
 drivers/mfd/Kconfig          | 9 +++++++--
 drivers/mfd/Makefile         | 2 +-
 drivers/platform/x86/Kconfig | 1 +
 3 files changed, 9 insertions(+), 3 deletions(-)
drivers/mfd/Kconfig +1 -1
index 55ecdfb74d31..83609acd55ef 100644
@@ -425,18 +425,23 @@ 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

drivers/mfd/Kconfig config LPC_SCH · line 443

Quoted 10 lines
drivers/mfd/Kconfig +5 -1
-	  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
+	select MFD_CORE
+	select REGMAP_IRQ

I think you need to make mention that this is Whiskey Cove?

Quoted 29 lines
drivers/mfd/Kconfig +0 -0
 config MFD_INTEL_LPSS
 	tristate
 	select COMMON_CLK
drivers/mfd/Makefile +1 -1
index 31ce07611a6f..201aeaf5112a 100644
@@ -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
drivers/platform/x86/Kconfig +1 -0
index e1bffc9bb194..afbff6d9834b 100644
@@ -1011,6 +1011,7 @@ config PVPANIC
 config INTEL_PMC_IPC
 	tristate "Intel PMC IPC Driver"
 	depends on ACPI
+	select INTEL_SOC_PMIC_BXTWC
 	---help---
 	This driver provides support for PMC control on some Intel platforms.
 	The PMC is an ARC processor which defines IPC commands for communication
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#2 lore raw
Quoted 8 lines · Lee Jones
Quoted 6 lines · Andy Shevchenko

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 are supposed (*) to get into one kernel module.

Quoted 6 lines
Quoted 6 lines

Fix the mess by clarifying Kconfig option for Crystal Cove and split Whiskey Cove out of it.

(*) It looks like the configuration was never ever tested. The line in
    Makefile is actually wrong.

Quoted 14 lines
Quoted 14 lines

 config INTEL_SOC_PMIC

drivers/mfd/Kconfig +1 -1
-	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

(quoted diff) +1 -1
-	  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

Quoted 8 lines

drivers/mfd/Kconfig config LPC_SCH · line 443

Quoted 6 lines

    on these systems.

drivers/mfd/Kconfig +4 -0
+config INTEL_SOC_PMIC_BXTWC
+	tristate
+	select MFD_CORE
+	select REGMAP_IRQ

I think you need to make mention that this is Whiskey Cove?

It's selectable option, so I don't know if it's a good idea to make it visible to the user. Or do you mean fill the help section only?

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#3 lore raw
Quoted 39 lines · Andy Shevchenko
Quoted 8 lines · Lee Jones
Quoted 6 lines · Andy Shevchenko

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 are supposed (*) to get into one kernel module.

Quoted 6 lines
Quoted 6 lines

Fix the mess by clarifying Kconfig option for Crystal Cove and split Whiskey Cove out of it.

(*) It looks like the configuration was never ever tested. The line in
    Makefile is actually wrong.

Quoted 14 lines
Quoted 14 lines

 config INTEL_SOC_PMIC

drivers/mfd/Kconfig +1 -1
-	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

(quoted diff) +1 -1
-	  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

Quoted 8 lines

drivers/mfd/Kconfig config LPC_SCH · line 443

Quoted 6 lines

    on these systems.

drivers/mfd/Kconfig +4 -0
+config INTEL_SOC_PMIC_BXTWC
+	tristate
+	select MFD_CORE
+	select REGMAP_IRQ

I think you need to make mention that this is Whiskey Cove?

Quoted 2 lines

It's selectable option, so I don't know if it's a good idea to make it visible to the user. Or do you mean fill the help section only?

I think you just answered your own question. :)

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#4 lore raw
Quoted 1 line · Lee Jones

On Tue, 14 Mar 2017, Andy Shevchenko wrote:

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

drivers/mfd/Kconfig config LPC_SCH · line 443

Quoted 4 lines
drivers/mfd/Kconfig +4 -0
+config INTEL_SOC_PMIC_BXTWC
+	tristate
+	select MFD_CORE
+	select REGMAP_IRQ

I think you need to make mention that this is Whiskey Cove?

Quoted 5 lines
Quoted 3 lines

It's selectable option, so I don't know if it's a good idea to make it
visible to the user. Or do you mean fill the help section only?

I think you just answered your own question. :)

Since Hans is going to make Cherry Trail Whiskey Cove module user visible I do it here for sake of consistency.

I'm about to send v3 then.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy