[PATCH 10/20] Move Intel SoC telemetry driver to intel directory to improve readability.

Kate Hsuan
2021-08-10T10:00:45Z

Signed-off-by: Kate Hsuan <hpa@redhat.com>
---
drivers/platform/x86/Kconfig | 13 -------------
drivers/platform/x86/Makefile | 3 ---
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 | 9 +++++++++
.../{ => intel/telemetry}/intel_telemetry_core.c | 0
.../telemetry}/intel_telemetry_debugfs.c | 0
.../telemetry}/intel_telemetry_pltdrv.c | 0
9 files changed, 27 insertions(+), 16 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}/intel_telemetry_core.c (100%)
rename drivers/platform/x86/{ => intel/telemetry}/intel_telemetry_debugfs.c (100%)
rename drivers/platform/x86/{ => intel/telemetry}/intel_telemetry_pltdrv.c (100%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index c8c58a8f0ef9..b14c3a2953db 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1085,19 +1085,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 72b1a4782d48..1d7acccf5e3a 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -126,7 +126,4 @@ obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += intel-uncore-frequency.o

-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 0f1543dc5299..02e7792d34b0 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -28,6 +28,7 @@ source "drivers/platform/x86/intel/pmc_core/Kconfig"
source "drivers/platform/x86/intel/pmt/Kconfig"
source "drivers/platform/x86/intel/punit/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 6fff503ba998..3edbd5209072 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -27,3 +27,4 @@ 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..af7a712ae90e
--- /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.
\ No newline at end of file
diff --git a/drivers/platform/x86/intel/telemetry/Makefile b/drivers/platform/x86/intel/telemetry/Makefile
new file mode 100644
index 000000000000..c28c45ee5e9c
--- /dev/null
+++ b/drivers/platform/x86/intel/telemetry/Makefile
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Intel x86 Platform Specific Drivers
+#
+
+
+obj-$(CONFIG_INTEL_TELEMETRY) += intel_telemetry_core.o \
+ intel_telemetry_pltdrv.o \
+ intel_telemetry_debugfs.o
\ No newline at end of file
diff --git a/drivers/platform/x86/intel_telemetry_core.c b/drivers/platform/x86/intel/telemetry/intel_telemetry_core.c
similarity index 100%
rename from drivers/platform/x86/intel_telemetry_core.c
rename to drivers/platform/x86/intel/telemetry/intel_telemetry_core.c
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel/telemetry/intel_telemetry_debugfs.c
similarity index 100%
rename from drivers/platform/x86/intel_telemetry_debugfs.c
rename to drivers/platform/x86/intel/telemetry/intel_telemetry_debugfs.c
diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c b/drivers/platform/x86/intel/telemetry/intel_telemetry_pltdrv.c
similarity index 100%
rename from drivers/platform/x86/intel_telemetry_pltdrv.c
rename to drivers/platform/x86/intel/telemetry/intel_telemetry_pltdrv.c
--
2.31.1