Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1603415 > unrolled thread

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

Started byAndy Shevchenko <andriy.shevchenko@linux.intel.com>
First post2017-03-17 16:40 +0100
Last post2017-03-27 04:20 +0200
Articles 9 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation units Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-03-17 16:40 +0100
    [PATCH v3 3/3] mfd: intel_soc_pmic_bxtwc: Rename header to follow c-file Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-03-17 16:40 +0100
      Re: [PATCH v3 3/3] mfd: intel_soc_pmic_bxtwc: Rename header to  follow c-file Lee Jones <lee.jones@linaro.org> - 2017-03-23 13:20 +0100
    [PATCH v3 2/3] mfd: intel_soc_pmic_bxtwc: Move inclusion to c-file Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-03-17 16:40 +0100
      Re: [PATCH v3 2/3] mfd: intel_soc_pmic_bxtwc: Move inclusion to  c-file Lee Jones <lee.jones@linaro.org> - 2017-03-23 13:20 +0100
    Re: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation units Linus Walleij <linus.walleij@linaro.org> - 2017-03-18 18:10 +0100
    Re: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation  units Lee Jones <lee.jones@linaro.org> - 2017-03-23 13:20 +0100
      Re: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation  units Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-03-26 14:50 +0200
        Re: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation  units Zhang Rui <rui.zhang@intel.com> - 2017-03-27 04:20 +0200

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

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-03-17 16:40 +0100
Subject[PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation units
Message-ID<tm28W-76-3@gated-at.bofh.it>
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@rjwysocki.net> (supporter:ACPI)
Cc: Linus Walleij <linus.walleij@linaro.org> (maintainer:GPIO SUBSYSTEM)
Cc: Zhang Rui <rui.zhang@intel.com> (supporter:THERMAL)
Cc: Eduardo Valentin <edubezval@gmail.com> (supporter:THERMAL)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
- make option visible
- fix dependencies
 drivers/acpi/Kconfig         |  2 +-
 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.
-- 
2.11.0

[toc] | [next] | [standalone]


#1603416 — [PATCH v3 3/3] mfd: intel_soc_pmic_bxtwc: Rename header to follow c-file

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-03-17 16:40 +0100
Subject[PATCH v3 3/3] mfd: intel_soc_pmic_bxtwc: Rename header to follow c-file
Message-ID<tm28W-76-13@gated-at.bofh.it>
In reply to#1603415
For better understanding of relationship between headers and modules
rename:
	intel_bxtwc.h -> intel_soc_pmic_bxtwc.h

While here, remove file name from the file itself.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c                          | 2 +-
 include/linux/mfd/{intel_bxtwc.h => intel_soc_pmic_bxtwc.h} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename include/linux/mfd/{intel_bxtwc.h => intel_soc_pmic_bxtwc.h} (96%)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index c71db687b7ca..1496a862baa6 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -20,8 +20,8 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/mfd/core.h>
-#include <linux/mfd/intel_bxtwc.h>
 #include <linux/mfd/intel_soc_pmic.h>
+#include <linux/mfd/intel_soc_pmic_bxtwc.h>
 #include <asm/intel_pmc_ipc.h>
 
 /* PMIC device registers */
diff --git a/include/linux/mfd/intel_bxtwc.h b/include/linux/mfd/intel_soc_pmic_bxtwc.h
similarity index 96%
rename from include/linux/mfd/intel_bxtwc.h
rename to include/linux/mfd/intel_soc_pmic_bxtwc.h
index 240d6752ec64..0c351bc85d2d 100644
--- a/include/linux/mfd/intel_bxtwc.h
+++ b/include/linux/mfd/intel_soc_pmic_bxtwc.h
@@ -1,5 +1,5 @@
 /*
- * intel_bxtwc.h - Header file for Intel Broxton Whiskey Cove PMIC
+ * Header file for Intel Broxton Whiskey Cove PMIC
  *
  * Copyright (C) 2015 Intel Corporation. All rights reserved.
  *
-- 
2.11.0

[toc] | [prev] | [next] | [standalone]


#1607428 — Re: [PATCH v3 3/3] mfd: intel_soc_pmic_bxtwc: Rename header to follow c-file

FromLee Jones <lee.jones@linaro.org>
Date2017-03-23 13:20 +0100
SubjectRe: [PATCH v3 3/3] mfd: intel_soc_pmic_bxtwc: Rename header to follow c-file
Message-ID<to9SG-25x-21@gated-at.bofh.it>
In reply to#1603416
On Fri, 17 Mar 2017, Andy Shevchenko wrote:

> For better understanding of relationship between headers and modules
> rename:
> 	intel_bxtwc.h -> intel_soc_pmic_bxtwc.h
> 
> While here, remove file name from the file itself.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c                          | 2 +-
>  include/linux/mfd/{intel_bxtwc.h => intel_soc_pmic_bxtwc.h} | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>  rename include/linux/mfd/{intel_bxtwc.h => intel_soc_pmic_bxtwc.h} (96%)

Applied, thanks.

> diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
> index c71db687b7ca..1496a862baa6 100644
> --- a/drivers/mfd/intel_soc_pmic_bxtwc.c
> +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
> @@ -20,8 +20,8 @@
>  #include <linux/interrupt.h>
>  #include <linux/kernel.h>
>  #include <linux/mfd/core.h>
> -#include <linux/mfd/intel_bxtwc.h>
>  #include <linux/mfd/intel_soc_pmic.h>
> +#include <linux/mfd/intel_soc_pmic_bxtwc.h>
>  #include <asm/intel_pmc_ipc.h>
>  
>  /* PMIC device registers */
> diff --git a/include/linux/mfd/intel_bxtwc.h b/include/linux/mfd/intel_soc_pmic_bxtwc.h
> similarity index 96%
> rename from include/linux/mfd/intel_bxtwc.h
> rename to include/linux/mfd/intel_soc_pmic_bxtwc.h
> index 240d6752ec64..0c351bc85d2d 100644
> --- a/include/linux/mfd/intel_bxtwc.h
> +++ b/include/linux/mfd/intel_soc_pmic_bxtwc.h
> @@ -1,5 +1,5 @@
>  /*
> - * intel_bxtwc.h - Header file for Intel Broxton Whiskey Cove PMIC
> + * Header file for Intel Broxton Whiskey Cove PMIC
>   *
>   * Copyright (C) 2015 Intel Corporation. All rights reserved.
>   *

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [prev] | [next] | [standalone]


#1603421 — [PATCH v3 2/3] mfd: intel_soc_pmic_bxtwc: Move inclusion to c-file

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-03-17 16:40 +0100
Subject[PATCH v3 2/3] mfd: intel_soc_pmic_bxtwc: Move inclusion to c-file
Message-ID<tm28X-76-31@gated-at.bofh.it>
In reply to#1603415
There is no need to include intel_soc_pmic.h into header which doesn't
require it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 1 +
 include/linux/mfd/intel_bxtwc.h    | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 699c8c7c9052..c71db687b7ca 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/intel_bxtwc.h>
+#include <linux/mfd/intel_soc_pmic.h>
 #include <asm/intel_pmc_ipc.h>
 
 /* PMIC device registers */
diff --git a/include/linux/mfd/intel_bxtwc.h b/include/linux/mfd/intel_bxtwc.h
index 1a0ee9d6efe9..240d6752ec64 100644
--- a/include/linux/mfd/intel_bxtwc.h
+++ b/include/linux/mfd/intel_bxtwc.h
@@ -13,8 +13,6 @@
  * more details.
  */
 
-#include <linux/mfd/intel_soc_pmic.h>
-
 #ifndef __INTEL_BXTWC_H__
 #define __INTEL_BXTWC_H__
 
-- 
2.11.0

[toc] | [prev] | [next] | [standalone]


#1607425 — Re: [PATCH v3 2/3] mfd: intel_soc_pmic_bxtwc: Move inclusion to c-file

FromLee Jones <lee.jones@linaro.org>
Date2017-03-23 13:20 +0100
SubjectRe: [PATCH v3 2/3] mfd: intel_soc_pmic_bxtwc: Move inclusion to c-file
Message-ID<to9SG-25x-15@gated-at.bofh.it>
In reply to#1603421
On Fri, 17 Mar 2017, Andy Shevchenko wrote:

> There is no need to include intel_soc_pmic.h into header which doesn't
> require it.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 1 +
>  include/linux/mfd/intel_bxtwc.h    | 2 --
>  2 files changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
> index 699c8c7c9052..c71db687b7ca 100644
> --- a/drivers/mfd/intel_soc_pmic_bxtwc.c
> +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
> @@ -21,6 +21,7 @@
>  #include <linux/kernel.h>
>  #include <linux/mfd/core.h>
>  #include <linux/mfd/intel_bxtwc.h>
> +#include <linux/mfd/intel_soc_pmic.h>
>  #include <asm/intel_pmc_ipc.h>
>  
>  /* PMIC device registers */
> diff --git a/include/linux/mfd/intel_bxtwc.h b/include/linux/mfd/intel_bxtwc.h
> index 1a0ee9d6efe9..240d6752ec64 100644
> --- a/include/linux/mfd/intel_bxtwc.h
> +++ b/include/linux/mfd/intel_bxtwc.h
> @@ -13,8 +13,6 @@
>   * more details.
>   */
>  
> -#include <linux/mfd/intel_soc_pmic.h>
> -
>  #ifndef __INTEL_BXTWC_H__
>  #define __INTEL_BXTWC_H__
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [prev] | [next] | [standalone]


#1603818

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-03-18 18:10 +0100
Message-ID<tmq1z-12n-7@gated-at.bofh.it>
In reply to#1603415
On Fri, Mar 17, 2017 at 4:37 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> 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@rjwysocki.net> (supporter:ACPI)
> Cc: Linus Walleij <linus.walleij@linaro.org> (maintainer:GPIO SUBSYSTEM)
> Cc: Zhang Rui <rui.zhang@intel.com> (supporter:THERMAL)
> Cc: Eduardo Valentin <edubezval@gmail.com> (supporter:THERMAL)
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

[toc] | [prev] | [next] | [standalone]


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

FromLee Jones <lee.jones@linaro.org>
Date2017-03-23 13:20 +0100
SubjectRe: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation units
Message-ID<to9SG-25x-29@gated-at.bofh.it>
In reply to#1603415
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@rjwysocki.net> (supporter:ACPI)
> Cc: Linus Walleij <linus.walleij@linaro.org> (maintainer:GPIO SUBSYSTEM)
> Cc: Zhang Rui <rui.zhang@intel.com> (supporter:THERMAL)
> Cc: Eduardo Valentin <edubezval@gmail.com> (supporter:THERMAL)
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> - make option visible
> - fix dependencies
>  drivers/acpi/Kconfig         |  2 +-

This needs an ACPI Ack before I can do anything with it.

>  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.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [prev] | [next] | [standalone]


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

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-03-26 14:50 +0200
SubjectRe: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation units
Message-ID<tpfMl-8qf-3@gated-at.bofh.it>
In reply to#1607431
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@rjwysocki.net> (supporter:ACPI)
> > Cc: Linus Walleij <linus.walleij@linaro.org> (maintainer:GPIO
> > SUBSYSTEM)
> > Cc: Zhang Rui <rui.zhang@intel.com> (supporter:THERMAL)
> > Cc: Eduardo Valentin <edubezval@gmail.com> (supporter:THERMAL)
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > - 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@linux.intel.com>
Intel Finland Oy

[toc] | [prev] | [next] | [standalone]


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

FromZhang Rui <rui.zhang@intel.com>
Date2017-03-27 04:20 +0200
SubjectRe: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation units
Message-ID<tpsqd-OG-3@gated-at.bofh.it>
In reply to#1609325
On Sun, 2017-03-26 at 15:37 +0300, Andy Shevchenko wrote:
> 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@rjwysocki.net> (supporter:ACPI)
> > > Cc: Linus Walleij <linus.walleij@linaro.org> (maintainer:GPIO
> > > SUBSYSTEM)
> > > Cc: Zhang Rui <rui.zhang@intel.com> (supporter:THERMAL)
> > > Cc: Eduardo Valentin <edubezval@gmail.com> (supporter:THERMAL)
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com
> > > >
> > > ---
> > > - 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 +-

For the thermal part,
Acked-by: Zhang Rui <rui.zhang@intel.com>

thanks,
rui
> > >  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.
> > 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web