Skip to contentSkip to conversation

mfd: reorganize Intel drivers

PATCH In review Andy Shevchenko 3 participants 14 messages Dec 11, 2014 – Jan 20, 2015

Subsystems (12)
lore
Share & tools
lore
#0 lore raw

cover mfd: reorganize Intel drivers

This patchset creates a new folder under drivers/mfd and moves there Intel related drivers.

There is no functional change. The names of the kernel configuration variables are kept the same.

Andy Shevchenko (4):
mfd: change a layout for the Intel related drivers
mfd: intel/lpc/sch: move driver to dedicated folder
mfd: intel/lpc/ich: move driver to dedicated folder
mfd: intel/pmic: move driver to dedicated folder

 .../platform/intel-mid/device_libs/platform_msic.c |  2 +-
 .../intel-mid/device_libs/platform_msic_audio.c    |  2 +-
 .../intel-mid/device_libs/platform_msic_battery.c  |  2 +-
 .../intel-mid/device_libs/platform_msic_gpio.c     |  2 +-
 .../intel-mid/device_libs/platform_msic_ocd.c      |  2 +-
 .../device_libs/platform_msic_power_btn.c          |  2 +-
 .../intel-mid/device_libs/platform_msic_thermal.c  |  2 +-
 drivers/acpi/pmic/intel_pmic_crc.c                 |  2 +-
 drivers/gpio/gpio-crystalcove.c                    |  2 +-
 drivers/gpio/gpio-ich.c                            |  2 +-
 drivers/gpio/gpio-msic.c                           |  2 +-
 drivers/mfd/Kconfig                                | 42 ++--------------------
 drivers/mfd/Makefile                               |  6 +---
 drivers/mfd/intel/Kconfig                          | 19 ++++++++++
 drivers/mfd/intel/Makefile                         |  9 +++++
 drivers/mfd/intel/lpc/Kconfig                      | 17 +++++++++
 drivers/mfd/intel/lpc/Makefile                     |  2 ++
 drivers/mfd/{lpc_ich.c => intel/lpc/ich.c}         | 10 ++----
 drivers/mfd/{lpc_sch.c => intel/lpc/sch.c}         |  2 +-
 drivers/mfd/intel/mid/Kconfig                      |  8 +++++
 drivers/mfd/intel/mid/Makefile                     |  1 +
 drivers/mfd/{intel_msic.c => intel/mid/msic.c}     |  2 +-
 .../{intel_soc_pmic_core.c => intel/pmic_core.c}   |  7 ++--
 .../{intel_soc_pmic_core.h => intel/pmic_core.h}   |  2 +-
 .../mfd/{intel_soc_pmic_crc.c => intel/pmic_crc.c} |  7 ++--
 drivers/platform/x86/intel_mid_powerbtn.c          |  2 +-
 drivers/platform/x86/intel_mid_thermal.c           |  2 +-
 drivers/watchdog/iTCO_wdt.c                        |  2 +-
 include/linux/mfd/{lpc_ich.h => intel/ich.h}       |  6 +---
 include/linux/mfd/{intel_msic.h => intel/msic.h}   |  2 +-
 .../linux/mfd/{intel_soc_pmic.h => intel/pmic.h}   |  0
 31 files changed, 90 insertions(+), 80 deletions(-)
 create mode 100644 drivers/mfd/intel/Kconfig
 create mode 100644 drivers/mfd/intel/Makefile
 create mode 100644 drivers/mfd/intel/lpc/Kconfig
 create mode 100644 drivers/mfd/intel/lpc/Makefile
 rename drivers/mfd/{lpc_ich.c => intel/lpc/ich.c} (98%)
 rename drivers/mfd/{lpc_sch.c => intel/lpc/sch.c} (99%)
 create mode 100644 drivers/mfd/intel/mid/Kconfig
 create mode 100644 drivers/mfd/intel/mid/Makefile
 rename drivers/mfd/{intel_msic.c => intel/mid/msic.c} (99%)
 rename drivers/mfd/{intel_soc_pmic_core.c => intel/pmic_core.c} (97%)
 rename drivers/mfd/{intel_soc_pmic_core.h => intel/pmic_core.h} (94%)
 rename drivers/mfd/{intel_soc_pmic_crc.c => intel/pmic_crc.c} (96%)
 rename include/linux/mfd/{lpc_ich.h => intel/ich.h} (81%)
 rename include/linux/mfd/{intel_msic.h => intel/msic.h} (99%)
 rename include/linux/mfd/{intel_soc_pmic.h => intel/pmic.h} (100%)
Signature · 1 line
2.1.3
#1 lore raw

PATCH 1/4 mfd: change a layout for the Intel related drivers

Instead of keeping everything in one folder with long prefixes let us to reoder files in the tree by moving them in the dedicated folder. Currently we have drivers for Intel MID platforms, LPC, and few more are coming.

This patch creates a new layout and moves intel_msic driver to it.

---
 arch/x86/platform/intel-mid/device_libs/platform_msic.c      |  2 +-
 .../x86/platform/intel-mid/device_libs/platform_msic_audio.c |  2 +-
 .../platform/intel-mid/device_libs/platform_msic_battery.c   |  2 +-
 arch/x86/platform/intel-mid/device_libs/platform_msic_gpio.c |  2 +-
 arch/x86/platform/intel-mid/device_libs/platform_msic_ocd.c  |  2 +-
 .../platform/intel-mid/device_libs/platform_msic_power_btn.c |  2 +-
 .../platform/intel-mid/device_libs/platform_msic_thermal.c   |  2 +-
 drivers/gpio/gpio-msic.c                                     |  2 +-
 drivers/mfd/Kconfig                                          | 12 +++---------
 drivers/mfd/Makefile                                         |  3 ++-
 drivers/mfd/intel/Kconfig                                    |  5 +++++
 drivers/mfd/intel/Makefile                                   |  5 +++++
 drivers/mfd/intel/mid/Kconfig                                |  8 ++++++++
 drivers/mfd/intel/mid/Makefile                               |  1 +
 drivers/mfd/{intel_msic.c => intel/mid/msic.c}               |  2 +-
 drivers/platform/x86/intel_mid_powerbtn.c                    |  2 +-
 drivers/platform/x86/intel_mid_thermal.c                     |  2 +-
 include/linux/mfd/{intel_msic.h => intel/msic.h}             |  2 +-
 18 files changed, 36 insertions(+), 22 deletions(-)
 create mode 100644 drivers/mfd/intel/Kconfig
 create mode 100644 drivers/mfd/intel/Makefile
 create mode 100644 drivers/mfd/intel/mid/Kconfig
 create mode 100644 drivers/mfd/intel/mid/Makefile
 rename drivers/mfd/{intel_msic.c => intel/mid/msic.c} (99%)
 rename include/linux/mfd/{intel_msic.h => intel/msic.h} (99%)
arch/x86/platform/intel-mid/device_libs/platform_msic.c +1 -1
index 9f4a775..21ec3ee 100644
@@ -15,7 +15,7 @@
 #include <linux/scatterlist.h>
 #include <linux/init.h>
 #include <linux/sfi.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 #include <asm/intel_scu_ipc.h>
 #include <asm/intel-mid.h>
 #include "platform_msic.h"
arch/x86/platform/intel-mid/device_libs/platform_msic_audio.c +1 -1
index 2962939..45e1c493 100644
@@ -16,7 +16,7 @@
 #include <linux/init.h>
 #include <linux/sfi.h>
 #include <linux/platform_device.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
arch/x86/platform/intel-mid/device_libs/platform_msic_battery.c +1 -1
index f446c33..8a6ce11 100644
@@ -15,7 +15,7 @@
 #include <linux/scatterlist.h>
 #include <linux/init.h>
 #include <linux/sfi.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
arch/x86/platform/intel-mid/device_libs/platform_msic_gpio.c +1 -1
index 2a4f7b1..1c0e957 100644
@@ -16,7 +16,7 @@
 #include <linux/sfi.h>
 #include <linux/init.h>
 #include <linux/gpio.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
arch/x86/platform/intel-mid/device_libs/platform_msic_ocd.c +1 -1
index 6497111..52bb772 100644
@@ -16,7 +16,7 @@
 #include <linux/sfi.h>
 #include <linux/init.h>
 #include <linux/gpio.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
arch/x86/platform/intel-mid/device_libs/platform_msic_power_btn.c +1 -1
index 83a3459..d3633709 100644
@@ -14,7 +14,7 @@
 #include <linux/scatterlist.h>
 #include <linux/sfi.h>
 #include <linux/init.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
arch/x86/platform/intel-mid/device_libs/platform_msic_thermal.c +1 -1
index a351878..3c7c7b2 100644
@@ -15,7 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
drivers/gpio/gpio-msic.c +1 -1
index 01acf0a..bfcae0f 100644
@@ -27,7 +27,7 @@
 #include <linux/init.h>
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 
 /* the offset for the mapping of global gpio pin to irq */
 #define MSIC_GPIO_IRQ_OFFSET	0x100
drivers/mfd/Kconfig +3 -9
index 2e6b731..729e9cd 100644
@@ -301,15 +301,6 @@ config INTEL_SOC_PMIC
 	  thermal, charger and related power management functions
 	  on these systems.
 
-config MFD_INTEL_MSIC
-	bool "Intel MSIC"
-	depends on INTEL_SCU_IPC
-	select MFD_CORE
-	help
-	  Select this option to enable access to Intel MSIC (Avatele
-	  Passage) chip. This chip embeds audio, battery, GPIO, etc.
-	  devices used in Intel Medfield platforms.
-
 config MFD_IPAQ_MICRO
 	bool "Atmel Micro ASIC (iPAQ h3100/h3600/h3700) Support"
 	depends on SA1100_H3100 || SA1100_H3600
@@ -1376,4 +1367,7 @@ config MFD_VEXPRESS_SYSREG
 	  on the ARM Ltd. Versatile Express board.
 
 endmenu
+
+source "drivers/mfd/intel/Kconfig"
+
 endif
drivers/mfd/Makefile +2 -1
index 53467e2..11e1945e 100644
@@ -158,7 +158,6 @@ obj-$(CONFIG_TPS65911_COMPARATOR)	+= tps65911-comparator.o
 obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
 obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
 obj-$(CONFIG_MFD_ATMEL_HLCDC)	+= atmel-hlcdc.o
-obj-$(CONFIG_MFD_INTEL_MSIC)	+= intel_msic.o
 obj-$(CONFIG_MFD_PALMAS)	+= palmas.o
 obj-$(CONFIG_MFD_VIPERBOARD)    += viperboard.o
 obj-$(CONFIG_MFD_RC5T583)	+= rc5t583.o rc5t583-irq.o
@@ -177,5 +176,7 @@ obj-$(CONFIG_MFD_MENF21BMC)	+= menf21bmc.o
 obj-$(CONFIG_MFD_HI6421_PMIC)	+= hi6421-pmic-core.o
 obj-$(CONFIG_MFD_DLN2)		+= dln2.o
 
+obj-y				+= intel/
+
 intel-soc-pmic-objs		:= intel_soc_pmic_core.o intel_soc_pmic_crc.o
 obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o
drivers/mfd/intel/Kconfig new file +5 -0
new file mode 100644
index 0000000..9e376b0
@@ -0,0 +1,5 @@
+#
+# Multifunction devices found on Intel platforms
+#
+
+source "drivers/mfd/intel/mid/Kconfig"
drivers/mfd/intel/Makefile new file +5 -0
new file mode 100644
index 0000000..8d6b43b
@@ -0,0 +1,5 @@
+#
+# Makefile for multifunction devices found on Intel platforms
+#
+
+obj-y	+= mid/
drivers/mfd/intel/mid/Kconfig new file +8 -0
new file mode 100644
index 0000000..a212f62
@@ -0,0 +1,8 @@
+config MFD_INTEL_MSIC
+	bool "Intel MSIC"
+	depends on INTEL_SCU_IPC
+	select MFD_CORE
+	help
+	  Select this option to enable access to Intel MSIC (Avatele
+	  Passage) chip. This chip embeds audio, battery, GPIO, etc.
+	  devices used in Intel Medfield platforms.
drivers/mfd/intel/mid/Makefile new file +1 -0
new file mode 100644
index 0000000..e36bfa3
@@ -0,0 +1 @@
+obj-$(CONFIG_MFD_INTEL_MSIC)	+= msic.o
drivers/mfd/intel/mid/msic.c renamed from drivers/mfd/intel_msic.c +1 -1
similarity index 99%
rename from drivers/mfd/intel_msic.c
rename to drivers/mfd/intel/mid/msic.c
index 25d486c..7ef98b4 100644
@@ -14,7 +14,7 @@
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/mfd/core.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
drivers/platform/x86/intel_mid_powerbtn.c +1 -1
index 22606d6..b701f88 100644
@@ -23,7 +23,7 @@
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 
 #define DRIVER_NAME "msic_power_btn"
 
drivers/platform/x86/intel_mid_thermal.c +1 -1
index 0944e83..d9dc468 100644
@@ -33,7 +33,7 @@
 #include <linux/slab.h>
 #include <linux/pm.h>
 #include <linux/thermal.h>
-#include <linux/mfd/intel_msic.h>
+#include <linux/mfd/intel/msic.h>
 
 /* Number of thermal sensors */
 #define MSIC_THERMAL_SENSORS	4
include/linux/mfd/intel/msic.h renamed from include/linux/mfd/intel_msic.h +1 -1
similarity index 99%
rename from include/linux/mfd/intel_msic.h
rename to include/linux/mfd/intel/msic.h
index 439a7a6..04c1925 100644
@@ -1,5 +1,5 @@
 /*
- * include/linux/mfd/intel_msic.h - Core interface for Intel MSIC
+ * include/linux/mfd/intel/msic.h - Core interface for Intel MSIC
  *
  * Copyright (C) 2011, Intel Corporation
  * Author: Mika Westerberg <[email protected]>
Signature · 1 line
2.1.3
#2 lore raw

Re: [PATCH v1 1/4] mfd: change a layout for the Intel related drivers

Quoted 6 lines · Andy Shevchenko

Instead of keeping everything in one folder with long prefixes let us to reoder files in the tree by moving them in the dedicated folder. Currently we have drivers for Intel MID platforms, LPC, and few more are coming.

This patch creates a new layout and moves intel_msic driver to it.

[]

drivers/mfd/Kconfig config MFD_VEXPRESS_SYSREG · line 1373

Quoted 8 lines
drivers/mfd/Kconfig +3 -0
@@ -1376,4 +1367,7 @@ config MFD_VEXPRESS_SYSREG
 	  on the ARM Ltd. Versatile Express board.
 
 endmenu
+
+source "drivers/mfd/intel/Kconfig"
+
 endif

Mika reported that this change should go inside the menu-endmenu block.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#3 lore raw

PATCH 2/4 mfd: intel/lpc/sch: move driver to dedicated folder

In reply to Andy Shevchenko

Move the lpc_sch.c module to the dedicated folder.

There is no functional change.

---
 drivers/mfd/Kconfig                        | 8 --------
 drivers/mfd/Makefile                       | 1 -
 drivers/mfd/intel/Kconfig                  | 2 ++
 drivers/mfd/intel/Makefile                 | 1 +
 drivers/mfd/intel/lpc/Kconfig              | 7 +++++++
 drivers/mfd/intel/lpc/Makefile             | 1 +
 drivers/mfd/{lpc_sch.c => intel/lpc/sch.c} | 2 +-
 7 files changed, 12 insertions(+), 10 deletions(-)
 create mode 100644 drivers/mfd/intel/lpc/Kconfig
 create mode 100644 drivers/mfd/intel/lpc/Makefile
 rename drivers/mfd/{lpc_sch.c => intel/lpc/sch.c} (99%)
drivers/mfd/Kconfig +0 -8
index 729e9cd..e78450f 100644
@@ -281,14 +281,6 @@ config LPC_ICH
 	  other drivers to control these functions, currently GPIO and
 	  watchdog.
 
-config LPC_SCH
-	tristate "Intel SCH LPC"
-	depends on PCI
-	select MFD_CORE
-	help
-	  LPC bridge function of the Intel SCH provides support for
-	  System Management Bus and General Purpose I/O.
-
 config INTEL_SOC_PMIC
 	bool "Support for Intel Atom SoC PMIC"
 	depends on I2C=y
drivers/mfd/Makefile +0 -1
index 11e1945e..fa2fa72 100644
@@ -138,7 +138,6 @@ obj-$(CONFIG_AB8500_CORE)	+= ab8500-core.o ab8500-sysctrl.o
 obj-$(CONFIG_MFD_TIMBERDALE)    += timberdale.o
 obj-$(CONFIG_PMIC_ADP5520)	+= adp5520.o
 obj-$(CONFIG_MFD_KEMPLD)	+= kempld-core.o
-obj-$(CONFIG_LPC_SCH)		+= lpc_sch.o
 obj-$(CONFIG_LPC_ICH)		+= lpc_ich.o
 obj-$(CONFIG_MFD_RDC321X)	+= rdc321x-southbridge.o
 obj-$(CONFIG_MFD_JANZ_CMODIO)	+= janz-cmodio.o
drivers/mfd/intel/Kconfig +2 -0
index 9e376b0..5d2341f 100644
@@ -3,3 +3,5 @@
 #
 
 source "drivers/mfd/intel/mid/Kconfig"
+
+source "drivers/mfd/intel/lpc/Kconfig"
drivers/mfd/intel/Makefile +1 -0
index 8d6b43b..8264a26 100644
@@ -3,3 +3,4 @@
 #
 
 obj-y	+= mid/
+obj-y	+= lpc/
drivers/mfd/intel/lpc/Kconfig new file +7 -0
new file mode 100644
index 0000000..f131f96
@@ -0,0 +1,7 @@
+config LPC_SCH
+	tristate "Intel SCH LPC"
+	depends on PCI
+	select MFD_CORE
+	help
+	  LPC bridge function of the Intel SCH provides support for
+	  System Management Bus and General Purpose I/O.
drivers/mfd/intel/lpc/Makefile new file +1 -0
new file mode 100644
index 0000000..7503137
@@ -0,0 +1 @@
+obj-$(CONFIG_LPC_SCH)		+= sch.o
drivers/mfd/intel/lpc/sch.c renamed from drivers/mfd/lpc_sch.c +1 -1
similarity index 99%
rename from drivers/mfd/lpc_sch.c
rename to drivers/mfd/intel/lpc/sch.c
index 5c38df3..1829959 100644
@@ -1,5 +1,5 @@
 /*
- *  lpc_sch.c - LPC interface for Intel Poulsbo SCH
+ *  sch.c - LPC interface for Intel Poulsbo SCH
  *
  *  LPC bridge function of the Intel SCH contains many other
  *  functional units, such as Interrupt controllers, Timers,
Signature · 1 line
2.1.3
#4 lore raw

PATCH 3/4 mfd: intel/lpc/ich: move driver to dedicated folder

In reply to Andy Shevchenko

Move the lpc_ich.c module to the dedicated folder. While here, remove the FSF address since it's subject to change from time to time.

There is no functional change.

---
 drivers/gpio/gpio-ich.c                      |  2 +-
 drivers/mfd/Kconfig                          | 10 ----------
 drivers/mfd/Makefile                         |  1 -
 drivers/mfd/intel/lpc/Kconfig                | 10 ++++++++++
 drivers/mfd/intel/lpc/Makefile               |  1 +
 drivers/mfd/{lpc_ich.c => intel/lpc/ich.c}   | 10 +++-------
 drivers/watchdog/iTCO_wdt.c                  |  2 +-
 include/linux/mfd/{lpc_ich.h => intel/ich.h} |  6 +-----
 8 files changed, 17 insertions(+), 25 deletions(-)
 rename drivers/mfd/{lpc_ich.c => intel/lpc/ich.c} (98%)
 rename include/linux/mfd/{lpc_ich.h => intel/ich.h} (81%)
drivers/gpio/gpio-ich.c +1 -1
index 7818cd1..0e8532e 100644
@@ -24,7 +24,7 @@
 #include <linux/pci.h>
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
-#include <linux/mfd/lpc_ich.h>
+#include <linux/mfd/intel/ich.h>
 
 #define DRV_NAME "gpio_ich"
 
drivers/mfd/Kconfig +0 -10
index e78450f..c8dd9bf 100644
@@ -271,16 +271,6 @@ config HTC_I2CPLD
 	  This device provides input and output GPIOs through an I2C
 	  interface to one or more sub-chips.
 
-config LPC_ICH
-	tristate "Intel ICH LPC"
-	depends on PCI
-	select MFD_CORE
-	help
-	  The LPC bridge function of the Intel ICH provides support for
-	  many functional units. This driver provides needed support for
-	  other drivers to control these functions, currently GPIO and
-	  watchdog.
-
 config INTEL_SOC_PMIC
 	bool "Support for Intel Atom SoC PMIC"
 	depends on I2C=y
drivers/mfd/Makefile +0 -1
index fa2fa72..63f43ec 100644
@@ -138,7 +138,6 @@ obj-$(CONFIG_AB8500_CORE)	+= ab8500-core.o ab8500-sysctrl.o
 obj-$(CONFIG_MFD_TIMBERDALE)    += timberdale.o
 obj-$(CONFIG_PMIC_ADP5520)	+= adp5520.o
 obj-$(CONFIG_MFD_KEMPLD)	+= kempld-core.o
-obj-$(CONFIG_LPC_ICH)		+= lpc_ich.o
 obj-$(CONFIG_MFD_RDC321X)	+= rdc321x-southbridge.o
 obj-$(CONFIG_MFD_JANZ_CMODIO)	+= janz-cmodio.o
 obj-$(CONFIG_MFD_JZ4740_ADC)	+= jz4740-adc.o
drivers/mfd/intel/lpc/Kconfig +10 -0
index f131f96..0949f4a 100644
@@ -5,3 +5,13 @@ config LPC_SCH
 	help
 	  LPC bridge function of the Intel SCH provides support for
 	  System Management Bus and General Purpose I/O.
+
+config LPC_ICH
+	tristate "Intel ICH LPC"
+	depends on PCI
+	select MFD_CORE
+	help
+	  The LPC bridge function of the Intel ICH provides support for
+	  many functional units. This driver provides needed support for
+	  other drivers to control these functions, currently GPIO and
+	  watchdog.
drivers/mfd/intel/lpc/Makefile +1 -0
index 7503137..710cd7d 100644
@@ -1 +1,2 @@
 obj-$(CONFIG_LPC_SCH)		+= sch.o
+obj-$(CONFIG_LPC_ICH)		+= ich.o
drivers/mfd/intel/lpc/ich.c renamed from drivers/mfd/lpc_ich.c +3 -7
similarity index 98%
rename from drivers/mfd/lpc_ich.c
rename to drivers/mfd/intel/lpc/ich.c
index f35d428..2b47dbc 100644
@@ -1,12 +1,12 @@
 /*
- *  lpc_ich.c - LPC interface for Intel ICH
+ *  ich.c - LPC interface for Intel ICH
  *
  *  LPC bridge function of the Intel ICH contains many other
  *  functional units, such as Interrupt controllers, Timers,
  *  Power Management, System Management, GPIO, RTC, and LPC
  *  Configuration Registers.
  *
- *  This driver is derived from lpc_sch.
+ *  This driver is derived from sch.
 
  *  Copyright (c) 2011 Extreme Engineering Solution, Inc.
  *  Author: Aaron Sierra <[email protected]>
@@ -20,10 +20,6 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; see the file COPYING.  If not, write to
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- *
  *  This driver supports the following I/O Controller hubs:
  *	(See the intel documentation on http://developer.intel.com.)
  *	document number 290655-003, 290677-014: 82801AA (ICH), 82801AB (ICHO)
@@ -65,7 +61,7 @@
 #include <linux/acpi.h>
 #include <linux/pci.h>
 #include <linux/mfd/core.h>
-#include <linux/mfd/lpc_ich.h>
+#include <linux/mfd/intel/ich.h>
 
 #define ACPIBASE		0x40
 #define ACPIBASE_GPE_OFF	0x28
drivers/watchdog/iTCO_wdt.c +1 -1
index 05ee0bf..250843b 100644
@@ -66,7 +66,7 @@
 #include <linux/uaccess.h>		/* For copy_to_user/put_user/... */
 #include <linux/io.h>			/* For inb/outb/... */
 #include <linux/mfd/core.h>
-#include <linux/mfd/lpc_ich.h>
+#include <linux/mfd/intel/ich.h>
 
 #include "iTCO_vendor.h"
 
include/linux/mfd/intel/ich.h renamed from include/linux/mfd/lpc_ich.h +1 -5
similarity index 81%
rename from include/linux/mfd/lpc_ich.h
rename to include/linux/mfd/intel/ich.h
index 8feac78..0d09695 100644
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/mfd/lpc_ich.h
+ *  linux/drivers/mfd/intel/ich.h
  *
  *  Copyright (c) 2012 Extreme Engineering Solution, Inc.
  *  Author: Aaron Sierra <[email protected]>
@@ -12,10 +12,6 @@
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; see the file COPYING.  If not, write to
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 #ifndef LPC_ICH_H
 #define LPC_ICH_H
Signature · 1 line
2.1.3
#5 lore raw

PATCH 4/4 mfd: intel/pmic: move driver to dedicated folder

In reply to Andy Shevchenko

Move the intel_soc_pmic_*.c files to the dedicated folder and rename.

There is no functional change.

---
 drivers/acpi/pmic/intel_pmic_crc.c                       |  2 +-
 drivers/gpio/gpio-crystalcove.c                          |  2 +-
 drivers/mfd/Kconfig                                      | 12 ------------
 drivers/mfd/Makefile                                     |  3 ---
 drivers/mfd/intel/Kconfig                                | 12 ++++++++++++
 drivers/mfd/intel/Makefile                               |  3 +++
 drivers/mfd/{intel_soc_pmic_core.c => intel/pmic_core.c} |  7 ++++---
 drivers/mfd/{intel_soc_pmic_core.h => intel/pmic_core.h} |  2 +-
 drivers/mfd/{intel_soc_pmic_crc.c => intel/pmic_crc.c}   |  7 ++++---
 include/linux/mfd/{intel_soc_pmic.h => intel/pmic.h}     |  0
 10 files changed, 26 insertions(+), 24 deletions(-)
 rename drivers/mfd/{intel_soc_pmic_core.c => intel/pmic_core.c} (97%)
 rename drivers/mfd/{intel_soc_pmic_core.h => intel/pmic_core.h} (94%)
 rename drivers/mfd/{intel_soc_pmic_crc.c => intel/pmic_crc.c} (96%)
 rename include/linux/mfd/{intel_soc_pmic.h => intel/pmic.h} (100%)
drivers/acpi/pmic/intel_pmic_crc.c +1 -1
index ef7d8ff..f146fc2 100644
@@ -15,7 +15,7 @@
 
 #include <linux/module.h>
 #include <linux/acpi.h>
-#include <linux/mfd/intel_soc_pmic.h>
+#include <linux/mfd/intel/pmic.h>
 #include <linux/regmap.h>
 #include <linux/platform_device.h>
 #include "intel_pmic.h"
drivers/gpio/gpio-crystalcove.c +1 -1
index 55d4803..6ecddb4 100644
@@ -21,7 +21,7 @@
 #include <linux/seq_file.h>
 #include <linux/bitops.h>
 #include <linux/regmap.h>
-#include <linux/mfd/intel_soc_pmic.h>
+#include <linux/mfd/intel/pmic.h>
 
 #define CRYSTALCOVE_GPIO_NUM	16
 #define CRYSTALCOVE_VGPIO_NUM	94
drivers/mfd/Kconfig +0 -12
index c8dd9bf..0d9d508 100644
@@ -271,18 +271,6 @@ config HTC_I2CPLD
 	  This device provides input and output GPIOs through an I2C
 	  interface to one or more sub-chips.
 
-config INTEL_SOC_PMIC
-	bool "Support for Intel Atom SoC PMIC"
-	depends on I2C=y
-	select MFD_CORE
-	select REGMAP_I2C
-	select REGMAP_IRQ
-	help
-	  Select this option to enable support for the PMIC device
-	  on some Intel SoC systems. The PMIC provides ADC, GPIO,
-	  thermal, charger and related power management functions
-	  on these systems.
-
 config MFD_IPAQ_MICRO
 	bool "Atmel Micro ASIC (iPAQ h3100/h3600/h3700) Support"
 	depends on SA1100_H3100 || SA1100_H3600
drivers/mfd/Makefile +0 -3
index 63f43ec..0979a73 100644
@@ -175,6 +175,3 @@ obj-$(CONFIG_MFD_HI6421_PMIC)	+= hi6421-pmic-core.o
 obj-$(CONFIG_MFD_DLN2)		+= dln2.o
 
 obj-y				+= intel/
-
-intel-soc-pmic-objs		:= intel_soc_pmic_core.o intel_soc_pmic_crc.o
-obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o
drivers/mfd/intel/Kconfig +12 -0
index 5d2341f..5e86f3a 100644
@@ -5,3 +5,15 @@
 source "drivers/mfd/intel/mid/Kconfig"
 
 source "drivers/mfd/intel/lpc/Kconfig"
+
+config INTEL_SOC_PMIC
+	bool "Support for Intel Atom SoC PMIC"
+	depends on I2C=y
+	select MFD_CORE
+	select REGMAP_I2C
+	select REGMAP_IRQ
+	help
+	  Select this option to enable support for the PMIC device
+	  on some Intel SoC systems. The PMIC provides ADC, GPIO,
+	  thermal, charger and related power management functions
+	  on these systems.
drivers/mfd/intel/Makefile +3 -0
index 8264a26..a9ab8f1 100644
@@ -4,3 +4,6 @@
 
 obj-y	+= mid/
 obj-y	+= lpc/
+
+intel-soc-pmic-objs		:= pmic_core.o pmic_crc.o
+obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o
drivers/mfd/intel/pmic_core.c renamed from drivers/mfd/intel_soc_pmic_core.c +4 -3
similarity index 97%
rename from drivers/mfd/intel_soc_pmic_core.c
rename to drivers/mfd/intel/pmic_core.c
index df7b064..c6e4f2b 100644
@@ -1,5 +1,5 @@
 /*
- * intel_soc_pmic_core.c - Intel SoC PMIC MFD Driver
+ * pmic_core.c - Intel SoC PMIC MFD Driver
  *
  * Copyright (C) 2013, 2014 Intel Corporation. All rights reserved.
  *
@@ -23,8 +23,9 @@
 #include <linux/gpio/consumer.h>
 #include <linux/acpi.h>
 #include <linux/regmap.h>
-#include <linux/mfd/intel_soc_pmic.h>
-#include "intel_soc_pmic_core.h"
+#include <linux/mfd/intel/pmic.h>
+
+#include "pmic_core.h"
 
 /*
  * On some boards the PMIC interrupt may come from a GPIO line.
drivers/mfd/intel/pmic_core.h renamed from drivers/mfd/intel_soc_pmic_core.h +1 -1
similarity index 94%
rename from drivers/mfd/intel_soc_pmic_core.h
rename to drivers/mfd/intel/pmic_core.h
index 33aacd9..f6535b0 100644
@@ -1,5 +1,5 @@
 /*
- * intel_soc_pmic_core.h - Intel SoC PMIC MFD Driver
+ * pmic_core.h - Intel SoC PMIC MFD Driver
  *
  * Copyright (C) 2012-2014 Intel Corporation. All rights reserved.
  *
drivers/mfd/intel/pmic_crc.c renamed from drivers/mfd/intel_soc_pmic_crc.c +4 -3
similarity index 96%
rename from drivers/mfd/intel_soc_pmic_crc.c
rename to drivers/mfd/intel/pmic_crc.c
index c85e2ec..888216c 100644
@@ -1,5 +1,5 @@
 /*
- * intel_soc_pmic_crc.c - Device access for Crystal Cove PMIC
+ * pmic_crc.c - Device access for Crystal Cove PMIC
  *
  * Copyright (C) 2013, 2014 Intel Corporation. All rights reserved.
  *
@@ -19,8 +19,9 @@
 #include <linux/mfd/core.h>
 #include <linux/interrupt.h>
 #include <linux/regmap.h>
-#include <linux/mfd/intel_soc_pmic.h>
-#include "intel_soc_pmic_core.h"
+#include <linux/mfd/intel/pmic.h>
+
+#include "pmic_core.h"
 
 #define CRYSTAL_COVE_MAX_REGISTER	0xC6
 
include/linux/mfd/intel/pmic.h renamed from include/linux/mfd/intel_soc_pmic.h +0 -0
similarity index 100%
rename from include/linux/mfd/intel_soc_pmic.h
rename to include/linux/mfd/intel/pmic.h
Signature · 1 line
2.1.3
#7 lore raw
Quoted 5 lines · Joe Perches
Quoted 2 lines · Andy Shevchenko

This patchset creates a new folder under drivers/mfd and moves there Intel related drivers.

Missing update of MAINTAINERS?

Oh, right. I could send a follow up patch or update each patch in the series. What is the best approach here?

Will wait for more comments, especially from Lee.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#8 lore raw
Quoted 9 lines · Andy Shevchenko
Quoted 5 lines · Joe Perches
Quoted 2 lines · Andy Shevchenko

This patchset creates a new folder under drivers/mfd and moves there Intel related drivers.

Missing update of MAINTAINERS?

Oh, right. I could send a follow up patch or update each patch in the series. What is the best approach here?

I think it'd be fine to send another patch later on if/after this is applied.

#9 lore raw
In reply to Andy Shevchenko
Quoted 5 lines · Andy Shevchenko

This patchset creates a new folder under drivers/mfd and moves there Intel related drivers.

There is no functional change. The names of the kernel configuration variables are kept the same.

Lee, gentle ping for this series. What do you think besides the necessity of updating MAINTAINERS file?

Quoted 55 lines

Andy Shevchenko (4):
mfd: change a layout for the Intel related drivers
mfd: intel/lpc/sch: move driver to dedicated folder
mfd: intel/lpc/ich: move driver to dedicated folder
mfd: intel/pmic: move driver to dedicated folder

 .../platform/intel-mid/device_libs/platform_msic.c |  2 +-
 .../intel-mid/device_libs/platform_msic_audio.c    |  2 +-
 .../intel-mid/device_libs/platform_msic_battery.c  |  2 +-
 .../intel-mid/device_libs/platform_msic_gpio.c     |  2 +-
 .../intel-mid/device_libs/platform_msic_ocd.c      |  2 +-
 .../device_libs/platform_msic_power_btn.c          |  2 +-
 .../intel-mid/device_libs/platform_msic_thermal.c  |  2 +-
 drivers/acpi/pmic/intel_pmic_crc.c                 |  2 +-
 drivers/gpio/gpio-crystalcove.c                    |  2 +-
 drivers/gpio/gpio-ich.c                            |  2 +-
 drivers/gpio/gpio-msic.c                           |  2 +-
 drivers/mfd/Kconfig                                | 42 ++--------------------
 drivers/mfd/Makefile                               |  6 +---
 drivers/mfd/intel/Kconfig                          | 19 ++++++++++
 drivers/mfd/intel/Makefile                         |  9 +++++
 drivers/mfd/intel/lpc/Kconfig                      | 17 +++++++++
 drivers/mfd/intel/lpc/Makefile                     |  2 ++
 drivers/mfd/{lpc_ich.c => intel/lpc/ich.c}         | 10 ++----
 drivers/mfd/{lpc_sch.c => intel/lpc/sch.c}         |  2 +-
 drivers/mfd/intel/mid/Kconfig                      |  8 +++++
 drivers/mfd/intel/mid/Makefile                     |  1 +
 drivers/mfd/{intel_msic.c => intel/mid/msic.c}     |  2 +-
 .../{intel_soc_pmic_core.c => intel/pmic_core.c}   |  7 ++--
 .../{intel_soc_pmic_core.h => intel/pmic_core.h}   |  2 +-
 .../mfd/{intel_soc_pmic_crc.c => intel/pmic_crc.c} |  7 ++--
 drivers/platform/x86/intel_mid_powerbtn.c          |  2 +-
 drivers/platform/x86/intel_mid_thermal.c           |  2 +-
 drivers/watchdog/iTCO_wdt.c                        |  2 +-
 include/linux/mfd/{lpc_ich.h => intel/ich.h}       |  6 +---
 include/linux/mfd/{intel_msic.h => intel/msic.h}   |  2 +-
 .../linux/mfd/{intel_soc_pmic.h => intel/pmic.h}   |  0
 31 files changed, 90 insertions(+), 80 deletions(-)
 create mode 100644 drivers/mfd/intel/Kconfig
 create mode 100644 drivers/mfd/intel/Makefile
 create mode 100644 drivers/mfd/intel/lpc/Kconfig
 create mode 100644 drivers/mfd/intel/lpc/Makefile
 rename drivers/mfd/{lpc_ich.c => intel/lpc/ich.c} (98%)
 rename drivers/mfd/{lpc_sch.c => intel/lpc/sch.c} (99%)
 create mode 100644 drivers/mfd/intel/mid/Kconfig
 create mode 100644 drivers/mfd/intel/mid/Makefile
 rename drivers/mfd/{intel_msic.c => intel/mid/msic.c} (99%)
 rename drivers/mfd/{intel_soc_pmic_core.c => intel/pmic_core.c} (97%)
 rename drivers/mfd/{intel_soc_pmic_core.h => intel/pmic_core.h} (94%)
 rename drivers/mfd/{intel_soc_pmic_crc.c => intel/pmic_crc.c} (96%)
 rename include/linux/mfd/{lpc_ich.h => intel/ich.h} (81%)
 rename include/linux/mfd/{intel_msic.h => intel/msic.h} (99%)
 rename include/linux/mfd/{intel_soc_pmic.h => intel/pmic.h} (100%)
Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#10 lore raw
In reply to Andy Shevchenko
Quoted 5 lines · Andy Shevchenko

This patchset creates a new folder under drivers/mfd and moves there Intel related drivers.

There is no functional change. The names of the kernel configuration variables are kept the same.

Can you explain to me why you think the Intel drivers need their own sub-directory please?

Quoted 54 lines

Andy Shevchenko (4):
mfd: change a layout for the Intel related drivers
mfd: intel/lpc/sch: move driver to dedicated folder
mfd: intel/lpc/ich: move driver to dedicated folder
mfd: intel/pmic: move driver to dedicated folder

 .../platform/intel-mid/device_libs/platform_msic.c |  2 +-
 .../intel-mid/device_libs/platform_msic_audio.c    |  2 +-
 .../intel-mid/device_libs/platform_msic_battery.c  |  2 +-
 .../intel-mid/device_libs/platform_msic_gpio.c     |  2 +-
 .../intel-mid/device_libs/platform_msic_ocd.c      |  2 +-
 .../device_libs/platform_msic_power_btn.c          |  2 +-
 .../intel-mid/device_libs/platform_msic_thermal.c  |  2 +-
 drivers/acpi/pmic/intel_pmic_crc.c                 |  2 +-
 drivers/gpio/gpio-crystalcove.c                    |  2 +-
 drivers/gpio/gpio-ich.c                            |  2 +-
 drivers/gpio/gpio-msic.c                           |  2 +-
 drivers/mfd/Kconfig                                | 42 ++--------------------
 drivers/mfd/Makefile                               |  6 +---
 drivers/mfd/intel/Kconfig                          | 19 ++++++++++
 drivers/mfd/intel/Makefile                         |  9 +++++
 drivers/mfd/intel/lpc/Kconfig                      | 17 +++++++++
 drivers/mfd/intel/lpc/Makefile                     |  2 ++
 drivers/mfd/{lpc_ich.c => intel/lpc/ich.c}         | 10 ++----
 drivers/mfd/{lpc_sch.c => intel/lpc/sch.c}         |  2 +-
 drivers/mfd/intel/mid/Kconfig                      |  8 +++++
 drivers/mfd/intel/mid/Makefile                     |  1 +
 drivers/mfd/{intel_msic.c => intel/mid/msic.c}     |  2 +-
 .../{intel_soc_pmic_core.c => intel/pmic_core.c}   |  7 ++--
 .../{intel_soc_pmic_core.h => intel/pmic_core.h}   |  2 +-
 .../mfd/{intel_soc_pmic_crc.c => intel/pmic_crc.c} |  7 ++--
 drivers/platform/x86/intel_mid_powerbtn.c          |  2 +-
 drivers/platform/x86/intel_mid_thermal.c           |  2 +-
 drivers/watchdog/iTCO_wdt.c                        |  2 +-
 include/linux/mfd/{lpc_ich.h => intel/ich.h}       |  6 +---
 include/linux/mfd/{intel_msic.h => intel/msic.h}   |  2 +-
 .../linux/mfd/{intel_soc_pmic.h => intel/pmic.h}   |  0
 31 files changed, 90 insertions(+), 80 deletions(-)
 create mode 100644 drivers/mfd/intel/Kconfig
 create mode 100644 drivers/mfd/intel/Makefile
 create mode 100644 drivers/mfd/intel/lpc/Kconfig
 create mode 100644 drivers/mfd/intel/lpc/Makefile
 rename drivers/mfd/{lpc_ich.c => intel/lpc/ich.c} (98%)
 rename drivers/mfd/{lpc_sch.c => intel/lpc/sch.c} (99%)
 create mode 100644 drivers/mfd/intel/mid/Kconfig
 create mode 100644 drivers/mfd/intel/mid/Makefile
 rename drivers/mfd/{intel_msic.c => intel/mid/msic.c} (99%)
 rename drivers/mfd/{intel_soc_pmic_core.c => intel/pmic_core.c} (97%)
 rename drivers/mfd/{intel_soc_pmic_core.h => intel/pmic_core.h} (94%)
 rename drivers/mfd/{intel_soc_pmic_crc.c => intel/pmic_crc.c} (96%)
 rename include/linux/mfd/{lpc_ich.h => intel/ich.h} (81%)
 rename include/linux/mfd/{intel_msic.h => intel/msic.h} (99%)
 rename include/linux/mfd/{intel_soc_pmic.h => intel/pmic.h} (100%)
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#11 lore raw
Quoted 10 lines · Lee Jones
Quoted 5 lines · Andy Shevchenko

This patchset creates a new folder under drivers/mfd and moves there Intel related drivers.

There is no functional change. The names of the kernel configuration variables are kept the same.

Can you explain to me why you think the Intel drivers need their own sub-directory please?

For me it seems logical. We have many drivers related to Intel specific SoCs (in comparison the other mfd drivers that usually named in according to some standard chip codename) and they meanwhile have long awkward prefixes. Moreover they could share common dependencies like X86.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#12 lore raw
Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Lee Jones
Quoted 5 lines · Andy Shevchenko

This patchset creates a new folder under drivers/mfd and moves there Intel related drivers.

There is no functional change. The names of the kernel configuration variables are kept the same.

Quoted 8 lines
Quoted 2 lines

Can you explain to me why you think the Intel drivers need their own sub-directory please?

For me it seems logical. We have many drivers related to Intel specific SoCs (in comparison the other mfd drivers that usually named in according to some standard chip codename) and they meanwhile have long awkward prefixes. Moreover they could share common dependencies like X86.

I'm not comfortable with it and am yet to see the need. What I would suggest is to prefix 'intel-' or similar to the related files. From there we can see how overbearing the files are becoming and make a decision based on that.

If there are too many Intel related files, my first question(s) will be a) why are there so many files b) are so many files required and c) should they really live in MFD.

But as yet, this patch-set is the only indication that something needs to be done at all.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#13 lore raw
Quoted 25 lines · Lee Jones
Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Lee Jones
Quoted 5 lines · Andy Shevchenko

This patchset creates a new folder under drivers/mfd and moves there Intel related drivers.

There is no functional change. The names of the kernel configuration variables are kept the same.

Quoted 8 lines
Quoted 2 lines

Can you explain to me why you think the Intel drivers need their own sub-directory please?

For me it seems logical. We have many drivers related to Intel specific SoCs (in comparison the other mfd drivers that usually named in according to some standard chip codename) and they meanwhile have long awkward prefixes. Moreover they could share common dependencies like X86.

I'm not comfortable with it and am yet to see the need. What I would suggest is to prefix 'intel-' or similar to the related files. From there we can see how overbearing the files are becoming and make a decision based on that.

Quoted 7 lines

If there are too many Intel related files, my first question(s) will be a) why are there so many files b) are so many files required and c) should they really live in MFD.

But as yet, this patch-set is the only indication that something needs to be done at all.

Agreed. We will continue to use prefixes (intel_ for *.c, *.h files, and module names, and intel- for resulting *.ko files) and simultaneously think how we can arrange the files better.

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