2021-08-16 10:56:41

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 00/20] Intel platform driver code movement.

Here is the version 2 of code movement for Intel platform drivers.
All the Intel related platform drivers were moved to intel sub-directory
to improve readability. The filenames with prefix intel_ were removed
and all the module ko files kept their original names.

Since intel_ips.h was refered by Intel i915 GPU DRM driver, it
was ketp in original localtion.

Kate Hsuan (20):
platform/x86: intel_bxtwc_tmu: Move to intel sub-directory
platform/x86: intel_chtdc_ti_pwrbtn: Move to intel sub-directory
platform/x86: intel_mrfld_pwrbtn: Move to intel sub-directory
platform/x86: intel_punit_ipc: Move to intel sub-directory
platform/x86: intel_pmc_core: Move to intel sub-directory
platform/x86: intel_scu: Move to intel sub-directory
platform/x86: intel_telemetry: Move to intel sub-directory
platform/x86: intel_ips: Move to intel sub-directory
platform/x86: intel-rst: Move to intel sub-directory
platform/x86: intel-smartconnect: Move to intel sub-directory
platform/x86: intel_turbo_max_3: Move to intel sub-directory
platform/x86: intel-uncore-frequency: Move to intel sub-directory
platform/x86: intel_speed_select_if: Move to intel sub-directory
platform/x86: intel_atomisp2_led: Move to intel sub-directory
platform/x86: intel-hid: Move to intel sub-directory
platform/x86: intel_int0002_vgpio: Move to intel sub-directory
platform/x86: intel_oaktrail.c: Move to intel sub-directory
platform/x86: intel-vbtn: Move to intel sub-directory
platform/x86: intel-wmi-sbl-fw-updat: Move to intel sub-directory
platform/x86: intel-wmi-thunderbolt: Move to intel sub-directory

drivers/platform/x86/Kconfig | 287 ------------------
drivers/platform/x86/Makefile | 32 +-
drivers/platform/x86/intel/Kconfig | 160 ++++++++++
drivers/platform/x86/intel/Makefile | 47 +++
drivers/platform/x86/intel/atomisp2/Kconfig | 35 +++
drivers/platform/x86/intel/atomisp2/Makefile | 5 +
.../atomisp2/led.c} | 0
.../atomisp2/pm.c} | 0
.../{intel_bxtwc_tmu.c => intel/bxtwc_tmu.c} | 0
.../chtdc_ti_pwrbtn.c} | 0
.../platform/x86/{intel-hid.c => intel/hid.c} | 0
.../int0002_vgpio.c} | 0
.../platform/x86/{intel_ips.c => intel/ips.c} | 0
.../mrfld_pwrbtn.c} | 0
.../{intel_oaktrail.c => intel/oaktrail.c} | 0
drivers/platform/x86/intel/pmc/Kconfig | 26 ++
drivers/platform/x86/intel/pmc/Makefile | 9 +
.../x86/{ => intel/pmc}/intel_pmc_core.h | 0
.../pmc/pmc_core.c} | 0
.../pmc/pmc_core_pltdrv.c} | 0
.../{intel_punit_ipc.c => intel/punit_ipc.c} | 0
.../platform/x86/{intel-rst.c => intel/rst.c} | 0
drivers/platform/x86/intel/scu/Kconfig | 52 ++++
drivers/platform/x86/intel/scu/Makefile | 16 +
.../x86/{intel_scu_ipc.c => intel/scu/ipc.c} | 0
.../scu/ipcutil.c} | 0
.../scu/pcidrv.c} | 0
.../scu/pltdrv.c} | 0
.../x86/{intel_scu_wdt.c => intel/scu/wdt.c} | 0
.../smartconnect.c} | 0
.../speed_select_if}/Kconfig | 0
.../speed_select_if}/Makefile | 0
.../speed_select_if}/isst_if_common.c | 0
.../speed_select_if}/isst_if_common.h | 0
.../speed_select_if}/isst_if_mbox_msr.c | 0
.../speed_select_if}/isst_if_mbox_pci.c | 0
.../speed_select_if}/isst_if_mmio.c | 0
drivers/platform/x86/intel/telemetry/Kconfig | 16 +
drivers/platform/x86/intel/telemetry/Makefile | 11 +
.../telemetry/telemetry_core.c} | 0
.../telemetry/telemetry_debugfs.c} | 0
.../telemetry/telemetry_pltdrv.c} | 0
.../turbo_max_3.c} | 0
.../uncore-frequency.c} | 0
.../x86/{intel-vbtn.c => intel/vbtn.c} | 0
drivers/platform/x86/intel/wmi/Kconfig | 26 ++
drivers/platform/x86/intel/wmi/Makefile | 9 +
.../wmi/sbl-fw-update.c} | 0
.../wmi/thunderbolt.c} | 0
49 files changed, 413 insertions(+), 318 deletions(-)
create mode 100644 drivers/platform/x86/intel/atomisp2/Kconfig
create mode 100644 drivers/platform/x86/intel/atomisp2/Makefile
rename drivers/platform/x86/{intel_atomisp2_led.c => intel/atomisp2/led.c} (100%)
rename drivers/platform/x86/{intel_atomisp2_pm.c => intel/atomisp2/pm.c} (100%)
rename drivers/platform/x86/{intel_bxtwc_tmu.c => intel/bxtwc_tmu.c} (100%)
rename drivers/platform/x86/{intel_chtdc_ti_pwrbtn.c => intel/chtdc_ti_pwrbtn.c} (100%)
rename drivers/platform/x86/{intel-hid.c => intel/hid.c} (100%)
rename drivers/platform/x86/{intel_int0002_vgpio.c => intel/int0002_vgpio.c} (100%)
rename drivers/platform/x86/{intel_ips.c => intel/ips.c} (100%)
rename drivers/platform/x86/{intel_mrfld_pwrbtn.c => intel/mrfld_pwrbtn.c} (100%)
rename drivers/platform/x86/{intel_oaktrail.c => intel/oaktrail.c} (100%)
create mode 100644 drivers/platform/x86/intel/pmc/Kconfig
create mode 100644 drivers/platform/x86/intel/pmc/Makefile
rename drivers/platform/x86/{ => intel/pmc}/intel_pmc_core.h (100%)
rename drivers/platform/x86/{intel_pmc_core.c => intel/pmc/pmc_core.c} (100%)
rename drivers/platform/x86/{intel_pmc_core_pltdrv.c => intel/pmc/pmc_core_pltdrv.c} (100%)
rename drivers/platform/x86/{intel_punit_ipc.c => intel/punit_ipc.c} (100%)
rename drivers/platform/x86/{intel-rst.c => intel/rst.c} (100%)
create mode 100644 drivers/platform/x86/intel/scu/Kconfig
create mode 100644 drivers/platform/x86/intel/scu/Makefile
rename drivers/platform/x86/{intel_scu_ipc.c => intel/scu/ipc.c} (100%)
rename drivers/platform/x86/{intel_scu_ipcutil.c => intel/scu/ipcutil.c} (100%)
rename drivers/platform/x86/{intel_scu_pcidrv.c => intel/scu/pcidrv.c} (100%)
rename drivers/platform/x86/{intel_scu_pltdrv.c => intel/scu/pltdrv.c} (100%)
rename drivers/platform/x86/{intel_scu_wdt.c => intel/scu/wdt.c} (100%)
rename drivers/platform/x86/{intel-smartconnect.c => intel/smartconnect.c} (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/Kconfig (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/Makefile (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_common.c (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_common.h (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_mbox_msr.c (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_mbox_pci.c (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_mmio.c (100%)
create mode 100644 drivers/platform/x86/intel/telemetry/Kconfig
create mode 100644 drivers/platform/x86/intel/telemetry/Makefile
rename drivers/platform/x86/{intel_telemetry_core.c => intel/telemetry/telemetry_core.c} (100%)
rename drivers/platform/x86/{intel_telemetry_debugfs.c => intel/telemetry/telemetry_debugfs.c} (100%)
rename drivers/platform/x86/{intel_telemetry_pltdrv.c => intel/telemetry/telemetry_pltdrv.c} (100%)
rename drivers/platform/x86/{intel_turbo_max_3.c => intel/turbo_max_3.c} (100%)
rename drivers/platform/x86/{intel-uncore-frequency.c => intel/uncore-frequency.c} (100%)
rename drivers/platform/x86/{intel-vbtn.c => intel/vbtn.c} (100%)
create mode 100644 drivers/platform/x86/intel/wmi/Kconfig
create mode 100644 drivers/platform/x86/intel/wmi/Makefile
rename drivers/platform/x86/{intel-wmi-sbl-fw-update.c => intel/wmi/sbl-fw-update.c} (100%)
rename drivers/platform/x86/{intel-wmi-thunderbolt.c => intel/wmi/thunderbolt.c} (100%)

--
2.31.1


2021-08-16 10:56:41

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 01/20] platform/x86: intel_bxtwc_tmu: Move to intel sub-directory

Move intel_bxtwc_tmu to intel sub-directory to
improve readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 10 ----------
drivers/platform/x86/Makefile | 1 -
drivers/platform/x86/intel/Kconfig | 10 ++++++++++
drivers/platform/x86/intel/Makefile | 4 ++++
.../x86/{intel_bxtwc_tmu.c => intel/bxtwc_tmu.c} | 0
5 files changed, 14 insertions(+), 11 deletions(-)
rename drivers/platform/x86/{intel_bxtwc_tmu.c => intel/bxtwc_tmu.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 432d72170b00..15d66892ea92 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1168,16 +1168,6 @@ config INTEL_UNCORE_FREQ_CONTROL
To compile this driver as a module, choose M here: the module
will be called intel-uncore-frequency.

-config INTEL_BXTWC_PMIC_TMU
- tristate "Intel BXT Whiskey Cove TMU Driver"
- depends on REGMAP
- depends on MFD_INTEL_PMC_BXT
- depends on INTEL_SOC_PMIC_BXTWC
- help
- Select this driver to use Intel BXT Whiskey Cove PMIC TMU feature.
- This driver enables the alarm wakeup functionality in the TMU unit
- of Whiskey Cove PMIC.
-
config INTEL_CHTDC_TI_PWRBTN
tristate "Intel Cherry Trail Dollar Cove TI power button driver"
depends on INTEL_SOC_PMIC_CHTDC_TI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 9bb3c3f77386..2477d46937c2 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -128,7 +128,6 @@ obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o

# Intel PMIC / PMC / P-Unit devices
-obj-$(CONFIG_INTEL_BXTWC_PMIC_TMU) += intel_bxtwc_tmu.o
obj-$(CONFIG_INTEL_CHTDC_TI_PWRBTN) += intel_chtdc_ti_pwrbtn.o
obj-$(CONFIG_INTEL_MRFLD_PWRBTN) += intel_mrfld_pwrbtn.o
obj-$(CONFIG_INTEL_PMC_CORE) += intel_pmc_core.o intel_pmc_core_pltdrv.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 6eec084d9bf9..b274ff4192b2 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -20,4 +20,14 @@ source "drivers/platform/x86/intel/int33fe/Kconfig"
source "drivers/platform/x86/intel/int3472/Kconfig"
source "drivers/platform/x86/intel/pmt/Kconfig"

+config INTEL_BXTWC_PMIC_TMU
+ tristate "Intel BXT Whiskey Cove TMU Driver"
+ depends on REGMAP
+ depends on MFD_INTEL_PMC_BXT
+ depends on INTEL_SOC_PMIC_BXTWC
+ help
+ Select this driver to use Intel BXT Whiskey Cove PMIC TMU feature.
+ This driver enables the alarm wakeup functionality in the TMU unit
+ of Whiskey Cove PMIC.
+
endif # X86_PLATFORM_DRIVERS_INTEL
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index ca0ec2c85b05..92ab6fa7438f 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -7,3 +7,7 @@
obj-$(CONFIG_INTEL_CHT_INT33FE) += int33fe/
obj-$(CONFIG_INTEL_SKL_INT3472) += int3472/
obj-$(CONFIG_INTEL_PMT_CLASS) += pmt/
+
+# Intel PMIC / PMC / P-Unit devices
+intel_bxtwc_tmu-y := bxtwc_tmu.o
+obj-$(CONFIG_INTEL_BXTWC_PMIC_TMU) += intel_bxtwc_tmu.o
diff --git a/drivers/platform/x86/intel_bxtwc_tmu.c b/drivers/platform/x86/intel/bxtwc_tmu.c
similarity index 100%
rename from drivers/platform/x86/intel_bxtwc_tmu.c
rename to drivers/platform/x86/intel/bxtwc_tmu.c
--
2.31.1

2021-08-16 10:57:02

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 04/20] platform/x86: intel_punit_ipc: Move to intel sub-directory

Move intel_punit_ipc to intel sub-directory
to improve readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 6 ------
drivers/platform/x86/Makefile | 2 +-
drivers/platform/x86/intel/Kconfig | 6 ++++++
drivers/platform/x86/intel/Makefile | 2 ++
.../platform/x86/{intel_punit_ipc.c => intel/punit_ipc.c} | 0
5 files changed, 9 insertions(+), 7 deletions(-)
rename drivers/platform/x86/{intel_punit_ipc.c => intel/punit_ipc.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 66cc8a8a9bae..fbadb19e5a6c 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1189,12 +1189,6 @@ config INTEL_PMC_CORE
- Low Power Mode registers (Tigerlake and beyond)
- PMC quirks as needed to enable SLPS0/S0ix

-config INTEL_PUNIT_IPC
- tristate "Intel P-Unit IPC Driver"
- help
- This driver provides support for Intel P-Unit Mailbox IPC mechanism,
- which is used to bridge the communications between kernel and P-Unit.
-
config INTEL_SCU_IPC
bool

diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index fb6dc4d9e8df..6d03005e6e36 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -130,7 +130,7 @@ obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o
# Intel PMIC / PMC / P-Unit devices

obj-$(CONFIG_INTEL_PMC_CORE) += intel_pmc_core.o intel_pmc_core_pltdrv.o
-obj-$(CONFIG_INTEL_PUNIT_IPC) += intel_punit_ipc.o
+
obj-$(CONFIG_INTEL_SCU_IPC) += intel_scu_ipc.o
obj-$(CONFIG_INTEL_SCU_PCI) += intel_scu_pcidrv.o
obj-$(CONFIG_INTEL_SCU_PLATFORM) += intel_scu_pltdrv.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index c4f7518d747b..2555bed25d27 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -52,4 +52,10 @@ config INTEL_MRFLD_PWRBTN
To compile this driver as a module, choose M here: the module
will be called intel_mrfld_pwrbtn.

+config INTEL_PUNIT_IPC
+ tristate "Intel P-Unit IPC Driver"
+ help
+ This driver provides support for Intel P-Unit Mailbox IPC mechanism,
+ which is used to bridge the communications between kernel and P-Unit.
+
endif # X86_PLATFORM_DRIVERS_INTEL
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index d194327565fe..af78691a7b34 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -15,3 +15,5 @@ intel_chtdc_ti_pwrbtn-y := chtdc_ti_pwrbtn.o
obj-$(CONFIG_INTEL_CHTDC_TI_PWRBTN) += intel_chtdc_ti_pwrbtn.o
intel_mrfld_pwrbtn-y := mrfld_pwrbtn.o
obj-$(CONFIG_INTEL_MRFLD_PWRBTN) += intel_mrfld_pwrbtn.o
+intel_punit_ipc-y := punit_ipc.o
+obj-$(CONFIG_INTEL_PUNIT_IPC) += intel_punit_ipc.o
diff --git a/drivers/platform/x86/intel_punit_ipc.c b/drivers/platform/x86/intel/punit_ipc.c
similarity index 100%
rename from drivers/platform/x86/intel_punit_ipc.c
rename to drivers/platform/x86/intel/punit_ipc.c
--
2.31.1

2021-08-16 10:57:06

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 14/20] platform/x86: intel_atomisp2_led: Move to intel sub-directory

Move intel_atomisp2_led to intel sub-directory to improve
readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 34 ------------------
drivers/platform/x86/Makefile | 2 --
drivers/platform/x86/intel/Kconfig | 1 +
drivers/platform/x86/intel/Makefile | 2 ++
drivers/platform/x86/intel/atomisp2/Kconfig | 35 +++++++++++++++++++
drivers/platform/x86/intel/atomisp2/Makefile | 5 +++
.../atomisp2/led.c} | 0
.../atomisp2/pm.c} | 0
8 files changed, 43 insertions(+), 36 deletions(-)
create mode 100644 drivers/platform/x86/intel/atomisp2/Kconfig
create mode 100644 drivers/platform/x86/intel/atomisp2/Makefile
rename drivers/platform/x86/{intel_atomisp2_led.c => intel/atomisp2/led.c} (100%)
rename drivers/platform/x86/{intel_atomisp2_pm.c => intel/atomisp2/pm.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index b864e37c6781..ac4ec4e2534a 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -667,40 +667,6 @@ config THINKPAD_LMI

source "drivers/platform/x86/intel/Kconfig"

-config INTEL_ATOMISP2_LED
- tristate "Intel AtomISP2 camera LED driver"
- depends on GPIOLIB && LEDS_GPIO
- help
- Many Bay Trail and Cherry Trail devices come with a camera attached
- to Intel's Image Signal Processor. Linux currently does not have a
- driver for these, so they do not work as a camera. Some of these
- camera's have a LED which is controlled through a GPIO.
-
- Some of these devices have a firmware issue where the LED gets turned
- on at boot. This driver will turn the LED off at boot and also allows
- controlling the LED (repurposing it) through the sysfs LED interface.
-
- Which GPIO is attached to the LED is usually not described in the
- ACPI tables, so this driver contains per-system info about the GPIO
- inside the driver, this means that this driver only works on systems
- the driver knows about.
-
- To compile this driver as a module, choose M here: the module
- will be called intel_atomisp2_led.
-
-config INTEL_ATOMISP2_PM
- tristate "Intel AtomISP2 dummy / power-management driver"
- depends on PCI && IOSF_MBI && PM
- depends on !INTEL_ATOMISP
- help
- Power-management driver for Intel's Image Signal Processor found on
- Bay Trail and Cherry Trail devices. This dummy driver's sole purpose
- is to turn the ISP off (put it in D3) to save power and to allow
- entering of S0ix modes.
-
- To compile this driver as a module, choose M here: the module
- will be called intel_atomisp2_pm.
-
config INTEL_HID_EVENT
tristate "INTEL HID Event"
depends on ACPI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index f30cee767252..b5327b6f774a 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -71,8 +71,6 @@ obj-$(CONFIG_THINKPAD_LMI) += think-lmi.o
# Intel
obj-$(CONFIG_X86_PLATFORM_DRIVERS_INTEL) += intel/

-obj-$(CONFIG_INTEL_ATOMISP2_LED) += intel_atomisp2_led.o
-obj-$(CONFIG_INTEL_ATOMISP2_PM) += intel_atomisp2_pm.o
obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o
obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 01c73d184461..443554133f20 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -19,6 +19,7 @@ if X86_PLATFORM_DRIVERS_INTEL
source "drivers/platform/x86/intel/int33fe/Kconfig"
source "drivers/platform/x86/intel/int3472/Kconfig"
source "drivers/platform/x86/intel/pmt/Kconfig"
+source "drivers/platform/x86/intel/atomisp2/Kconfig"

config INTEL_BXTWC_PMIC_TMU
tristate "Intel BXT Whiskey Cove TMU Driver"
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index ae2a3cec8d82..fd2d274f294f 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -7,6 +7,8 @@
obj-$(CONFIG_INTEL_CHT_INT33FE) += int33fe/
obj-$(CONFIG_INTEL_SKL_INT3472) += int3472/
obj-$(CONFIG_INTEL_PMT_CLASS) += pmt/
+obj-$(CONFIG_INTEL_ATOMISP2_LED) += atomisp2/
+obj-$(CONFIG_INTEL_ATOMISP2_PM) += atomisp2/

# Intel PMIC / PMC / P-Unit devices
intel_bxtwc_tmu-y := bxtwc_tmu.o
diff --git a/drivers/platform/x86/intel/atomisp2/Kconfig b/drivers/platform/x86/intel/atomisp2/Kconfig
new file mode 100644
index 000000000000..49305b8605fe
--- /dev/null
+++ b/drivers/platform/x86/intel/atomisp2/Kconfig
@@ -0,0 +1,35 @@
+
+config INTEL_ATOMISP2_LED
+ tristate "Intel AtomISP2 camera LED driver"
+ depends on GPIOLIB && LEDS_GPIO
+ help
+ Many Bay Trail and Cherry Trail devices come with a camera attached
+ to Intel's Image Signal Processor. Linux currently does not have a
+ driver for these, so they do not work as a camera. Some of these
+ camera's have a LED which is controlled through a GPIO.
+
+ Some of these devices have a firmware issue where the LED gets turned
+ on at boot. This driver will turn the LED off at boot and also allows
+ controlling the LED (repurposing it) through the sysfs LED interface.
+
+ Which GPIO is attached to the LED is usually not described in the
+ ACPI tables, so this driver contains per-system info about the GPIO
+ inside the driver, this means that this driver only works on systems
+ the driver knows about.
+
+ To compile this driver as a module, choose M here: the module
+ will be called intel_atomisp2_led.
+
+config INTEL_ATOMISP2_PM
+ tristate "Intel AtomISP2 dummy / power-management driver"
+ depends on PCI && IOSF_MBI && PM
+ depends on !INTEL_ATOMISP
+ help
+ Power-management driver for Intel's Image Signal Processor found on
+ Bay Trail and Cherry Trail devices. This dummy driver's sole purpose
+ is to turn the ISP off (put it in D3) to save power and to allow
+ entering of S0ix modes.
+
+ To compile this driver as a module, choose M here: the module
+ will be called intel_atomisp2_pm.
+
diff --git a/drivers/platform/x86/intel/atomisp2/Makefile b/drivers/platform/x86/intel/atomisp2/Makefile
new file mode 100644
index 000000000000..6937ff24861e
--- /dev/null
+++ b/drivers/platform/x86/intel/atomisp2/Makefile
@@ -0,0 +1,5 @@
+
+intel_atomisp2_led-y := led.o
+obj-$(CONFIG_INTEL_ATOMISP2_LED) += intel_atomisp2_led.o
+intel_atomisp2_pm-y += pm.o
+obj-$(CONFIG_INTEL_ATOMISP2_PM) += intel_atomisp2_pm.o
diff --git a/drivers/platform/x86/intel_atomisp2_led.c b/drivers/platform/x86/intel/atomisp2/led.c
similarity index 100%
rename from drivers/platform/x86/intel_atomisp2_led.c
rename to drivers/platform/x86/intel/atomisp2/led.c
diff --git a/drivers/platform/x86/intel_atomisp2_pm.c b/drivers/platform/x86/intel/atomisp2/pm.c
similarity index 100%
rename from drivers/platform/x86/intel_atomisp2_pm.c
rename to drivers/platform/x86/intel/atomisp2/pm.c
--
2.31.1

2021-08-16 10:57:06

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 13/20] platform/x86: intel_speed_select_if: Move to intel sub-directory

Move intel_speed_select_if to intel sub-directory to improve
readability and rename it from intel_speed_select_if to speed_select_if

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 2 --
drivers/platform/x86/Makefile | 2 --
drivers/platform/x86/intel/Kconfig | 2 ++
drivers/platform/x86/intel/Makefile | 3 ++-
.../{intel_speed_select_if => intel/speed_select_if}/Kconfig | 0
.../{intel_speed_select_if => intel/speed_select_if}/Makefile | 0
.../speed_select_if}/isst_if_common.c | 0
.../speed_select_if}/isst_if_common.h | 0
.../speed_select_if}/isst_if_mbox_msr.c | 0
.../speed_select_if}/isst_if_mbox_pci.c | 0
.../speed_select_if}/isst_if_mmio.c | 0
11 files changed, 4 insertions(+), 5 deletions(-)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/Kconfig (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/Makefile (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_common.c (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_common.h (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_mbox_msr.c (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_mbox_pci.c (100%)
rename drivers/platform/x86/{intel_speed_select_if => intel/speed_select_if}/isst_if_mmio.c (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index f0e3d9dc71a4..b864e37c6781 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1109,8 +1109,6 @@ config INTEL_IMR

If you are running on a Galileo/Quark say Y here.

-source "drivers/platform/x86/intel_speed_select_if/Kconfig"
-

endif # X86_PLATFORM_DEVICES

diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index e028c8dbb7cc..f30cee767252 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -119,7 +119,5 @@ obj-$(CONFIG_MLX_PLATFORM) += mlx-platform.o
obj-$(CONFIG_TOUCHSCREEN_DMI) += touchscreen_dmi.o
obj-$(CONFIG_WIRELESS_HOTKEY) += wireless-hotkey.o

-# Intel uncore drivers
-obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += intel_speed_select_if/

obj-$(CONFIG_PMC_ATOM) += pmc_atom.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 3763ed816919..01c73d184461 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -98,6 +98,8 @@ config INTEL_SMARTCONNECT
This driver checks to determine whether the device has Intel Smart
Connect enabled, and if so disables it.

+source "drivers/platform/x86/intel/speed_select_if/Kconfig"
+
config INTEL_TURBO_MAX_3
bool "Intel Turbo Boost Max Technology 3.0 enumeration driver"
depends on X86_64 && SCHED_MC_PRIO
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index 44b1fe372b44..ae2a3cec8d82 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -36,4 +36,5 @@ obj-$(CONFIG_INTEL_SMARTCONNECT) += intel-smartconnect.o
intel_turbo_max_3-y := turbo_max_3.o
obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
intel-uncore-frequency-y := uncore-frequency.o
-obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o
\ No newline at end of file
+obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o
+obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += speed_select_if/
\ No newline at end of file
diff --git a/drivers/platform/x86/intel_speed_select_if/Kconfig b/drivers/platform/x86/intel/speed_select_if/Kconfig
similarity index 100%
rename from drivers/platform/x86/intel_speed_select_if/Kconfig
rename to drivers/platform/x86/intel/speed_select_if/Kconfig
diff --git a/drivers/platform/x86/intel_speed_select_if/Makefile b/drivers/platform/x86/intel/speed_select_if/Makefile
similarity index 100%
rename from drivers/platform/x86/intel_speed_select_if/Makefile
rename to drivers/platform/x86/intel/speed_select_if/Makefile
diff --git a/drivers/platform/x86/intel_speed_select_if/isst_if_common.c b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
similarity index 100%
rename from drivers/platform/x86/intel_speed_select_if/isst_if_common.c
rename to drivers/platform/x86/intel/speed_select_if/isst_if_common.c
diff --git a/drivers/platform/x86/intel_speed_select_if/isst_if_common.h b/drivers/platform/x86/intel/speed_select_if/isst_if_common.h
similarity index 100%
rename from drivers/platform/x86/intel_speed_select_if/isst_if_common.h
rename to drivers/platform/x86/intel/speed_select_if/isst_if_common.h
diff --git a/drivers/platform/x86/intel_speed_select_if/isst_if_mbox_msr.c b/drivers/platform/x86/intel/speed_select_if/isst_if_mbox_msr.c
similarity index 100%
rename from drivers/platform/x86/intel_speed_select_if/isst_if_mbox_msr.c
rename to drivers/platform/x86/intel/speed_select_if/isst_if_mbox_msr.c
diff --git a/drivers/platform/x86/intel_speed_select_if/isst_if_mbox_pci.c b/drivers/platform/x86/intel/speed_select_if/isst_if_mbox_pci.c
similarity index 100%
rename from drivers/platform/x86/intel_speed_select_if/isst_if_mbox_pci.c
rename to drivers/platform/x86/intel/speed_select_if/isst_if_mbox_pci.c
diff --git a/drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c b/drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c
similarity index 100%
rename from drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c
rename to drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c
--
2.31.1

2021-08-16 10:57:07

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 05/20] platform/x86: intel_pmc_core: Move to intel sub-directory

Move intel_pmc_core to intel sub-directory
to improve readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 21 ---------------
drivers/platform/x86/Makefile | 2 --
drivers/platform/x86/intel/Kconfig | 2 ++
drivers/platform/x86/intel/Makefile | 1 +
drivers/platform/x86/intel/pmc/Kconfig | 26 +++++++++++++++++++
drivers/platform/x86/intel/pmc/Makefile | 9 +++++++
.../x86/{ => intel/pmc}/intel_pmc_core.h | 0
.../pmc/pmc_core.c} | 0
.../pmc/pmc_core_pltdrv.c} | 0
9 files changed, 38 insertions(+), 23 deletions(-)
create mode 100644 drivers/platform/x86/intel/pmc/Kconfig
create mode 100644 drivers/platform/x86/intel/pmc/Makefile
rename drivers/platform/x86/{ => intel/pmc}/intel_pmc_core.h (100%)
rename drivers/platform/x86/{intel_pmc_core.c => intel/pmc/pmc_core.c} (100%)
rename drivers/platform/x86/{intel_pmc_core_pltdrv.c => intel/pmc/pmc_core_pltdrv.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index fbadb19e5a6c..7d929970fb38 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1168,27 +1168,6 @@ config INTEL_UNCORE_FREQ_CONTROL
To compile this driver as a module, choose M here: the module
will be called intel-uncore-frequency.

-config INTEL_PMC_CORE
- tristate "Intel PMC Core driver"
- depends on PCI
- depends on ACPI
- help
- The Intel Platform Controller Hub for Intel Core SoCs provides access
- to Power Management Controller registers via various interfaces. This
- driver can utilize debugging capabilities and supported features as
- exposed by the Power Management Controller. It also may perform some
- tasks in the PMC in order to enable transition into the SLPS0 state.
- It should be selected on all Intel platforms supported by the driver.
-
- Supported features:
- - SLP_S0_RESIDENCY counter
- - PCH IP Power Gating status
- - LTR Ignore / LTR Show
- - MPHY/PLL gating status (Sunrisepoint PCH only)
- - SLPS0 Debug registers (Cannonlake/Icelake PCH)
- - Low Power Mode registers (Tigerlake and beyond)
- - PMC quirks as needed to enable SLPS0/S0ix
-
config INTEL_SCU_IPC
bool

diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 6d03005e6e36..152ef10d2a2b 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -129,8 +129,6 @@ obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o

# Intel PMIC / PMC / P-Unit devices

-obj-$(CONFIG_INTEL_PMC_CORE) += intel_pmc_core.o intel_pmc_core_pltdrv.o
-
obj-$(CONFIG_INTEL_SCU_IPC) += intel_scu_ipc.o
obj-$(CONFIG_INTEL_SCU_PCI) += intel_scu_pcidrv.o
obj-$(CONFIG_INTEL_SCU_PLATFORM) += intel_scu_pltdrv.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 2555bed25d27..4d689d0be585 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -58,4 +58,6 @@ config INTEL_PUNIT_IPC
This driver provides support for Intel P-Unit Mailbox IPC mechanism,
which is used to bridge the communications between kernel and P-Unit.

+source "drivers/platform/x86/intel/pmc/Kconfig"
+
endif # X86_PLATFORM_DRIVERS_INTEL
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index af78691a7b34..0986da945239 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -17,3 +17,4 @@ intel_mrfld_pwrbtn-y := mrfld_pwrbtn.o
obj-$(CONFIG_INTEL_MRFLD_PWRBTN) += intel_mrfld_pwrbtn.o
intel_punit_ipc-y := punit_ipc.o
obj-$(CONFIG_INTEL_PUNIT_IPC) += intel_punit_ipc.o
+obj-$(CONFIG_INTEL_PMC_CORE) += pmc/
diff --git a/drivers/platform/x86/intel/pmc/Kconfig b/drivers/platform/x86/intel/pmc/Kconfig
new file mode 100644
index 000000000000..d44a3e34210f
--- /dev/null
+++ b/drivers/platform/x86/intel/pmc/Kconfig
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for linux/drivers/platform/x86
+# x86 Platform-Specific Drivers
+#
+
+config INTEL_PMC_CORE
+ tristate "Intel PMC Core driver"
+ depends on PCI
+ depends on ACPI
+ help
+ The Intel Platform Controller Hub for Intel Core SoCs provides access
+ to Power Management Controller registers via various interfaces. This
+ driver can utilize debugging capabilities and supported features as
+ exposed by the Power Management Controller. It also may perform some
+ tasks in the PMC in order to enable transition into the SLPS0 state.
+ It should be selected on all Intel platforms supported by the driver.
+
+ Supported features:
+ - SLP_S0_RESIDENCY counter
+ - PCH IP Power Gating status
+ - LTR Ignore / LTR Show
+ - MPHY/PLL gating status (Sunrisepoint PCH only)
+ - SLPS0 Debug registers (Cannonlake/Icelake PCH)
+ - Low Power Mode registers (Tigerlake and beyond)
+ - PMC quirks as needed to enable SLPS0/S0ix
diff --git a/drivers/platform/x86/intel/pmc/Makefile b/drivers/platform/x86/intel/pmc/Makefile
new file mode 100644
index 000000000000..56021752fceb
--- /dev/null
+++ b/drivers/platform/x86/intel/pmc/Makefile
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for linux/drivers/platform/x86
+# x86 Platform-Specific Drivers
+#
+
+intel_pmc_core-y := pmc_core.o
+intel_pmc_core_pltdrv-y := pmc_core_pltdrv.o
+obj-$(CONFIG_INTEL_PMC_CORE) += intel_pmc_core_pltdrv.o intel_pmc_core.o
diff --git a/drivers/platform/x86/intel_pmc_core.h b/drivers/platform/x86/intel/pmc/intel_pmc_core.h
similarity index 100%
rename from drivers/platform/x86/intel_pmc_core.h
rename to drivers/platform/x86/intel/pmc/intel_pmc_core.h
diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel/pmc/pmc_core.c
similarity index 100%
rename from drivers/platform/x86/intel_pmc_core.c
rename to drivers/platform/x86/intel/pmc/pmc_core.c
diff --git a/drivers/platform/x86/intel_pmc_core_pltdrv.c b/drivers/platform/x86/intel/pmc/pmc_core_pltdrv.c
similarity index 100%
rename from drivers/platform/x86/intel_pmc_core_pltdrv.c
rename to drivers/platform/x86/intel/pmc/pmc_core_pltdrv.c
--
2.31.1

2021-08-16 10:57:10

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 15/20] platform/x86: intel-hid: Move to intel sub-directory

Move intel-hid to intel sub-directory to improve
readability. Also, add CFLAGS to tweak the including path
of dual_accel_detect.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 13 -------------
drivers/platform/x86/Makefile | 1 -
drivers/platform/x86/intel/Kconfig | 13 +++++++++++++
drivers/platform/x86/intel/Makefile | 5 ++++-
drivers/platform/x86/{intel-hid.c => intel/hid.c} | 0
5 files changed, 17 insertions(+), 15 deletions(-)
rename drivers/platform/x86/{intel-hid.c => intel/hid.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index ac4ec4e2534a..84865e1cf043 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -667,19 +667,6 @@ config THINKPAD_LMI

source "drivers/platform/x86/intel/Kconfig"

-config INTEL_HID_EVENT
- tristate "INTEL HID Event"
- depends on ACPI
- depends on INPUT
- depends on I2C
- select INPUT_SPARSEKMAP
- help
- This driver provides support for the Intel HID Event hotkey interface.
- Some laptops require this driver for hotkey support.
-
- To compile this driver as a module, choose M here: the module will
- be called intel_hid.
-
config INTEL_INT0002_VGPIO
tristate "Intel ACPI INT0002 Virtual GPIO driver"
depends on GPIOLIB && ACPI && PM_SLEEP
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index b5327b6f774a..734a6c266025 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -71,7 +71,6 @@ obj-$(CONFIG_THINKPAD_LMI) += think-lmi.o
# Intel
obj-$(CONFIG_X86_PLATFORM_DRIVERS_INTEL) += intel/

-obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o
obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 443554133f20..4ca7bec080e7 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -21,6 +21,19 @@ source "drivers/platform/x86/intel/int3472/Kconfig"
source "drivers/platform/x86/intel/pmt/Kconfig"
source "drivers/platform/x86/intel/atomisp2/Kconfig"

+config INTEL_HID_EVENT
+ tristate "INTEL HID Event"
+ depends on ACPI
+ depends on INPUT
+ depends on I2C
+ select INPUT_SPARSEKMAP
+ help
+ This driver provides support for the Intel HID Event hotkey interface.
+ Some laptops require this driver for hotkey support.
+
+ To compile this driver as a module, choose M here: the module will
+ be called intel_hid.
+
config INTEL_BXTWC_PMIC_TMU
tristate "Intel BXT Whiskey Cove TMU Driver"
depends on REGMAP
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index fd2d274f294f..e47e6ac4b5eb 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -9,6 +9,9 @@ obj-$(CONFIG_INTEL_SKL_INT3472) += int3472/
obj-$(CONFIG_INTEL_PMT_CLASS) += pmt/
obj-$(CONFIG_INTEL_ATOMISP2_LED) += atomisp2/
obj-$(CONFIG_INTEL_ATOMISP2_PM) += atomisp2/
+CFLAGS_hid.o := -I./drivers/platform/x86
+intel-hid-y := hid.o
+obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o

# Intel PMIC / PMC / P-Unit devices
intel_bxtwc_tmu-y := bxtwc_tmu.o
@@ -39,4 +42,4 @@ intel_turbo_max_3-y := turbo_max_3.o
obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
intel-uncore-frequency-y := uncore-frequency.o
obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o
-obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += speed_select_if/
\ No newline at end of file
+obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += speed_select_if/
diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel/hid.c
similarity index 100%
rename from drivers/platform/x86/intel-hid.c
rename to drivers/platform/x86/intel/hid.c
--
2.31.1

2021-08-16 10:57:27

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 17/20] platform/x86: intel_oaktrail.c: Move to intel sub-directory

Move intel_oaktrail.c to intel sub-directory to improve
readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 10 ----------
drivers/platform/x86/Makefile | 1 -
drivers/platform/x86/intel/Kconfig | 10 ++++++++++
drivers/platform/x86/intel/Makefile | 2 ++
.../x86/{intel_oaktrail.c => intel/oaktrail.c} | 0
5 files changed, 12 insertions(+), 11 deletions(-)
rename drivers/platform/x86/{intel_oaktrail.c => intel/oaktrail.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 7274b586170d..3d1cb7f03309 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -677,16 +677,6 @@ config INTEL_MENLOW

If unsure, say N.

-config INTEL_OAKTRAIL
- tristate "Intel Oaktrail Platform Extras"
- depends on ACPI
- depends on ACPI_VIDEO || ACPI_VIDEO = n
- depends on RFKILL && BACKLIGHT_CLASS_DEVICE && ACPI
- help
- Intel Oaktrail platform need this driver to provide interfaces to
- enable/disable the Camera, WiFi, BT etc. devices. If in doubt, say Y
- here; it will only load on supported platforms.
-
config INTEL_VBTN
tristate "INTEL VIRTUAL BUTTON"
depends on ACPI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 4c9a47936e65..63e78ed69fb2 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -72,7 +72,6 @@ obj-$(CONFIG_THINKPAD_LMI) += think-lmi.o
obj-$(CONFIG_X86_PLATFORM_DRIVERS_INTEL) += intel/

obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
-obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o
obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o

# MSI
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index cf56a1c4474b..6df6e43d1061 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -53,6 +53,16 @@ config INTEL_INT0002_VGPIO
To compile this driver as a module, choose M here: the module will
be called intel_int0002_vgpio.

+config INTEL_OAKTRAIL
+ tristate "Intel Oaktrail Platform Extras"
+ depends on ACPI
+ depends on ACPI_VIDEO || ACPI_VIDEO = n
+ depends on RFKILL && BACKLIGHT_CLASS_DEVICE && ACPI
+ help
+ Intel Oaktrail platform need this driver to provide interfaces to
+ enable/disable the Camera, WiFi, BT etc. devices. If in doubt, say Y
+ here; it will only load on supported platforms.
+
config INTEL_BXTWC_PMIC_TMU
tristate "Intel BXT Whiskey Cove TMU Driver"
depends on REGMAP
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index 23503798b533..291219f63b04 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -14,6 +14,8 @@ intel-hid-y := hid.o
obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o
intel_int0002_vgpio-y := int0002_vgpio.o
obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
+intel_oaktrail-y := oaktrail.o
+obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o

# Intel PMIC / PMC / P-Unit devices
intel_bxtwc_tmu-y := bxtwc_tmu.o
diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel/oaktrail.c
similarity index 100%
rename from drivers/platform/x86/intel_oaktrail.c
rename to drivers/platform/x86/intel/oaktrail.c
--
2.31.1

2021-08-16 10:57:28

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 18/20] platform/x86: intel-vbtn: Move to intel sub-directory

Move intel-vbtn to intel sub-directory to improve
readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 13 -------------
drivers/platform/x86/Makefile | 2 --
drivers/platform/x86/intel/Kconfig | 13 +++++++++++++
drivers/platform/x86/intel/Makefile | 3 +++
drivers/platform/x86/{intel-vbtn.c => intel/vbtn.c} | 0
5 files changed, 16 insertions(+), 15 deletions(-)
rename drivers/platform/x86/{intel-vbtn.c => intel/vbtn.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 3d1cb7f03309..3a087cb140cb 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -677,19 +677,6 @@ config INTEL_MENLOW

If unsure, say N.

-config INTEL_VBTN
- tristate "INTEL VIRTUAL BUTTON"
- depends on ACPI
- depends on INPUT
- depends on I2C
- select INPUT_SPARSEKMAP
- help
- This driver provides support for the Intel Virtual Button interface.
- Some laptops require this driver for power button support.
-
- To compile this driver as a module, choose M here: the module will
- be called intel_vbtn.
-
config MSI_LAPTOP
tristate "MSI Laptop Extras"
depends on ACPI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 63e78ed69fb2..a6d90dc56d62 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -70,9 +70,7 @@ obj-$(CONFIG_THINKPAD_LMI) += think-lmi.o

# Intel
obj-$(CONFIG_X86_PLATFORM_DRIVERS_INTEL) += intel/
-
obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
-obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o

# MSI
obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 6df6e43d1061..f69fc6b004cf 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -53,6 +53,19 @@ config INTEL_INT0002_VGPIO
To compile this driver as a module, choose M here: the module will
be called intel_int0002_vgpio.

+config INTEL_VBTN
+ tristate "INTEL VIRTUAL BUTTON"
+ depends on ACPI
+ depends on INPUT
+ depends on I2C
+ select INPUT_SPARSEKMAP
+ help
+ This driver provides support for the Intel Virtual Button interface.
+ Some laptops require this driver for power button support.
+
+ To compile this driver as a module, choose M here: the module will
+ be called intel_vbtn.
+
config INTEL_OAKTRAIL
tristate "Intel Oaktrail Platform Extras"
depends on ACPI
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index 291219f63b04..58d4ff0502b0 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -16,6 +16,9 @@ intel_int0002_vgpio-y := int0002_vgpio.o
obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
intel_oaktrail-y := oaktrail.o
obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o
+CFLAGS_vbtn.o := -I./drivers/platform/x86
+intel-vbtn-y := vbtn.o
+obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o

# Intel PMIC / PMC / P-Unit devices
intel_bxtwc_tmu-y := bxtwc_tmu.o
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel/vbtn.c
similarity index 100%
rename from drivers/platform/x86/intel-vbtn.c
rename to drivers/platform/x86/intel/vbtn.c
--
2.31.1

2021-08-16 10:57:46

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 07/20] platform/x86: intel_telemetry: Move to intel sub-directory

Move intel_telemetry to intel sub-directory to improve readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 13 -------------
drivers/platform/x86/Makefile | 5 -----
drivers/platform/x86/intel/Kconfig | 1 +
drivers/platform/x86/intel/Makefile | 1 +
drivers/platform/x86/intel/telemetry/Kconfig | 16 ++++++++++++++++
drivers/platform/x86/intel/telemetry/Makefile | 11 +++++++++++
.../telemetry/telemetry_core.c} | 0
.../telemetry/telemetry_debugfs.c} | 0
.../telemetry/telemetry_pltdrv.c} | 0
9 files changed, 29 insertions(+), 18 deletions(-)
create mode 100644 drivers/platform/x86/intel/telemetry/Kconfig
create mode 100644 drivers/platform/x86/intel/telemetry/Makefile
rename drivers/platform/x86/{intel_telemetry_core.c => intel/telemetry/telemetry_core.c} (100%)
rename drivers/platform/x86/{intel_telemetry_debugfs.c => intel/telemetry/telemetry_debugfs.c} (100%)
rename drivers/platform/x86/{intel_telemetry_pltdrv.c => intel/telemetry/telemetry_pltdrv.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index e34e6af7a7d4..fdc8b4c259ee 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1168,19 +1168,6 @@ config INTEL_UNCORE_FREQ_CONTROL
To compile this driver as a module, choose M here: the module
will be called intel-uncore-frequency.

-
-config INTEL_TELEMETRY
- tristate "Intel SoC Telemetry Driver"
- depends on X86_64
- depends on MFD_INTEL_PMC_BXT
- depends on INTEL_PUNIT_IPC
- help
- This driver provides interfaces to configure and use
- telemetry for INTEL SoC from APL onwards. It is also
- used to get various SoC events and parameters
- directly via debugfs files. Various tools may use
- this interface for SoC state monitoring.
-
endif # X86_PLATFORM_DEVICES

config PMC_ATOM
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index e96f0e77df88..bd9754dfa37d 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -127,10 +127,5 @@ obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += intel_speed_select_if/
obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o

-# Intel PMIC / PMC / P-Unit devices

-
-obj-$(CONFIG_INTEL_TELEMETRY) += intel_telemetry_core.o \
- intel_telemetry_pltdrv.o \
- intel_telemetry_debugfs.o
obj-$(CONFIG_PMC_ATOM) += pmc_atom.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 672b6ad64ff1..fb409f044e27 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -60,5 +60,6 @@ config INTEL_PUNIT_IPC

source "drivers/platform/x86/intel/pmc/Kconfig"
source "drivers/platform/x86/intel/scu/Kconfig"
+source "drivers/platform/x86/intel/telemetry/Kconfig"

endif # X86_PLATFORM_DRIVERS_INTEL
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index e842a72fa516..51ea5ee1f833 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -23,4 +23,5 @@ obj-$(CONFIG_INTEL_SCU_PCI) += scu/
obj-$(CONFIG_INTEL_SCU_PLATFORM) += scu/
obj-$(CONFIG_INTEL_SCU_WDT) += scu/
obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += scu/
+obj-$(CONFIG_INTEL_TELEMETRY) += telemetry/

diff --git a/drivers/platform/x86/intel/telemetry/Kconfig b/drivers/platform/x86/intel/telemetry/Kconfig
new file mode 100644
index 000000000000..9fbc06dc4593
--- /dev/null
+++ b/drivers/platform/x86/intel/telemetry/Kconfig
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Intel x86 Platform Specific Drivers
+#
+
+config INTEL_TELEMETRY
+ tristate "Intel SoC Telemetry Driver"
+ depends on X86_64
+ depends on MFD_INTEL_PMC_BXT
+ depends on INTEL_PUNIT_IPC
+ help
+ This driver provides interfaces to configure and use
+ telemetry for INTEL SoC from APL onwards. It is also
+ used to get various SoC events and parameters
+ directly via debugfs files. Various tools may use
+ this interface for SoC state monitoring.
diff --git a/drivers/platform/x86/intel/telemetry/Makefile b/drivers/platform/x86/intel/telemetry/Makefile
new file mode 100644
index 000000000000..74344f36eb99
--- /dev/null
+++ b/drivers/platform/x86/intel/telemetry/Makefile
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Intel x86 Platform Specific Drivers
+#
+
+intel_telemetry_core-y := telemetry_core.o
+intel_telemetry_pltdrv-y := telemetry_pltdrv.o
+intel_telemetry_debugfs-y := telemetry_debugfs.o
+obj-$(CONFIG_INTEL_TELEMETRY) += intel_telemetry_core.o \
+ intel_telemetry_pltdrv.o \
+ intel_telemetry_debugfs.o
diff --git a/drivers/platform/x86/intel_telemetry_core.c b/drivers/platform/x86/intel/telemetry/telemetry_core.c
similarity index 100%
rename from drivers/platform/x86/intel_telemetry_core.c
rename to drivers/platform/x86/intel/telemetry/telemetry_core.c
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel/telemetry/telemetry_debugfs.c
similarity index 100%
rename from drivers/platform/x86/intel_telemetry_debugfs.c
rename to drivers/platform/x86/intel/telemetry/telemetry_debugfs.c
diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c b/drivers/platform/x86/intel/telemetry/telemetry_pltdrv.c
similarity index 100%
rename from drivers/platform/x86/intel_telemetry_pltdrv.c
rename to drivers/platform/x86/intel/telemetry/telemetry_pltdrv.c
--
2.31.1

2021-08-16 10:58:45

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 12/20] platform/x86: intel-uncore-frequency: Move to intel sub-directory

Move intel-uncore-frequency to intel sub-directory to improve
readability and rename it from intel-uncore-frequency.c to uncore-frequency.c

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 10 ----------
drivers/platform/x86/Makefile | 5 -----
drivers/platform/x86/intel/Kconfig | 12 +++++++++++-
drivers/platform/x86/intel/Makefile | 2 ++
.../uncore-frequency.c} | 0
5 files changed, 13 insertions(+), 16 deletions(-)
rename drivers/platform/x86/{intel-uncore-frequency.c => intel/uncore-frequency.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 666103c7f0de..f0e3d9dc71a4 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1111,16 +1111,6 @@ config INTEL_IMR

source "drivers/platform/x86/intel_speed_select_if/Kconfig"

-config INTEL_UNCORE_FREQ_CONTROL
- tristate "Intel Uncore frequency control driver"
- depends on X86_64
- help
- This driver allows control of uncore frequency limits on
- supported server platforms.
- Uncore frequency controls RING/LLC (last-level cache) clocks.
-
- To compile this driver as a module, choose M here: the module
- will be called intel-uncore-frequency.

endif # X86_PLATFORM_DEVICES

diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index fb39644db7f9..e028c8dbb7cc 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -120,11 +120,6 @@ obj-$(CONFIG_TOUCHSCREEN_DMI) += touchscreen_dmi.o
obj-$(CONFIG_WIRELESS_HOTKEY) += wireless-hotkey.o

# Intel uncore drivers
-
-
obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += intel_speed_select_if/

-obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o
-
-
obj-$(CONFIG_PMC_ATOM) += pmc_atom.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 8070804fe916..3763ed816919 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -98,7 +98,6 @@ config INTEL_SMARTCONNECT
This driver checks to determine whether the device has Intel Smart
Connect enabled, and if so disables it.

-
config INTEL_TURBO_MAX_3
bool "Intel Turbo Boost Max Technology 3.0 enumeration driver"
depends on X86_64 && SCHED_MC_PRIO
@@ -109,4 +108,15 @@ config INTEL_TURBO_MAX_3
This driver is only required when the system is not using Hardware
P-States (HWP). In HWP mode, priority can be read from ACPI tables.

+config INTEL_UNCORE_FREQ_CONTROL
+ tristate "Intel Uncore frequency control driver"
+ depends on X86_64
+ help
+ This driver allows control of uncore frequency limits on
+ supported server platforms.
+ Uncore frequency controls RING/LLC (last-level cache) clocks.
+
+ To compile this driver as a module, choose M here: the module
+ will be called intel-uncore-frequency.
+
endif # X86_PLATFORM_DRIVERS_INTEL
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index cff65fa2b1aa..44b1fe372b44 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -35,3 +35,5 @@ intel-smartconnect-y := smartconnect.o
obj-$(CONFIG_INTEL_SMARTCONNECT) += intel-smartconnect.o
intel_turbo_max_3-y := turbo_max_3.o
obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
+intel-uncore-frequency-y := uncore-frequency.o
+obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o
\ No newline at end of file
diff --git a/drivers/platform/x86/intel-uncore-frequency.c b/drivers/platform/x86/intel/uncore-frequency.c
similarity index 100%
rename from drivers/platform/x86/intel-uncore-frequency.c
rename to drivers/platform/x86/intel/uncore-frequency.c
--
2.31.1

2021-08-16 10:59:17

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 16/20] platform/x86: intel_int0002_vgpio: Move to intel sub-directory

Move intel_int0002_vgpio to intel sub-directory to improve
readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 19 -------------------
drivers/platform/x86/Makefile | 1 -
drivers/platform/x86/intel/Kconfig | 19 +++++++++++++++++++
drivers/platform/x86/intel/Makefile | 2 ++
.../int0002_vgpio.c} | 0
5 files changed, 21 insertions(+), 20 deletions(-)
rename drivers/platform/x86/{intel_int0002_vgpio.c => intel/int0002_vgpio.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 84865e1cf043..7274b586170d 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -667,25 +667,6 @@ config THINKPAD_LMI

source "drivers/platform/x86/intel/Kconfig"

-config INTEL_INT0002_VGPIO
- tristate "Intel ACPI INT0002 Virtual GPIO driver"
- depends on GPIOLIB && ACPI && PM_SLEEP
- select GPIOLIB_IRQCHIP
- help
- Some peripherals on Bay Trail and Cherry Trail platforms signal a
- Power Management Event (PME) to the Power Management Controller (PMC)
- to wakeup the system. When this happens software needs to explicitly
- clear the PME bus 0 status bit in the GPE0a_STS register to avoid an
- IRQ storm on IRQ 9.
-
- This is modelled in ACPI through the INT0002 ACPI device, which is
- called a "Virtual GPIO controller" in ACPI because it defines the
- event handler to call when the PME triggers through _AEI and _L02
- methods as would be done for a real GPIO interrupt in ACPI.
-
- To compile this driver as a module, choose M here: the module will
- be called intel_int0002_vgpio.
-
config INTEL_MENLOW
tristate "Thermal Management driver for Intel menlow platform"
depends on ACPI_THERMAL
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 734a6c266025..4c9a47936e65 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -71,7 +71,6 @@ obj-$(CONFIG_THINKPAD_LMI) += think-lmi.o
# Intel
obj-$(CONFIG_X86_PLATFORM_DRIVERS_INTEL) += intel/

-obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
obj-$(CONFIG_INTEL_MENLOW) += intel_menlow.o
obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o
obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 4ca7bec080e7..cf56a1c4474b 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -34,6 +34,25 @@ config INTEL_HID_EVENT
To compile this driver as a module, choose M here: the module will
be called intel_hid.

+config INTEL_INT0002_VGPIO
+ tristate "Intel ACPI INT0002 Virtual GPIO driver"
+ depends on GPIOLIB && ACPI && PM_SLEEP
+ select GPIOLIB_IRQCHIP
+ help
+ Some peripherals on Bay Trail and Cherry Trail platforms signal a
+ Power Management Event (PME) to the Power Management Controller (PMC)
+ to wakeup the system. When this happens software needs to explicitly
+ clear the PME bus 0 status bit in the GPE0a_STS register to avoid an
+ IRQ storm on IRQ 9.
+
+ This is modelled in ACPI through the INT0002 ACPI device, which is
+ called a "Virtual GPIO controller" in ACPI because it defines the
+ event handler to call when the PME triggers through _AEI and _L02
+ methods as would be done for a real GPIO interrupt in ACPI.
+
+ To compile this driver as a module, choose M here: the module will
+ be called intel_int0002_vgpio.
+
config INTEL_BXTWC_PMIC_TMU
tristate "Intel BXT Whiskey Cove TMU Driver"
depends on REGMAP
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index e47e6ac4b5eb..23503798b533 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -12,6 +12,8 @@ obj-$(CONFIG_INTEL_ATOMISP2_PM) += atomisp2/
CFLAGS_hid.o := -I./drivers/platform/x86
intel-hid-y := hid.o
obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o
+intel_int0002_vgpio-y := int0002_vgpio.o
+obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o

# Intel PMIC / PMC / P-Unit devices
intel_bxtwc_tmu-y := bxtwc_tmu.o
diff --git a/drivers/platform/x86/intel_int0002_vgpio.c b/drivers/platform/x86/intel/int0002_vgpio.c
similarity index 100%
rename from drivers/platform/x86/intel_int0002_vgpio.c
rename to drivers/platform/x86/intel/int0002_vgpio.c
--
2.31.1

2021-08-16 10:59:57

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 19/20] platform/x86: intel-wmi-sbl-fw-updat: Move to intel sub-directory

Move intel-wmi-sbl-fw-updat to intel sub-directory to improve
readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 10 ----------
drivers/platform/x86/Makefile | 2 +-
drivers/platform/x86/intel/Kconfig | 3 +++
drivers/platform/x86/intel/Makefile | 3 +++
drivers/platform/x86/intel/wmi/Kconfig | 14 ++++++++++++++
drivers/platform/x86/intel/wmi/Makefile | 7 +++++++
.../wmi/sbl-fw-update.c} | 0
7 files changed, 28 insertions(+), 11 deletions(-)
create mode 100644 drivers/platform/x86/intel/wmi/Kconfig
create mode 100644 drivers/platform/x86/intel/wmi/Makefile
rename drivers/platform/x86/{intel-wmi-sbl-fw-update.c => intel/wmi/sbl-fw-update.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 3a087cb140cb..a5b0a654e028 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -77,16 +77,6 @@ config UV_SYSFS
To compile this driver as a module, choose M here: the module will
be called uv_sysfs.

-config INTEL_WMI_SBL_FW_UPDATE
- tristate "Intel WMI Slim Bootloader firmware update signaling driver"
- depends on ACPI_WMI
- help
- Say Y here if you want to be able to use the WMI interface to signal
- Slim Bootloader to trigger update on next reboot.
-
- To compile this driver as a module, choose M here: the module will
- be called intel-wmi-sbl-fw-update.
-
config INTEL_WMI_THUNDERBOLT
tristate "Intel WMI thunderbolt force power driver"
depends on ACPI_WMI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index a6d90dc56d62..60015a4c6b6c 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_WMI_BMOF) += wmi-bmof.o

# WMI drivers
obj-$(CONFIG_HUAWEI_WMI) += huawei-wmi.o
-obj-$(CONFIG_INTEL_WMI_SBL_FW_UPDATE) += intel-wmi-sbl-fw-update.o
+
obj-$(CONFIG_INTEL_WMI_THUNDERBOLT) += intel-wmi-thunderbolt.o
obj-$(CONFIG_MXM_WMI) += mxm-wmi.o
obj-$(CONFIG_PEAQ_WMI) += peaq-wmi.o
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index f69fc6b004cf..b6b2a9e8a490 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -177,4 +177,7 @@ config INTEL_UNCORE_FREQ_CONTROL
To compile this driver as a module, choose M here: the module
will be called intel-uncore-frequency.

+source "drivers/platform/x86/intel/wmi/Kconfig"
+
+
endif # X86_PLATFORM_DRIVERS_INTEL
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index 58d4ff0502b0..794aa821611b 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -50,3 +50,6 @@ obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
intel-uncore-frequency-y := uncore-frequency.o
obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o
obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += speed_select_if/
+
+#WMI drivers
+obj-$(CONFIG_INTEL_WMI_SBL_FW_UPDATE) += wmi/
diff --git a/drivers/platform/x86/intel/wmi/Kconfig b/drivers/platform/x86/intel/wmi/Kconfig
new file mode 100644
index 000000000000..fc70728e0f1f
--- /dev/null
+++ b/drivers/platform/x86/intel/wmi/Kconfig
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Intel x86 Platform Specific Drivers
+#
+
+config INTEL_WMI_SBL_FW_UPDATE
+ tristate "Intel WMI Slim Bootloader firmware update signaling driver"
+ depends on ACPI_WMI
+ help
+ Say Y here if you want to be able to use the WMI interface to signal
+ Slim Bootloader to trigger update on next reboot.
+
+ To compile this driver as a module, choose M here: the module will
+ be called intel-wmi-sbl-fw-update.
diff --git a/drivers/platform/x86/intel/wmi/Makefile b/drivers/platform/x86/intel/wmi/Makefile
new file mode 100644
index 000000000000..bf1f118b6839
--- /dev/null
+++ b/drivers/platform/x86/intel/wmi/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Intel x86 Platform Specific Drivers
+#
+
+intel-wmi-sbl-fw-update-y := sbl-fw-update.o
+obj-$(CONFIG_INTEL_WMI_SBL_FW_UPDATE) += intel-wmi-sbl-fw-update.o
diff --git a/drivers/platform/x86/intel-wmi-sbl-fw-update.c b/drivers/platform/x86/intel/wmi/sbl-fw-update.c
similarity index 100%
rename from drivers/platform/x86/intel-wmi-sbl-fw-update.c
rename to drivers/platform/x86/intel/wmi/sbl-fw-update.c
--
2.31.1

2021-08-16 11:00:04

by Kate Hsuan

[permalink] [raw]
Subject: [PATCH v2 20/20] platform/x86: intel-wmi-thunderbolt: Move to intel sub-directory

Move intel-wmi-thunderbolt to intel sub-directory to improve
readability.

Signed-off-by: Kate Hsuan <[email protected]>
---
drivers/platform/x86/Kconfig | 12 ------------
drivers/platform/x86/Makefile | 2 --
drivers/platform/x86/intel/Makefile | 1 +
drivers/platform/x86/intel/wmi/Kconfig | 12 ++++++++++++
drivers/platform/x86/intel/wmi/Makefile | 2 ++
.../wmi/thunderbolt.c} | 0
6 files changed, 15 insertions(+), 14 deletions(-)
rename drivers/platform/x86/{intel-wmi-thunderbolt.c => intel/wmi/thunderbolt.c} (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index a5b0a654e028..be2c91b2c3a7 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -77,18 +77,6 @@ config UV_SYSFS
To compile this driver as a module, choose M here: the module will
be called uv_sysfs.

-config INTEL_WMI_THUNDERBOLT
- tristate "Intel WMI thunderbolt force power driver"
- depends on ACPI_WMI
- help
- Say Y here if you want to be able to use the WMI interface on select
- systems to force the power control of Intel Thunderbolt controllers.
- This is useful for updating the firmware when devices are not plugged
- into the controller.
-
- To compile this driver as a module, choose M here: the module will
- be called intel-wmi-thunderbolt.
-
config MXM_WMI
tristate "WMI support for MXM Laptop Graphics"
depends on ACPI_WMI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 60015a4c6b6c..f8500a0439b3 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -10,8 +10,6 @@ obj-$(CONFIG_WMI_BMOF) += wmi-bmof.o

# WMI drivers
obj-$(CONFIG_HUAWEI_WMI) += huawei-wmi.o
-
-obj-$(CONFIG_INTEL_WMI_THUNDERBOLT) += intel-wmi-thunderbolt.o
obj-$(CONFIG_MXM_WMI) += mxm-wmi.o
obj-$(CONFIG_PEAQ_WMI) += peaq-wmi.o
obj-$(CONFIG_XIAOMI_WMI) += xiaomi-wmi.o
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index 794aa821611b..6ed28f14a4cf 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -53,3 +53,4 @@ obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += speed_select_if/

#WMI drivers
obj-$(CONFIG_INTEL_WMI_SBL_FW_UPDATE) += wmi/
+obj-$(CONFIG_INTEL_WMI_THUNDERBOLT) += wmi/
diff --git a/drivers/platform/x86/intel/wmi/Kconfig b/drivers/platform/x86/intel/wmi/Kconfig
index fc70728e0f1f..0d65fc90f5b1 100644
--- a/drivers/platform/x86/intel/wmi/Kconfig
+++ b/drivers/platform/x86/intel/wmi/Kconfig
@@ -12,3 +12,15 @@ config INTEL_WMI_SBL_FW_UPDATE

To compile this driver as a module, choose M here: the module will
be called intel-wmi-sbl-fw-update.
+
+config INTEL_WMI_THUNDERBOLT
+ tristate "Intel WMI thunderbolt force power driver"
+ depends on ACPI_WMI
+ help
+ Say Y here if you want to be able to use the WMI interface on select
+ systems to force the power control of Intel Thunderbolt controllers.
+ This is useful for updating the firmware when devices are not plugged
+ into the controller.
+
+ To compile this driver as a module, choose M here: the module will
+ be called intel-wmi-thunderbolt.
diff --git a/drivers/platform/x86/intel/wmi/Makefile b/drivers/platform/x86/intel/wmi/Makefile
index bf1f118b6839..c2d56d25dea0 100644
--- a/drivers/platform/x86/intel/wmi/Makefile
+++ b/drivers/platform/x86/intel/wmi/Makefile
@@ -5,3 +5,5 @@

intel-wmi-sbl-fw-update-y := sbl-fw-update.o
obj-$(CONFIG_INTEL_WMI_SBL_FW_UPDATE) += intel-wmi-sbl-fw-update.o
+intel-wmi-thunderbolt-y := thunderbolt.o
+obj-$(CONFIG_INTEL_WMI_THUNDERBOLT) += intel-wmi-thunderbolt.o
diff --git a/drivers/platform/x86/intel-wmi-thunderbolt.c b/drivers/platform/x86/intel/wmi/thunderbolt.c
similarity index 100%
rename from drivers/platform/x86/intel-wmi-thunderbolt.c
rename to drivers/platform/x86/intel/wmi/thunderbolt.c
--
2.31.1