1 # SPDX-License-Identifier: GPL-2.0
3 # Makefile for the Linux kernel device drivers.
5 # 15 Sep 2000, Christoph Hellwig <hch@infradead.org>
6 # Rewritten to use lists instead of if-statements.
9 # Some driver Makefiles miss $(srctree)/ for include directive.
10 ifdef building_out_of_srctree
11 MAKEFLAGS += --include-dir=$(srctree)
18 obj-$(CONFIG_GENERIC_PHY) += phy/
20 # GPIO must come after pinctrl as gpios may need to mux pins etc
21 obj-$(CONFIG_PINCTRL) += pinctrl/
22 obj-$(CONFIG_GPIOLIB) += gpio/
27 obj-$(CONFIG_PARISC) += parisc/
28 obj-$(CONFIG_RAPIDIO) += rapidio/
32 # IPMI must come before ACPI in order to provide IPMI opregion support
35 obj-$(CONFIG_ACPI) += acpi/
37 # PnP must come after ACPI since it will eventually need to check if acpi
38 # was used and do nothing if so
39 obj-$(CONFIG_PNP) += pnp/
43 # Many drivers will want to use DMA so this has to be made available
45 obj-$(CONFIG_DMADEVICES) += dma/
47 # SOC specific infrastructure drivers.
49 obj-$(CONFIG_PM_GENERIC_DOMAINS) += genpd/
52 obj-$(CONFIG_VDPA) += vdpa/
53 obj-$(CONFIG_XEN) += xen/
55 # regulators early, since some subsystems rely on them to initialize
56 obj-$(CONFIG_REGULATOR) += regulator/
58 # reset controllers early, since gpu drivers might rely on them to initialize
59 obj-$(CONFIG_RESET_CONTROLLER) += reset/
61 # tty/ comes before char/ so that the VT console is the boot-time
66 # iommu/ comes before gpu as gpu are using iommu controllers
69 # gpu/ comes after char for AGP vs DRM startup and after iommu
72 obj-$(CONFIG_CONNECTOR) += connector/
74 # i810fb and intelfb depend on char/agp/
75 obj-$(CONFIG_FB_I810) += video/fbdev/i810/
76 obj-$(CONFIG_FB_INTEL) += video/fbdev/intelfb/
78 obj-$(CONFIG_PARPORT) += parport/
79 obj-y += base/ block/ misc/ mfd/ nfc/
80 obj-$(CONFIG_LIBNVDIMM) += nvdimm/
82 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
83 obj-$(CONFIG_NUBUS) += nubus/
88 obj-$(CONFIG_ATA) += ata/
89 obj-$(CONFIG_TARGET_CORE) += target/
90 obj-$(CONFIG_MTD) += mtd/
91 obj-$(CONFIG_SPI) += spi/
92 obj-$(CONFIG_SPMI) += spmi/
93 obj-$(CONFIG_HSI) += hsi/
94 obj-$(CONFIG_SLIMBUS) += slimbus/
96 obj-$(CONFIG_ATM) += atm/
97 obj-$(CONFIG_FUSION) += message/
99 obj-$(CONFIG_UIO) += uio/
100 obj-$(CONFIG_VFIO) += vfio/
103 obj-$(CONFIG_PCCARD) += pcmcia/
104 obj-$(CONFIG_DIO) += dio/
105 obj-$(CONFIG_SBUS) += sbus/
106 obj-$(CONFIG_ZORRO) += zorro/
107 obj-$(CONFIG_ATA_OVER_ETH) += block/aoe/
108 obj-$(CONFIG_TC) += tc/
109 obj-$(CONFIG_USB_PHY) += usb/
110 obj-$(CONFIG_USB) += usb/
111 obj-$(CONFIG_USB_SUPPORT) += usb/
112 obj-$(CONFIG_PCI) += usb/
113 obj-$(CONFIG_USB_GADGET) += usb/
114 obj-$(CONFIG_OF) += usb/
115 obj-$(CONFIG_SERIO) += input/serio/
116 obj-$(CONFIG_GAMEPORT) += input/gameport/
117 obj-$(CONFIG_INPUT) += input/
118 obj-$(CONFIG_RTC_LIB) += rtc/
119 obj-y += i2c/ i3c/ media/
120 obj-$(CONFIG_PPS) += pps/
122 obj-$(CONFIG_W1) += w1/
124 obj-$(CONFIG_HWMON) += hwmon/
125 obj-$(CONFIG_THERMAL) += thermal/
126 obj-$(CONFIG_WATCHDOG) += watchdog/
127 obj-$(CONFIG_MD) += md/
128 obj-$(CONFIG_BT) += bluetooth/
129 obj-$(CONFIG_ACCESSIBILITY) += accessibility/
130 obj-$(CONFIG_ISDN) += isdn/
131 obj-$(CONFIG_EDAC) += edac/
132 obj-$(CONFIG_EISA) += eisa/
133 obj-$(CONFIG_PM_OPP) += opp/
134 obj-$(CONFIG_CPU_FREQ) += cpufreq/
135 obj-$(CONFIG_CPU_IDLE) += cpuidle/
138 obj-$(CONFIG_MEMSTICK) += memstick/
139 obj-$(CONFIG_NEW_LEDS) += leds/
140 obj-$(CONFIG_INFINIBAND) += infiniband/
142 obj-$(CONFIG_CRYPTO) += crypto/
143 obj-$(CONFIG_SUPERH) += sh/
144 obj-y += clocksource/
145 obj-$(CONFIG_DCA) += dca/
146 obj-$(CONFIG_HID_SUPPORT) += hid/
147 obj-$(CONFIG_PPC_PS3) += ps3/
148 obj-$(CONFIG_OF) += of/
149 obj-$(CONFIG_SSB) += ssb/
150 obj-$(CONFIG_BCMA) += bcma/
151 obj-$(CONFIG_VHOST_RING) += vhost/
152 obj-$(CONFIG_VHOST_IOTLB) += vhost/
153 obj-$(CONFIG_VHOST) += vhost/
154 obj-$(CONFIG_VLYNQ) += vlynq/
155 obj-$(CONFIG_GREYBUS) += greybus/
156 obj-$(CONFIG_COMEDI) += comedi/
157 obj-$(CONFIG_STAGING) += staging/
160 obj-$(CONFIG_MAILBOX) += mailbox/
161 obj-$(CONFIG_HWSPINLOCK) += hwspinlock/
162 obj-$(CONFIG_REMOTEPROC) += remoteproc/
163 obj-$(CONFIG_RPMSG) += rpmsg/
164 obj-$(CONFIG_SOUNDWIRE) += soundwire/
166 # Virtualization drivers
167 obj-$(CONFIG_VIRT_DRIVERS) += virt/
168 obj-$(subst m,y,$(CONFIG_HYPERV)) += hv/
170 obj-$(CONFIG_PM_DEVFREQ) += devfreq/
171 obj-$(CONFIG_EXTCON) += extcon/
172 obj-$(CONFIG_MEMORY) += memory/
173 obj-$(CONFIG_IIO) += iio/
174 obj-$(CONFIG_IPACK_BUS) += ipack/
175 obj-$(CONFIG_NTB) += ntb/
176 obj-$(CONFIG_POWERCAP) += powercap/
177 obj-$(CONFIG_MCB) += mcb/
178 obj-$(CONFIG_PERF_EVENTS) += perf/
179 obj-$(CONFIG_RAS) += ras/
180 obj-$(CONFIG_USB4) += thunderbolt/
181 obj-$(CONFIG_CORESIGHT) += hwtracing/coresight/
182 obj-y += hwtracing/intel_th/
183 obj-$(CONFIG_STM) += hwtracing/stm/
184 obj-$(CONFIG_HISI_PTT) += hwtracing/ptt/
186 obj-$(CONFIG_NVMEM) += nvmem/
187 obj-$(CONFIG_FPGA) += fpga/
188 obj-$(CONFIG_FSI) += fsi/
189 obj-$(CONFIG_TEE) += tee/
190 obj-$(CONFIG_MULTIPLEXER) += mux/
191 obj-$(CONFIG_SIOX) += siox/
192 obj-$(CONFIG_GNSS) += gnss/
193 obj-$(CONFIG_INTERCONNECT) += interconnect/
194 obj-$(CONFIG_COUNTER) += counter/
195 obj-$(CONFIG_MOST) += most/
196 obj-$(CONFIG_PECI) += peci/
197 obj-$(CONFIG_HTE) += hte/
198 obj-$(CONFIG_DRM_ACCEL) += accel/
199 obj-$(CONFIG_CDX_BUS) += cdx/
201 obj-$(CONFIG_S390) += s390/