@@ -16,39 +16,35 @@ obj-$(CONFIG_INTEL_WMI) += wmi/
16
16
obj-$(CONFIG_INTEL_UNCORE_FREQ_CONTROL) += uncore-frequency/
17
17
18
18
# Intel input drivers
19
- intel-hid-y := hid.o
20
- obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o
21
- intel-vbtn-y := vbtn.o
22
- obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o
19
+ intel-target-$(CONFIG_INTEL_HID_EVENT) += hid.o
20
+ intel-target-$(CONFIG_INTEL_VBTN) += vbtn.o
23
21
24
22
# Intel miscellaneous drivers
25
- obj-$(CONFIG_INTEL_ISHTP_ECLITE) += ishtp_eclite.o
26
- intel_int0002_vgpio-y := int0002_vgpio.o
27
- obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
28
- intel_oaktrail-y := oaktrail.o
29
- obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o
30
- intel_sdsi-y := sdsi.o
31
- obj-$(CONFIG_INTEL_SDSI) += intel_sdsi.o
32
- intel_vsec-y := vsec.o
33
- obj-$(CONFIG_INTEL_VSEC) += intel_vsec.o
23
+ intel-target-$(CONFIG_INTEL_INT0002_VGPIO) += int0002_vgpio.o
24
+ intel-target-$(CONFIG_INTEL_ISHTP_ECLITE) += ishtp_eclite.o
25
+ intel-target-$(CONFIG_INTEL_OAKTRAIL) += oaktrail.o
26
+ intel-target-$(CONFIG_INTEL_SDSI) += sdsi.o
27
+ intel-target-$(CONFIG_INTEL_VSEC) += vsec.o
34
28
35
29
# Intel PMIC / PMC / P-Unit drivers
36
30
obj-$(CONFIG_INTEL_CHT_INT33FE) += int33fe/
37
31
38
32
# TPMI drivers
39
- intel_vsec_tpmi-y := tpmi.o
40
- obj-$(CONFIG_INTEL_TPMI) += intel_vsec_tpmi.o
41
- obj-$(CONFIG_INTEL_PLR_TPMI) += intel_plr_tpmi.o
42
-
43
- intel_tpmi_power_domains-y := tpmi_power_domains.o
44
- obj-$(CONFIG_INTEL_TPMI_POWER_DOMAINS) += intel_tpmi_power_domains.o
33
+ intel-target-$(CONFIG_INTEL_PLR_TPMI) += plr_tpmi.o
34
+ intel-target-$(CONFIG_INTEL_TPMI_POWER_DOMAINS) += tpmi_power_domains.o
35
+ intel-target-$(CONFIG_INTEL_TPMI) += vsec_tpmi.o
45
36
46
37
# Intel Uncore drivers
47
- intel-rst-y := rst.o
48
- obj-$(CONFIG_INTEL_RST) += intel-rst.o
49
- intel-smartconnect-y := smartconnect.o
50
- obj-$(CONFIG_INTEL_SMARTCONNECT) += intel-smartconnect.o
51
- intel_turbo_max_3-y := turbo_max_3.o
52
- obj-$(CONFIG_INTEL_TURBO_MAX_3) += intel_turbo_max_3.o
53
-
38
+ intel-target-$(CONFIG_INTEL_RST) += rst.o
39
+ intel-target-$(CONFIG_INTEL_SMARTCONNECT) += smartconnect.o
40
+ intel-target-$(CONFIG_INTEL_TURBO_MAX_3) += turbo_max_3.o
41
+
42
+ # Add 'intel' prefix to each module listed in intel-target-*
43
+ define INTEL_OBJ_TARGET
44
+ intel-$(1 ) -y := $(1 ) .o
45
+ obj-$(2 ) += intel-$(1 ) .o
46
+ endef
47
+
48
+ $(foreach target, $(basename $(intel-target-y)), $(eval $(call INTEL_OBJ_TARGET,$(target),y)))
49
+ $(foreach target, $(basename $(intel-target-m)), $(eval $(call INTEL_OBJ_TARGET,$(target),m)))
54
50
0 commit comments