| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Problem:
When enumerating device tree nodes, platform bus and native buses (I2C/SPI)
may create duplicate devices for the same OFW node, causing cross-bus conflicts.
This triggers assertion failure '(dev->bus != new_bus)' in
rt_bus_reload_driver_device() during boot on minimal DM-enabled systems.
Root Cause:
1. Platform bus tries to reload devices that already belong to other buses
by calling rt_bus_reload_driver_device(dev->bus, dev), which violates
the API contract (requires dev->bus != new_bus).
2. Native buses (I2C/SPI) do not mark OFW nodes as occupied, so platform
bus creates duplicate platform devices for I2C/SPI client nodes.
Solution:
1. components/drivers/core/platform_ofw.c: Return RT_EOK when np->dev exists,
letting the native bus handle device lifecycle instead of cross-bus reload.
2. components/drivers/i2c/dev_i2c_bus.c: Mark i2c_client_np->dev during scan
to prevent platform bus from duplicating I2C client devices.
3. components/drivers/spi/dev_spi_bus.c: Mark spi_dev_np->dev during scan
to prevent platform bus from duplicating SPI devices.
Tested on Spacemit K1 RISC-V platform with minimal DM configuration.
Signed-off-by: lhxj <[email protected]>
|
|
- Add RT_USING_SPI_BITOPS as a separate configurable option
- Make RT_USING_SOFT_SPI depend on RT_USING_SPI_BITOPS
- Adjust build order in SConscript for proper com
Signed-off-by: Runcheng Lu <[email protected]>
|
|
DM need > c99
Signed-off-by: GuEe-GUI <[email protected]>
|
|
Signed-off-by: GuEe-GUI <[email protected]>
|
|
|
|
|
|
|
|
* Make a priv data read API for probed SPI device
* Fixup the SPI device pre-alloc
|
|
rt_qspi_send_then_recv API and rt_qspi_send API
- Ensure correct QSPI message chaining by setting next pointer to NULL, preventing unintended data transmission issues.
Signed-off-by: Runcheng Lu <[email protected]>
|
|
to NULL for qspi_read API
- Ensure correct QSPI message chaining by setting next pointer to NULL, preventing unintended data transmission issues
Signed-off-by: Runcheng Lu <[email protected]>
|
|
`chip_select` is array now, should use index of value.
|
|
Make a max CS pin value (16) for SPI, that will not
alloc `*cs_pins` by malloc, because drivers call
`rt_device_unregister` may not free item.
Fixup the QSPI init configure member in DM mode.
Make SoC Kconfig import easy.
Signed-off-by: GuEe-GUI <[email protected]>
|
|
* [drivers/spi]修复spi configure会执行两次的问题
|
|
|
|
* fix:spi bus issue
* [components][drivers]add software SPI bus support
|
|
Signed-off-by: GuEe-GUI <[email protected]>
|
|
|
|
configuration
|
|
|
|
返回值,并增加说明注释
|
|
https://github.com/RT-Thread/rt-thread/pull/9420
|
|
* 移除初始化时未进行引脚初始化就进行引脚设置可能导致的异常
* CS引脚配置判断完善
* xfer返回值优化
|
|
整理 components/drivers 的 Kconfig
|
|
为什么提交这份PR (why to submit this PR)
ps:在设备初始化阶段不应该存在对硬件的操作
你的解决方案是什么 (what is your solution)
ps:添加一个pin_init函数,在spi设备使用时调用该函数来完成硬件引脚的状态初始化,而不是在设备初始化阶段对硬件进行操作,已经在瑞萨HMI上通过验证
|
|
|
|
|
|
|
|
GCC like means the toolchains which are compatible with GCC
|
|
If the configurations are the same, we don't need to set again.
|
|
rt_spi_send_then_recv是先发再等待一个独立的消息接收
rt_spi_transfer是收发同时进行
rt_spi_sendrecv8/16应使用rt_spi_transfer而不是rt_spi_send_then_recv
|
|
|
|
(#7474)
Signed-off-by: a1012112796 <[email protected]>
Co-authored-by: Man, Jianting (Meco) <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
修正SPI设备框架中,对函数返回值类型使用不恰当的情况 (#6937)
|
|
|
|
|
|
|
|
这个函数实现了原先的挂载功能,并且调用pin框架,初始化cs引脚,是一个功能相对完善的挂载函数。用户也能更简单的使用。
该函数取代rt_spi_bus_attach_device,后续rt_spi_bus_attach_device会被逐渐淘汰掉。新的BSP以及软件包应当使用rt_spi_bus_attach_device_cspin新函数。
STM32L475潘多拉测试通过。
|
|
rt_ssize_t can give negative error code, which follows the unix style correctly
|
|
|
|
* [softspi]soft spi attach函数问题解决方案
* 更改函数名
|
|
attach #6819
|
|
* [spi]attach 片选引脚依赖pin框架
* 修改attach函数
|