summaryrefslogtreecommitdiff
path: root/documentation/5.device/framework
diff options
context:
space:
mode:
authorChen Moushun <[email protected]>2026-11-08 15:48:35 +0900
committerGitHub <[email protected]>2026-11-08 14:48:35 +0800
commit37d8b8d1d0b8b39d9238cd86dac2a1ae79d190c1 (patch)
treedc1f99be08d7be9d4d8e82e5f9c2ac37f06dd9e6 /documentation/5.device/framework
parent2b0b1044c0ef4c49df5f27680635b48e405f7e86 (diff)
drivers/spi: QEMU virtual SPI loopback bus for utest (#11972) (#11979)
* drivers/spi: add QEMU virtual SPI loopback bus for utest (#11972) Register a pure-software SPI bus (default name spi2) with memcpy loopback xfer so components.drivers.spi.loopback passes on qemu-vexpress-a9 without a PL022 model. Fix utest include/CPPPATH and align Kconfig/rtconfig bus name. Verified: scons + qemu utest_run components.drivers.spi.loopback PASSED. Fixes #11972 (SPI/QEMU checklist item). * drivers/spi: fix clang-format violations in spi_virt_bus.c Fix the 'Check File Format and License' CI job failure: - put the spi_virt_ops initializer brace on the assignment line - add the missing newline at end of file No functional change. * drivers/spi: separate virt bus Kconfig from loopback utest (#11972) Add a dedicated, default-off RT_UTEST_SPI_VIRT_BUS switch (default name spi_virt) so enabling RT_UTEST_SPI_LOOPBACK no longer compiles or registers a software SPI bus. Hardware loopback now always runs on the real controller named by RT_UTEST_SPI_LOOPBACK_BUS_NAME, while QEMU/CI targets opt in to the virtual bus explicitly. Also move the utest enablement out of the qemu-vexpress-a9 BSP defaults and into ci.attachconfig as peripheral.SPI_VIRT_LOOPBACK. * cla: empty commit to retrigger license/cla check (#11979) * ci(utest): add A9 SPI loopback virt bus config (#11979) * [drivers][spi] gate virtual SPI bus utest on !RT_USING_DM RT_UTEST_SPI_VIRT_BUS compiles spi_virt_bus.c, which registers a software loopback bus with rt_spi_bus_register(). That path needs no device tree node, so on a BSP that enables RT_USING_DM and RT_USING_OFW the registration fails with -RT_EINVAL when no matching DT node exists. Add "depends on !RT_USING_DM" to the option and document in help that it is only available without the device model and must stay disabled on DM based BSPs. spi_virt_bus.c is already fully wrapped in #ifdef RT_UTEST_SPI_VIRT_BUS, so no C change is needed. The A9 utest config (bsp/qemu-vexpress-a9) has RT_USING_DM disabled, and .github/utest/configs/components/spi.cfg still enables both the virt bus and the loopback test with bus name "spi_virt", so CI coverage is kept. Refs #11972
Diffstat (limited to 'documentation/5.device/framework')
0 files changed, 0 insertions, 0 deletions