You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When using a driver that uses RTIO (for example sensor async api provider), it will not default to the i2c_iodev_submit_fallback function if it has not been implemented by the driver.
IIRC - There was a reason why the auto-fallback was not implemented for bus-drivers. I think the run-time check was something we wanted to stay away from (it would apply both to those having it). However, I see for I2C and I3C we do have a run-time check that resolves in an error:
To move forward, we should standardize this pattern, by either:
Auto-fallback should the submit API is not implemented, or
Throw a compile-time error indicating that a particular bus-driver does not implement it, while the corresponding Kconfig flags are enabled (e.g: CONFIG_I2C_RTIO and CONFIG_SENSOR_ASYNC_API).
I would rather prefer No. 2, but TBD how that would be implemented.
Activity
ubieda commentedon Apr 16, 2025
Thanks for capturing the issue.
IIRC - There was a reason why the auto-fallback was not implemented for bus-drivers. I think the run-time check was something we wanted to stay away from (it would apply both to those having it). However, I see for I2C and I3C we do have a run-time check that resolves in an error:
zephyr/include/zephyr/drivers/i2c.h
Lines 1053 to 1064 in e1a0350
zephyr/include/zephyr/drivers/i3c.h
Lines 2481 to 2492 in e1a0350
This is not consistent with SPI:
zephyr/include/zephyr/drivers/spi.h
Lines 1234 to 1241 in e1a0350
To move forward, we should standardize this pattern, by either:
I would rather prefer No. 2, but TBD how that would be implemented.
ubieda commentedon Apr 16, 2025
@teburd @yperess feel free to chime in here
teburd commentedon Apr 16, 2025
Compile time error is the right option here imho