user@desktop:~/ddcci-plasmoid$ find /lib/modules/$(uname -r) -name i2c-dev
• 不返回任何内容
user@desktop:~/ddcci-plasmoid$ lsmod | grep i2c_dev
• 不返回任何内容
答案1
你不知道!
默认情况下,i2c-dev
它被编译到内核中,而不是作为单独的模块,这就是为什么你找不到它。
搜索内核头文件grep -R i2c-dev /usr/src/linux-headers-$(uname -r)/
通常是一个有用的技巧,可以发现这类东西,这就是我在其中发现它的方法drivers/i2c/Kconfig
:
config I2C_CHARDEV
tristate "I2C device interface"
help
Say Y here to use i2c-* device files, usually found in the /dev
directory on your system. They make it possible to have user-space
programs use the I2C bus. Information on how to do this is
contained in the file <file:Documentation/i2c/dev-interface.rst>.
This support is also available as a module. If so, the module
will be called i2c-dev.
您可以通过运行以下命令来确认它是否内置:grep I2C_CHARDEV /boot/config-$(uname -r)
,该命令将返回:
CONFIG_I2C_CHARDEV=y
而不是像模块那样:
CONFIG_I2C_CHARDEV=m