platform/x86: intel: Add 'intel' prefix to the modules automatically

Rework Makefile to add 'intel' prefix to the modules automatically.
This removes a lot of boilerplate code in it and also makes robust
against mistypos in the prefix.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20241016105950.785820-2-andriy.shevchenko@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Andy Shevchenko
2024-10-16 13:59:51 +03:00
committed by Ilpo Järvinen
parent f164dd0bf4
commit df7f9acd86
3 changed files with 30 additions and 40 deletions

View File

@@ -17,50 +17,40 @@ obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += uncore-frequency/
# Intel input drivers # Intel input drivers
intel-hid-y := hid.o intel-target-$(CONFIG_INTEL_HID_EVENT) += hid.o
obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o intel-target-$(CONFIG_INTEL_VBTN) += vbtn.o
intel-vbtn-y := vbtn.o
obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o
# Intel miscellaneous drivers # Intel miscellaneous drivers
obj-$(CONFIG_INTEL_ISHTP_ECLITE) += ishtp_eclite.o intel-target-$(CONFIG_INTEL_INT0002_VGPIO) += int0002_vgpio.o
intel_int0002_vgpio-y := int0002_vgpio.o intel-target-$(CONFIG_INTEL_ISHTP_ECLITE) += ishtp_eclite.o
obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o intel-target-$(CONFIG_INTEL_OAKTRAIL) += oaktrail.o
intel_oaktrail-y := oaktrail.o intel-target-$(CONFIG_INTEL_SDSI) += sdsi.o
obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o intel-target-$(CONFIG_INTEL_VSEC) += vsec.o
intel_sdsi-y := sdsi.o
obj-$(CONFIG_INTEL_SDSI) += intel_sdsi.o
intel_vsec-y := vsec.o
obj-$(CONFIG_INTEL_VSEC) += intel_vsec.o
# Intel PMIC / PMC / P-Unit drivers # Intel PMIC / PMC / P-Unit drivers
intel_bxtwc_tmu-y := bxtwc_tmu.o intel-target-$(CONFIG_INTEL_BYTCRC_PWRSRC) += bytcrc_pwrsrc.o
obj-$(CONFIG_INTEL_BXTWC_PMIC_TMU) += intel_bxtwc_tmu.o intel-target-$(CONFIG_INTEL_BXTWC_PMIC_TMU) += bxtwc_tmu.o
intel_crystal_cove_charger-y := crystal_cove_charger.o intel-target-$(CONFIG_INTEL_CHTDC_TI_PWRBTN) += chtdc_ti_pwrbtn.o
obj-$(CONFIG_X86_ANDROID_TABLETS) += intel_crystal_cove_charger.o intel-target-$(CONFIG_INTEL_CHTWC_INT33FE) += chtwc_int33fe.o
intel_bytcrc_pwrsrc-y := bytcrc_pwrsrc.o intel-target-$(CONFIG_X86_ANDROID_TABLETS) += crystal_cove_charger.o
obj-$(CONFIG_INTEL_BYTCRC_PWRSRC) += intel_bytcrc_pwrsrc.o intel-target-$(CONFIG_INTEL_MRFLD_PWRBTN) += mrfld_pwrbtn.o
intel_chtdc_ti_pwrbtn-y := chtdc_ti_pwrbtn.o intel-target-$(CONFIG_INTEL_PUNIT_IPC) += punit_ipc.o
obj-$(CONFIG_INTEL_CHTDC_TI_PWRBTN) += intel_chtdc_ti_pwrbtn.o
intel_chtwc_int33fe-y := chtwc_int33fe.o
obj-$(CONFIG_INTEL_CHTWC_INT33FE) += intel_chtwc_int33fe.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
# TPMI drivers # TPMI drivers
intel_vsec_tpmi-y := tpmi.o intel-target-$(CONFIG_INTEL_PLR_TPMI) += plr_tpmi.o
obj-$(CONFIG_INTEL_TPMI) += intel_vsec_tpmi.o intel-target-$(CONFIG_INTEL_TPMI_POWER_DOMAINS) += tpmi_power_domains.o
obj-$(CONFIG_INTEL_PLR_TPMI) += intel_plr_tpmi.o intel-target-$(CONFIG_INTEL_TPMI) += vsec_tpmi.o
intel_tpmi_power_domains-y := tpmi_power_domains.o
obj-$(CONFIG_INTEL_TPMI_POWER_DOMAINS) += intel_tpmi_power_domains.o
# Intel Uncore drivers # Intel Uncore drivers
intel-rst-y := rst.o intel-target-$(CONFIG_INTEL_RST) += rst.o
obj-$(CONFIG_INTEL_RST) += intel-rst.o intel-target-$(CONFIG_INTEL_SMARTCONNECT) += smartconnect.o
intel-smartconnect-y := smartconnect.o intel-target-$(CONFIG_INTEL_TURBO_MAX_3) += turbo_max_3.o
obj-$(CONFIG_INTEL_SMARTCONNECT) += intel-smartconnect.o
intel_turbo_max_3-y := turbo_max_3.o # Add 'intel' prefix to each module listed in intel-target-*
obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o define INTEL_OBJ_TARGET
intel-$(1)-y := $(1).o
obj-$(2) += intel-$(1).o
endef
$(foreach target, $(basename $(intel-target-y)), $(eval $(call INTEL_OBJ_TARGET,$(target),y)))
$(foreach target, $(basename $(intel-target-m)), $(eval $(call INTEL_OBJ_TARGET,$(target),m)))

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/* /*
* intel-tpmi : Driver to enumerate TPMI features and create devices * Driver to enumerate TPMI features and create devices
* *
* Copyright (c) 2023, Intel Corporation. * Copyright (c) 2023, Intel Corporation.
* All Rights Reserved. * All Rights Reserved.