[PATCH v4 08/21] platform/x86: intel_ips: Move to intel sub-directory

From: Andy Shevchenko
Date: Thu Aug 19 2021 - 12:38:23 EST


From: Kate Hsuan <hpa@xxxxxxxxxx>

Move Intel IPS driver to intel sub-directory to improve readability
and rename it from intel_ips.c to ips.c.

The header file is deliberately left untouched and will be moved
as part of DRM subsystem development.

Signed-off-by: Kate Hsuan <hpa@xxxxxxxxxx>
Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/platform/x86/Kconfig | 10 ----------
drivers/platform/x86/Makefile | 1 -
drivers/platform/x86/intel/Kconfig | 10 ++++++++++
drivers/platform/x86/intel/Makefile | 4 ++++
drivers/platform/x86/{intel_ips.c => intel/ips.c} | 3 ++-
5 files changed, 16 insertions(+), 12 deletions(-)
rename drivers/platform/x86/{intel_ips.c => intel/ips.c} (99%)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index b6e32551a8f5..27af97d1407a 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1100,16 +1100,6 @@ config INTEL_IMR

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

-config INTEL_IPS
- tristate "Intel Intelligent Power Sharing"
- depends on ACPI && PCI
- help
- Intel Calpella platforms support dynamic power sharing between the
- CPU and GPU, maximizing performance in a given TDP. This driver,
- along with the CPU frequency and i915 drivers, provides that
- functionality. If in doubt, say Y here; it will only load on
- supported platforms.
-
config INTEL_RST
tristate "Intel Rapid Start Technology Driver"
depends on ACPI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 633cc14eba2c..fef347925d81 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -119,7 +119,6 @@ obj-$(CONFIG_TOUCHSCREEN_DMI) += touchscreen_dmi.o
obj-$(CONFIG_WIRELESS_HOTKEY) += wireless-hotkey.o

# Intel uncore drivers
-obj-$(CONFIG_INTEL_IPS) += intel_ips.o
obj-$(CONFIG_INTEL_RST) += intel-rst.o
obj-$(CONFIG_INTEL_SMARTCONNECT) += intel-smartconnect.o
obj-$(CONFIG_INTEL_SPEED_SELECT_INTERFACE) += intel_speed_select_if/
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index bedd3bdb0662..5f1dc8b1a874 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -62,4 +62,14 @@ 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.

+config INTEL_IPS
+ tristate "Intel Intelligent Power Sharing"
+ depends on ACPI && PCI
+ help
+ Intel Calpella platforms support dynamic power sharing between
+ the CPU and GPU, maximizing performance in a given TDP. This driver,
+ along with the CPU frequency and i915 drivers, provides that
+ functionality. If in doubt, say Y here; it will only load on
+ supported platforms.
+
endif # X86_PLATFORM_DRIVERS_INTEL
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index d446771dbff2..77cb50b90e67 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -21,3 +21,7 @@ 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
+
+# Intel Uncore drivers
+intel_ips-y := ips.o
+obj-$(CONFIG_INTEL_IPS) += intel_ips.o
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel/ips.c
similarity index 99%
rename from drivers/platform/x86/intel_ips.c
rename to drivers/platform/x86/intel/ips.c
index 4dfdbfca6841..0c86bdbcc5d5 100644
--- a/drivers/platform/x86/intel_ips.c
+++ b/drivers/platform/x86/intel/ips.c
@@ -62,7 +62,8 @@
#include <drm/i915_drm.h>
#include <asm/msr.h>
#include <asm/processor.h>
-#include "intel_ips.h"
+
+#include "../intel_ips.h"

#include <linux/io-64-nonatomic-lo-hi.h>

--
2.32.0