驱动路径:kernel/drivers/iio/imu/tdk_icm42686
内核配置:
Device Drivers
<*> Industrial I/O support --->
Inertial measurement units --->
< > TDK ICM42686 SPI driver
为了menuconfig配置及编译icm42686,配置iio/imu/tdk_icm42686路径下的Kconfig和Makefile,如下:
Kconfig :
#
# ICM42686 IMU driver
#
config ICM42686
tristate
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
config ICM42686_SPI
tristate "TDK ICM42686 SPI driver"
depends on SPI
select ICM42686
select REGMAP_SPI
help
If you say yes here you get support for ICM42686 IMU on SPI with
accelerometer, gyroscope and external ICM42686 magnetometer.
This driver can also be built as a module. If so, the module will be
called icm42686_spi.
Makefile :
#
# Makefile for TDK ICM42686 IMU
#
obj-$(CONFIG_ICM42686_SPI) += icm42686.o
这两个文件的关联性 :
Kconfig : config ICM42686_SPI
Makefile : obj-$(CONFIG_ICM42686_SPI)