spi: Add RTIO support to SPI

Provides a macro and submit API for SPI drivers to support RTIO.

A copy function enables compatibility with the existing blocking API
and very easily the existing async API as well.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This commit is contained in:
Tom Burdick 2022-10-07 21:45:37 -05:00 committed by Carles Cufí
commit d9d24b4d65
4 changed files with 239 additions and 0 deletions

11
drivers/spi/spi_rtio.c Normal file
View file

@ -0,0 +1,11 @@
/*
* Copyright (c) 2023 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/spi.h>
const struct rtio_iodev_api spi_iodev_api = {
.submit = spi_iodev_submit,
};