工具与软件:
您好!
我正在尝试启用新的虚拟 CSI-2传感器、但无法构建驱动程序。
如相关问题所述、我做了以下工作:
- 在 drivers/media/i2c 下添加传感器驱动程序源代码
- 在 drivers/media/i2c/Kconfig 中添加传感器配置
- 启用 drivers/media/i2c/Makefile 中的传感器驱动程序编译
- 在 arch/arm64/configs/defconfig 中启用传感器的内核模块
- 为传感器创建器件树叠加层并将其添加到 arch/arm64/boot/dts/ti (更新了格式以匹配其他包含的传感器)
- 向 arch/arm64/boot/dts/ti/Makefile 添加了器件树叠加层。
传感器显示在器件树中、CSI2 Rx 似乎已正确探测。
root@j722s-evm:/proc/device-tree# ls | grep sensor sensor root@j722s-evm:/proc/device-tree# dmesg | grep csi2 [ 7.937727] platform sensor: Fixed dependency cycle(s) with /bus@f0000/ticsi2rx@30102000/csi-bridge@30101000 [ 9.004053] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY
不过、当我尝试查询传感器时、不会显示传感器、只有 csi2rx。
root@j722s-evm:/proc/device-tree# v4l2-ctl --list-devices
TI-CSI2RX (platform:30102000.ticsi2rx):
/dev/media0
wave5-dec (platform:30210000.video-codec):
/dev/video0
/dev/video1
root@j722s-evm:/proc/device-tree# media-ctl -p
Media controller API version 6.6.32
Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:30102000.ticsi2rx
hw revision 0x1
driver version 6.6.32
Device topology
- entity 1: 30102000.ticsi2rx (7 pads, 0 link, 0 routes)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
pad1: Source
pad2: Source
pad3: Source
pad4: Source
pad5: Source
pad6: Source
- entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 0 link, 0 routes)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
pad1: Source
pad2: Source
pad3: Source
pad4: Source
在执行 make Linux 后查看日志、似乎没有构建 dummy-sensor.c (但 media/i2c 下的其他驱动程序是):
... LD [M] drivers/media/i2c/ds90ub953.ko LD [M] drivers/media/i2c/ds90ub960.ko LD [M] drivers/media/i2c/imx219.ko LD [M] drivers/media/i2c/imx390.ko LD [M] drivers/media/i2c/imx412.ko LD [M] drivers/media/i2c/ov2312.ko LD [M] drivers/media/i2c/ov5640.ko LD [M] drivers/media/i2c/ov5645.ko LD [M] drivers/media/i2c/ox05b1s.ko ...
与 IMX219驱动程序相比、我似乎要添加相同的更改来启用虚拟传感器、但出于某种原因、在 make Linux 期间跳过了虚拟传感器。
- 我在驱动程序代码中添加了拼写错误以查看使 Linux 抛出错误-该错误不是针对 dummy-sensor.c、而是针对 imx219.c
问题
- 是什么导致构建上述特定的/media/i2c 驱动程序、而 defconfig 和 Makefile 中定义的其他驱动程序不是?
- 为什么可能导致跳过虚拟传感器驱动程序?
谢谢!
Jin

