我们在一个 iMX 设备树文件的i2c2节点中定义了模拟 videoIn adv7180元数据硬件定义。最终目的是从 i2c2 总线识别 adv7180 驱动程序。
在处理器的引导过程中,使用对 I2C 进行了 defconfig 更改的 linux 映像,第二个 I2C 总线未被识别。
下面给出的是串行控制台打印语句:
U-Boot 2015.10+fslc+g1b6aee7 (Jan 16 2018 - 14:57:01 +0530)
CPU: Freescale i.MX6Q rev1.2 996 MHz (running at 792 MHz)
CPU: Automotive temperature grade (-40C to 125C) at 26C
Reset cause: POR
Board: MX6-SabreSD
I2C: ready
Line 129: i2c i2c-1: IMX I2C adapter registered //i2c-2 not registered??
Line 272 onwards: i2c /dev entries driver
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR SANYO protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
mxc_v4l2_output v4l2_out.28: V4L2 device registered as video16
mxc_v4l2_output v4l2_out.28: V4L2 device registered as video17
i2c-core: driver [mag3110] using legacy suspend method
i2c-core: driver [mag3110] using legacy resume method
我已经在我的 Yocto Built 的源目录中的 defconfig 文件中编写了这些额外的行。
CONFIG_IMX_HAVE_PLATFORM_IMX_I2C=y
# CONFIG_I2C_COMPAT is not set
CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ALGOPCA=m
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_IMX=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX=y
我还检查了 Kconfig 文件,发现 i2c 驱动程序是从构建的内核源目录中传递的。
我是否必须对构建的 yocto路径中的 C 文件(驱动程序文件)进行修改?/home/fsl-community-bsp-myproject/build/tmp/work-shared/imx6qonlinepdd/kernel-source/drivers/i2c
子目录/drivers/media甚至还有一个 adv7180 的 C 文件,可以修改吗?