Zephyr Project API 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
i3c.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Intel Corporation
3 * Copyright 2023 Meta Platforms, Inc. and its affiliates
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
14#ifndef ZEPHYR_INCLUDE_DRIVERS_I3C_H_
15#define ZEPHYR_INCLUDE_DRIVERS_I3C_H_
16
26#include <errno.h>
27#include <stdint.h>
28#include <stddef.h>
29
30#include <zephyr/device.h>
36#include <zephyr/drivers/i2c.h>
37#include <zephyr/sys/slist.h>
38#include <zephyr/sys/util.h>
39#include <zephyr/rtio/rtio.h>
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
92#define I3C_BCR_MAX_DATA_SPEED_LIMIT BIT(0)
93
95#define I3C_BCR_IBI_REQUEST_CAPABLE BIT(1)
96
104#define I3C_BCR_IBI_PAYLOAD_HAS_DATA_BYTE BIT(2)
105
112#define I3C_BCR_OFFLINE_CAPABLE BIT(3)
113
120#define I3C_BCR_VIRTUAL_TARGET BIT(4)
121
129#define I3C_BCR_ADV_CAPABILITIES BIT(5)
130
132#define I3C_BCR_DEVICE_ROLE_I3C_TARGET 0U
133
135#define I3C_BCR_DEVICE_ROLE_I3C_CONTROLLER_CAPABLE 1U
136
138#define I3C_BCR_DEVICE_ROLE_MASK GENMASK(7U, 6U)
139
147#define I3C_BCR_DEVICE_ROLE(bcr) \
148 FIELD_GET(I3C_BCR_DEVICE_ROLE_MASK, (bcr))
149
173#define I3C_LVR_I2C_FM_PLUS_MODE 0
174
176#define I3C_LVR_I2C_FM_MODE 1
177
179#define I3C_LVR_I2C_MODE_MASK BIT(4)
180
188#define I3C_LVR_I2C_MODE(lvr) \
189 FIELD_GET(I3C_LVR_I2C_MODE_MASK, (lvr))
190
197#define I3C_LVR_I2C_DEV_IDX_0 0
198
205#define I3C_LVR_I2C_DEV_IDX_1 1
206
213#define I3C_LVR_I2C_DEV_IDX_2 2
214
216#define I3C_LVR_I2C_DEV_IDX_MASK GENMASK(7U, 5U)
217
225#define I3C_LVR_I2C_DEV_IDX(lvr) \
226 FIELD_GET(I3C_LVR_I2C_DEV_IDX_MASK, (lvr))
227
260
276
301
308/*
309 * I3C_MSG_* are I3C Message flags.
310 */
311
313#define I3C_MSG_WRITE (0U << 0U)
314
316#define I3C_MSG_READ BIT(0)
317
319#define I3C_MSG_RW_MASK BIT(0)
323#define I3C_MSG_STOP BIT(1)
324
334#define I3C_MSG_RESTART BIT(2)
335
337#define I3C_MSG_HDR BIT(3)
338
340#define I3C_MSG_NBCH BIT(4)
341
343#define I3C_MSG_HDR_MODE0 BIT(0)
344
346#define I3C_MSG_HDR_MODE1 BIT(1)
347
349#define I3C_MSG_HDR_MODE2 BIT(2)
350
352#define I3C_MSG_HDR_MODE3 BIT(3)
353
355#define I3C_MSG_HDR_MODE4 BIT(4)
356
358#define I3C_MSG_HDR_MODE5 BIT(5)
359
361#define I3C_MSG_HDR_MODE6 BIT(6)
362
364#define I3C_MSG_HDR_MODE7 BIT(7)
365
367#define I3C_MSG_HDR_DDR I3C_MSG_HDR_MODE0
368
370#define I3C_MSG_HDR_TSP I3C_MSG_HDR_MODE1
371
373#define I3C_MSG_HDR_TSL I3C_MSG_HDR_MODE2
374
376#define I3C_MSG_HDR_BT I3C_MSG_HDR_MODE3
377
437
448
475
487
488 union {
491
498 void *ptr;
499 };
500};
501
508struct i3c_device_desc;
509struct i3c_device_id;
511struct i3c_target_config;
512struct i3c_config_target;
513
514__subsystem struct i3c_driver_api {
524 struct i2c_driver_api i2c_api;
525
538 int (*configure)(const struct device *dev,
539 enum i3c_config_type type, void *config);
540
553 int (*config_get)(const struct device *dev,
554 enum i3c_config_type type, void *config);
555#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
567 int (*recover_bus)(const struct device *dev);
568
581 int (*attach_i3c_device)(const struct device *dev,
582 struct i3c_device_desc *target);
583
597 int (*reattach_i3c_device)(const struct device *dev,
598 struct i3c_device_desc *target,
599 uint8_t old_dyn_addr);
600
613 int (*detach_i3c_device)(const struct device *dev,
614 struct i3c_device_desc *target);
615
628 int (*attach_i2c_device)(const struct device *dev,
629 struct i3c_i2c_device_desc *target);
630
643 int (*detach_i2c_device)(const struct device *dev,
644 struct i3c_i2c_device_desc *target);
645
657 int (*do_daa)(const struct device *dev);
658
671 int (*do_ccc)(const struct device *dev,
672 struct i3c_ccc_payload *payload);
673
686 int (*i3c_xfers)(const struct device *dev,
687 struct i3c_device_desc *target,
688 struct i3c_msg *msgs,
689 uint8_t num_msgs);
690
704 struct i3c_device_desc *(*i3c_device_find)(const struct device *dev,
705 const struct i3c_device_id *id);
706#endif /* CONFIG_I3C_CONTROLLER */
707#ifdef CONFIG_I3C_USE_IBI
708#if defined(CONFIG_I3C_TARGET) || defined(__DOXYGEN__)
721 int (*ibi_raise)(const struct device *dev,
722 struct i3c_ibi *request);
723#endif /* CONFIG_I3C_TARGET */
724#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
735 int (*ibi_hj_response)(const struct device *dev,
736 bool ack);
737
750 int (*ibi_enable)(const struct device *dev,
751 struct i3c_device_desc *target);
752
765 int (*ibi_disable)(const struct device *dev,
766 struct i3c_device_desc *target);
767#endif /* CONFIG_I3C_CONTROLLER */
768#endif /* CONFIG_I3C_USE_IBI */
769#if defined(CONFIG_I3C_TARGET) || defined(__DOXYGEN__)
785 int (*target_register)(const struct device *dev,
786 struct i3c_target_config *cfg);
787
803 int (*target_unregister)(const struct device *dev,
804 struct i3c_target_config *cfg);
805
822 int (*target_tx_write)(const struct device *dev,
823 uint8_t *buf, uint16_t len, uint8_t hdr_mode);
824
840 int (*target_controller_handoff)(const struct device *dev,
841 bool accept);
842#endif /* CONFIG_I3C_TARGET */
843#if defined(CONFIG_I3C_RTIO) || defined(__DOXYGEN__)
854 void (*iodev_submit)(const struct device *dev,
855 struct rtio_iodev_sqe *iodev_sqe);
856#endif /* CONFIG_I3C_RTIO */
857};
858
869};
870
879#define I3C_DEVICE_ID(pid) \
880 { \
881 .pid = pid \
882 }
883
902
904 const struct device *bus;
905
907 const struct device *dev;
908
911
925
936
945
960
966
974
975 struct {
978
981
985
986 struct {
989
992
996
999
1001 struct {
1002 union {
1011
1021 };
1022
1031
1044
1051
1052 /* Describes Controller Feature Capabilities */
1053 struct {
1062
1073
1078 void *controller_priv;
1081#if defined(CONFIG_I3C_USE_IBI) || defined(__DOXYGEN__)
1087#endif /* CONFIG_I3C_USE_IBI */
1088};
1089
1105
1107 const struct device *bus;
1108
1111
1117
1122 void *controller_priv;
1124};
1125
1155
1168 struct i3c_device_desc * const i3c;
1169
1173 struct i3c_i2c_device_desc * const i2c;
1174
1179
1184};
1185
1192#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1195
1198#elif defined(CONFIG_CPP)
1199 /* Empty struct has size 0 in C, size 1 in C++. Force them to be the same. */
1200 uint8_t unused_cpp_size_compatibility;
1201#endif
1202};
1203
1204#if defined(CONFIG_CPP)
1205BUILD_ASSERT(sizeof(struct i3c_driver_config) >= 1);
1206#endif
1207
1215#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1218#if defined(CONFIG_I3C_TARGET) || defined(__DOXYGEN__)
1221
1224#endif /* CONFIG_I3C_TARGET */
1225#endif /* CONFIG_I3C_CONTROLLER */
1226};
1227#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1235#define I3C_BUS_FOR_EACH_I3CDEV(bus, desc) \
1236 SYS_SLIST_FOR_EACH_CONTAINER( \
1237 &((struct i3c_driver_data *)(bus->data))->attached_dev.devices.i3c, desc, node)
1238
1246#define I3C_BUS_FOR_EACH_I2CDEV(bus, desc) \
1247 SYS_SLIST_FOR_EACH_CONTAINER( \
1248 &((struct i3c_driver_data *)(bus->data))->attached_dev.devices.i2c, desc, node)
1249
1262struct i3c_device_desc *i3c_dev_list_find(const struct i3c_dev_list *dev_list,
1263 const struct i3c_device_id *id);
1264
1278 uint8_t addr);
1279
1293 uint8_t addr);
1294
1308 uint16_t addr);
1309
1362 const struct i3c_dev_list *dev_list,
1363 uint64_t pid, bool must_match,
1364 bool assigned_okay,
1365 struct i3c_device_desc **target,
1366 uint8_t *addr);
1367#endif /* CONFIG_I3C_CONTROLLER */
1381static inline int i3c_configure(const struct device *dev,
1382 enum i3c_config_type type, void *config)
1383{
1384 const struct i3c_driver_api *api =
1385 (const struct i3c_driver_api *)dev->api;
1386
1387 if (api->configure == NULL) {
1388 return -ENOSYS;
1389 }
1390
1391 return api->configure(dev, type, config);
1392}
1393#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1409static inline int i3c_configure_controller(const struct device *dev,
1410 struct i3c_config_controller *config)
1411{
1412 return i3c_configure(dev, I3C_CONFIG_CONTROLLER, config);
1413}
1414#endif /* CONFIG_I3C_CONTROLLER */
1415#if defined(CONFIG_I3C_TARGET) || defined(__DOXYGEN__)
1431static inline int i3c_configure_target(const struct device *dev,
1432 struct i3c_config_target *config)
1433{
1434 return i3c_configure(dev, I3C_CONFIG_TARGET, config);
1435}
1436#endif /* CONFIG_I3C_TARGET */
1457static inline int i3c_config_get(const struct device *dev,
1458 enum i3c_config_type type, void *config)
1459{
1460 const struct i3c_driver_api *api =
1461 (const struct i3c_driver_api *)dev->api;
1462
1463 if (api->config_get == NULL) {
1464 return -ENOSYS;
1465 }
1466
1467 return api->config_get(dev, type, config);
1468}
1469#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1485static inline int i3c_config_get_controller(const struct device *dev,
1486 struct i3c_config_controller *config)
1487{
1488 return i3c_config_get(dev, I3C_CONFIG_CONTROLLER, config);
1489}
1490#endif /* CONFIG_I3C_CONTROLLER */
1491#if defined(CONFIG_I3C_TARGET) || defined(__DOXYGEN__)
1507static inline int i3c_config_get_target(const struct device *dev,
1508 struct i3c_config_target *config)
1509{
1510 return i3c_config_get(dev, I3C_CONFIG_TARGET, config);
1511}
1512#endif /* CONFIG_I3C_TARGET */
1513#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1524static inline int i3c_recover_bus(const struct device *dev)
1525{
1526 const struct i3c_driver_api *api =
1527 (const struct i3c_driver_api *)dev->api;
1528
1529 if (api->recover_bus == NULL) {
1530 return -ENOSYS;
1531 }
1532
1533 return api->recover_bus(dev);
1534}
1535
1556
1581int i3c_reattach_i3c_device(struct i3c_device_desc *target, uint8_t old_dyn_addr);
1582
1603
1623
1642
1666static inline int i3c_do_daa(const struct device *dev)
1667{
1668 const struct i3c_driver_api *api =
1669 (const struct i3c_driver_api *)dev->api;
1670
1671 if (api->do_daa == NULL) {
1672 return -ENOSYS;
1673 }
1674
1675 return api->do_daa(dev);
1676}
1677
1691__syscall int i3c_do_ccc(const struct device *dev,
1692 struct i3c_ccc_payload *payload);
1693
1694static inline int z_impl_i3c_do_ccc(const struct device *dev,
1695 struct i3c_ccc_payload *payload)
1696{
1697 const struct i3c_driver_api *api =
1698 (const struct i3c_driver_api *)dev->api;
1699
1700 if (api->do_ccc == NULL) {
1701 return -ENOSYS;
1702 }
1703
1704 return api->do_ccc(dev, payload);
1705}
1706
1738__syscall int i3c_transfer(struct i3c_device_desc *target,
1739 struct i3c_msg *msgs, uint8_t num_msgs);
1740
1741static inline int z_impl_i3c_transfer(struct i3c_device_desc *target,
1742 struct i3c_msg *msgs, uint8_t num_msgs)
1743{
1744 const struct i3c_driver_api *api =
1745 (const struct i3c_driver_api *)target->bus->api;
1746
1747 return api->i3c_xfers(target->bus, target, msgs, num_msgs);
1748}
1749
1766static inline
1768 const struct i3c_device_id *id)
1769{
1770 const struct i3c_driver_api *api =
1771 (const struct i3c_driver_api *)dev->api;
1772
1773 if (api->i3c_device_find == NULL) {
1774 return NULL;
1775 }
1776
1777 return api->i3c_device_find(dev, id);
1778}
1779#endif /* CONFIG_I3C_CONTROLLER */
1780#if defined(CONFIG_I3C_USE_IBI) || defined(__DOXYGEN__)
1786#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1799static inline int i3c_ibi_hj_response(const struct device *dev,
1800 bool ack)
1801{
1802 const struct i3c_driver_api *api =
1803 (const struct i3c_driver_api *)dev->api;
1804
1805 if (api->ibi_hj_response == NULL) {
1806 return -ENOSYS;
1807 }
1808
1809 return api->ibi_hj_response(dev, ack);
1810}
1811#endif /* CONFIG_I3C_CONTROLLER */
1812#if defined(CONFIG_I3C_TARGET) || defined(__DOXYGEN__)
1824static inline int i3c_ibi_raise(const struct device *dev,
1825 struct i3c_ibi *request)
1826{
1827 const struct i3c_driver_api *api =
1828 (const struct i3c_driver_api *)dev->api;
1829
1830 if (api->ibi_raise == NULL) {
1831 return -ENOSYS;
1832 }
1833
1834 return api->ibi_raise(dev, request);
1835}
1836#endif /* CONFIG_I3C_TARGET */
1837#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1852static inline int i3c_ibi_enable(struct i3c_device_desc *target)
1853{
1854 const struct i3c_driver_api *api =
1855 (const struct i3c_driver_api *)target->bus->api;
1856
1857 if (api->ibi_enable == NULL) {
1858 return -ENOSYS;
1859 }
1860
1861 return api->ibi_enable(target->bus, target);
1862}
1863
1876static inline int i3c_ibi_disable(struct i3c_device_desc *target)
1877{
1878 const struct i3c_driver_api *api =
1879 (const struct i3c_driver_api *)target->bus->api;
1880
1881 if (api->ibi_disable == NULL) {
1882 return -ENOSYS;
1883 }
1884
1885 return api->ibi_disable(target->bus, target);
1886}
1887#endif /* CONFIG_I3C_CONTROLLER */
1888#endif /* CONFIG_I3C_USE_IBI */
1900static inline int i3c_ibi_has_payload(struct i3c_device_desc *target)
1901{
1902 return (target->bcr & I3C_BCR_IBI_PAYLOAD_HAS_DATA_BYTE)
1904}
1905
1917static inline int i3c_device_is_ibi_capable(struct i3c_device_desc *target)
1918{
1919 return (target->bcr & I3C_BCR_IBI_REQUEST_CAPABLE)
1921}
1922
1934static inline int i3c_device_is_controller_capable(struct i3c_device_desc *target)
1935{
1936 return I3C_BCR_DEVICE_ROLE(target->bcr)
1938}
1939
1941#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
1960static inline int i3c_write(struct i3c_device_desc *target,
1961 const uint8_t *buf, uint32_t num_bytes)
1962{
1963 struct i3c_msg msg;
1964
1965 msg.buf = (uint8_t *)buf;
1966 msg.len = num_bytes;
1968 msg.hdr_mode = 0;
1969 msg.hdr_cmd_code = 0;
1970
1971 return i3c_transfer(target, &msg, 1);
1972}
1973
1987static inline int i3c_read(struct i3c_device_desc *target,
1988 uint8_t *buf, uint32_t num_bytes)
1989{
1990 struct i3c_msg msg;
1991
1992 msg.buf = buf;
1993 msg.len = num_bytes;
1995 msg.hdr_mode = 0;
1996 msg.hdr_cmd_code = 0;
1997
1998 return i3c_transfer(target, &msg, 1);
1999}
2000
2018static inline int i3c_write_read(struct i3c_device_desc *target,
2019 const void *write_buf, size_t num_write,
2020 void *read_buf, size_t num_read)
2021{
2022 struct i3c_msg msg[2];
2023
2024 msg[0].buf = (uint8_t *)write_buf;
2025 msg[0].len = num_write;
2026 msg[0].flags = I3C_MSG_WRITE;
2027 msg[0].hdr_mode = 0;
2028 msg[0].hdr_cmd_code = 0;
2029
2030 msg[1].buf = (uint8_t *)read_buf;
2031 msg[1].len = num_read;
2033 msg[1].hdr_mode = 0;
2034 msg[1].hdr_cmd_code = 0;
2035
2036 return i3c_transfer(target, msg, 2);
2037}
2038
2056static inline int i3c_burst_read(struct i3c_device_desc *target,
2057 uint8_t start_addr,
2058 uint8_t *buf,
2059 uint32_t num_bytes)
2060{
2061 return i3c_write_read(target,
2062 &start_addr, sizeof(start_addr),
2063 buf, num_bytes);
2064}
2065
2086static inline int i3c_burst_write(struct i3c_device_desc *target,
2087 uint8_t start_addr,
2088 const uint8_t *buf,
2089 uint32_t num_bytes)
2090{
2091 struct i3c_msg msg[2];
2092
2093 msg[0].buf = &start_addr;
2094 msg[0].len = 1U;
2095 msg[0].flags = I3C_MSG_WRITE;
2096 msg[0].hdr_mode = 0;
2097 msg[0].hdr_cmd_code = 0;
2098
2099 msg[1].buf = (uint8_t *)buf;
2100 msg[1].len = num_bytes;
2101 msg[1].flags = I3C_MSG_WRITE | I3C_MSG_STOP;
2102 msg[1].hdr_mode = 0;
2103 msg[1].hdr_cmd_code = 0;
2104
2105 return i3c_transfer(target, msg, 2);
2106}
2107
2122static inline int i3c_reg_read_byte(struct i3c_device_desc *target,
2123 uint8_t reg_addr, uint8_t *value)
2124{
2125 return i3c_write_read(target,
2126 &reg_addr, sizeof(reg_addr),
2127 value, sizeof(*value));
2128}
2129
2147static inline int i3c_reg_write_byte(struct i3c_device_desc *target,
2148 uint8_t reg_addr, uint8_t value)
2149{
2150 uint8_t tx_buf[2] = {reg_addr, value};
2151
2152 return i3c_write(target, tx_buf, 2);
2153}
2154
2173static inline int i3c_reg_update_byte(struct i3c_device_desc *target,
2174 uint8_t reg_addr, uint8_t mask,
2175 uint8_t value)
2176{
2177 uint8_t old_value, new_value;
2178 int rc;
2179
2180 rc = i3c_reg_read_byte(target, reg_addr, &old_value);
2181 if (rc != 0) {
2182 return rc;
2183 }
2184
2185 new_value = (old_value & ~mask) | (value & mask);
2186 if (new_value == old_value) {
2187 return 0;
2188 }
2189
2190 return i3c_reg_write_byte(target, reg_addr, new_value);
2191}
2192
2217void i3c_dump_msgs(const char *name, const struct i3c_msg *msgs,
2218 uint8_t num_msgs, struct i3c_device_desc *target);
2219
2237int i3c_bus_init(const struct device *dev,
2238 const struct i3c_dev_list *i3c_dev_list);
2239
2258
2282
2304static inline int i3c_device_info_get(struct i3c_device_desc *target)
2305{
2306 int rc;
2307
2308 rc = i3c_device_basic_info_get(target);
2309 if (rc != 0) {
2310 return rc;
2311 }
2312
2313 return i3c_device_adv_info_get(target);
2314}
2315
2326bool i3c_bus_has_sec_controller(const struct device *dev);
2327
2338int i3c_bus_rstdaa_all(const struct device *dev);
2339
2352int i3c_bus_setdasa(struct i3c_device_desc *desc, uint8_t dynamic_addr);
2353
2366int i3c_bus_setnewda(struct i3c_device_desc *desc, uint8_t dynamic_addr);
2367
2378int i3c_bus_setaasa(const struct device *dev);
2379
2391
2403
2415
2427
2439
2452int i3c_bus_setmrl(struct i3c_device_desc *desc, uint16_t mrl, uint8_t ibi_len);
2453
2466
2480int i3c_bus_setmrl_all(const struct device *dev, uint16_t mrl, uint8_t ibi_len, bool has_ibi_size);
2481
2493int i3c_bus_setmwl_all(const struct device *dev, uint16_t mwl);
2494
2495#if defined(CONFIG_I3C_TARGET) || defined(__DOXYGEN__)
2507
2519int i3c_bus_deftgts(const struct device *dev);
2520#endif /* CONFIG_I3C_TARGET */
2521
2532
2547int i3c_device_controller_handoff(struct i3c_device_desc *target, bool requested);
2548#endif /* CONFIG_I3C_CONTROLLER */
2549
2550#if defined(CONFIG_I3C_USE_IBI) || defined(__DOXYGEN__)
2551#if (defined(CONFIG_I3C_CONTROLLER) && defined(CONFIG_I3C_TARGET)) || defined(__DOXYGEN__)
2563void i3c_sec_handoffed(struct k_work *work);
2564#endif /* CONFIG_I3C_CONTROLLER && CONFIG_I3C_TARGET */
2565#endif /* CONFIG_I3C_USE_IBI */
2566
2567#if (defined(CONFIG_I3C_NUM_OF_DESC_MEM_SLABS) && CONFIG_I3C_NUM_OF_DESC_MEM_SLABS > 0) || \
2568 defined(__DOXYGEN__)
2569
2579
2588
2599
2600#else
2601
2602static inline struct i3c_device_desc *i3c_device_desc_alloc(void)
2603{
2604 return NULL;
2605}
2606
2607static inline void i3c_device_desc_free(struct i3c_device_desc *desc)
2608{
2609 ARG_UNUSED(desc);
2610}
2611
2612static inline bool i3c_device_desc_in_pool(struct i3c_device_desc *desc)
2613{
2614 ARG_UNUSED(desc);
2615 return false;
2616}
2617
2618#endif /* CONFIG_I3C_NUM_OF_DESC_MEM_SLABS > 0 */
2619
2620#if (defined(CONFIG_I3C_I2C_NUM_OF_DESC_MEM_SLABS) && CONFIG_I3C_I2C_NUM_OF_DESC_MEM_SLABS > 0) || \
2621 defined(__DOXYGEN__)
2622
2632
2641
2652
2653#else
2654
2655static inline struct i3c_i2c_device_desc *i3c_i2c_device_desc_alloc(void)
2656{
2657 return NULL;
2658}
2659
2660static inline void i3c_i2c_device_desc_free(struct i3c_i2c_device_desc *desc)
2661{
2662 ARG_UNUSED(desc);
2663}
2664
2665static inline bool i3c_i2c_device_desc_in_pool(struct i3c_i2c_device_desc *desc)
2666{
2667 ARG_UNUSED(desc);
2668 return false;
2669}
2670
2671#endif /* CONFIG_I3C_I2C_NUM_OF_DESC_MEM_SLABS > 0 */
2672
2673#if defined(CONFIG_I3C_RTIO) || defined(__DOXYGEN__)
2674
2676 const struct device *bus;
2677 const struct i3c_device_id dev_id;
2678};
2679
2690void i3c_iodev_submit_fallback(const struct device *dev, struct rtio_iodev_sqe *iodev_sqe);
2691
2698static inline void i3c_iodev_submit(struct rtio_iodev_sqe *iodev_sqe)
2699{
2700 const struct i3c_iodev_data *data =
2701 (const struct i3c_iodev_data *)iodev_sqe->sqe.iodev->data;
2702 const struct i3c_driver_api *api = (const struct i3c_driver_api *)data->bus->api;
2703
2704 if (api->iodev_submit == NULL) {
2705 rtio_iodev_sqe_err(iodev_sqe, -ENOSYS);
2706 return;
2707 }
2708 api->iodev_submit(data->bus, iodev_sqe);
2709}
2710
2711extern const struct rtio_iodev_api i3c_iodev_api;
2712
2722#define I3C_DT_IODEV_DEFINE(name, node_id) \
2723 const struct i3c_iodev_data _i3c_iodev_data_##name = { \
2724 .bus = DEVICE_DT_GET(DT_BUS(node_id)), \
2725 .dev_id = I3C_DEVICE_ID_DT(node_id), \
2726 }; \
2727 RTIO_IODEV_DEFINE(name, &i3c_iodev_api, (void *)&_i3c_iodev_data_##name)
2728
2741 struct rtio_iodev *iodev,
2742 const struct i3c_msg *msgs,
2743 uint8_t num_msgs);
2744
2745#endif /* CONFIG_I3C_RTIO */
2746
2747#if defined(CONFIG_I3C_TARGET) || defined(__DOXYGEN__)
2748/*
2749 * This needs to be after declaration of struct i3c_driver_api,
2750 * or else compiler complains about undefined type inside
2751 * the static inline API wrappers.
2752 */
2754#endif /* CONFIG_I3C_TARGET */
2755
2756#if defined(CONFIG_I3C_CONTROLLER) || defined(__DOXYGEN__)
2757/*
2758 * Include High-Data-Rate (HDR) inline helper functions
2759 */
2761#endif /* CONFIG_I3C_CONTROLLER */
2762
2763#ifdef __cplusplus
2764}
2765#endif
2766
2771#include <zephyr/syscalls/i3c.h>
2772
2773#endif /* ZEPHYR_INCLUDE_DRIVERS_I3C_H_ */
workaround assembler barfing for ST r
Definition asm-macro-32-bit-gnu.h:24
Main header file for I2C (Inter-Integrated Circuit) driver API.
System error numbers.
i3c_sdr_controller_error_types
I3C SDR Controller Error Types.
Definition error_types.h:24
static int i3c_ibi_disable(struct i3c_device_desc *target)
Disable IBI of a target device.
Definition i3c.h:1876
static int i3c_ibi_has_payload(struct i3c_device_desc *target)
Check if target's IBI has payload.
Definition i3c.h:1900
static int i3c_ibi_raise(const struct device *dev, struct i3c_ibi *request)
Raise an In-Band Interrupt (IBI).
Definition i3c.h:1824
static int i3c_device_is_controller_capable(struct i3c_device_desc *target)
Check if the target is controller capable.
Definition i3c.h:1934
static int i3c_device_is_ibi_capable(struct i3c_device_desc *target)
Check if device is IBI capable.
Definition i3c.h:1917
static int i3c_ibi_enable(struct i3c_device_desc *target)
Enable IBI of a target device.
Definition i3c.h:1852
int(* i3c_target_ibi_cb_t)(struct i3c_device_desc *target, struct i3c_ibi_payload *payload)
Function called when In-Band Interrupt received from target device.
Definition ibi.h:146
static int i3c_ibi_hj_response(const struct device *dev, bool ack)
ACK or NACK IBI HJ Requests.
Definition i3c.h:1799
int i3c_attach_i3c_device(struct i3c_device_desc *target)
Attach an I3C device.
#define I3C_BCR_IBI_REQUEST_CAPABLE
IBI Request Capable bit.
Definition i3c.h:95
#define I3C_BCR_DEVICE_ROLE_I3C_CONTROLLER_CAPABLE
Device Role - I3C Controller Capable.
Definition i3c.h:135
struct i3c_device_desc * i3c_dev_list_i3c_addr_find(const struct device *dev, uint8_t addr)
Find a I3C target device descriptor by dynamic address.
static struct i3c_device_desc * i3c_device_find(const struct device *dev, const struct i3c_device_id *id)
Find a registered I3C target device.
Definition i3c.h:1767
int i3c_bus_getpid(struct i3c_device_desc *desc)
Retrieve the Provisional ID (PID) of a device.
bool i3c_bus_has_sec_controller(const struct device *dev)
Check if the bus has a secondary controller.
int i3c_bus_rstdaa_all(const struct device *dev)
Reset all devices on the bus and clear their dynamic addresses.
struct i3c_i2c_device_desc * i3c_i2c_device_desc_alloc(void)
Allocate memory for a i3c i2c device descriptor.
void i3c_sec_handoffed(struct k_work *work)
Call back for when Controllership is Handoffed to itself.
void i3c_device_desc_free(struct i3c_device_desc *desc)
Free memory from a i3c device descriptor.
int i3c_bus_setmrl_all(const struct device *dev, uint16_t mrl, uint8_t ibi_len, bool has_ibi_size)
Set the Maximum Read Length (MRL) for all devices on the bus.
int i3c_bus_setdasa(struct i3c_device_desc *desc, uint8_t dynamic_addr)
Assign a dynamic address to a device using its static address.
static int i3c_configure(const struct device *dev, enum i3c_config_type type, void *config)
Configure the I3C hardware.
Definition i3c.h:1381
static int i3c_device_info_get(struct i3c_device_desc *target)
Get all information from device and update device descriptor.
Definition i3c.h:2304
int i3c_dev_list_daa_addr_helper(struct i3c_addr_slots *addr_slots, const struct i3c_dev_list *dev_list, uint64_t pid, bool must_match, bool assigned_okay, struct i3c_device_desc **target, uint8_t *addr)
Helper function to find a usable address during ENTDAA.
static void i3c_iodev_submit(struct rtio_iodev_sqe *iodev_sqe)
Submit request(s) to an I3C device with RTIO.
Definition i3c.h:2698
int i3c_device_adv_info_get(struct i3c_device_desc *target)
Get advanced information from device and update device descriptor.
int i3c_bus_getmrl(struct i3c_device_desc *desc)
Retrieve the Maximum Read Length (MRL) of a device.
int i3c_bus_deftgts(const struct device *dev)
Send the CCC DEFTGTS.
int i3c_bus_setnewda(struct i3c_device_desc *desc, uint8_t dynamic_addr)
Assign a new dynamic address to a device.
i3c_config_type
Type of configuration being passed to configure function.
Definition i3c.h:443
int i3c_attach_i2c_device(struct i3c_i2c_device_desc *target)
Attach an I2C device.
void i3c_i2c_device_desc_free(struct i3c_i2c_device_desc *desc)
Free memory from a i3c i2c device descriptor.
i3c_i2c_speed_type
I2C bus speed under I3C bus.
Definition i3c.h:266
int i3c_detach_i3c_device(struct i3c_device_desc *target)
Detach I3C Device.
int i3c_bus_setmrl(struct i3c_device_desc *desc, uint16_t mrl, uint8_t ibi_len)
Set the Maximum Read Length (MRL) for a device.
i3c_bus_mode
I3C bus mode.
Definition i3c.h:233
static int i3c_recover_bus(const struct device *dev)
Attempt bus recovery on the I3C bus.
Definition i3c.h:1524
static int i3c_configure_target(const struct device *dev, struct i3c_config_target *config)
Get the target device configuration for an I3C device.
Definition i3c.h:1431
int i3c_bus_setmwl(struct i3c_device_desc *desc, uint16_t mwl)
Set the Maximum Write Length (MWL) for a device.
static int i3c_config_get(const struct device *dev, enum i3c_config_type type, void *config)
Get configuration of the I3C hardware.
Definition i3c.h:1457
int i3c_bus_getacccr(struct i3c_device_desc *desc)
Retrieve the Active Controller's Dynamic Address (ACCCR).
int i3c_bus_getmwl(struct i3c_device_desc *desc)
Retrieve the Maximum Write Length (MWL) of a device.
int i3c_detach_i2c_device(struct i3c_i2c_device_desc *target)
Detach I2C Device.
static int i3c_config_get_target(const struct device *dev, struct i3c_config_target *config)
Get the target device configuration for an I3C device.
Definition i3c.h:1507
#define I3C_BCR_DEVICE_ROLE(bcr)
Device Role.
Definition i3c.h:147
void i3c_iodev_submit_fallback(const struct device *dev, struct rtio_iodev_sqe *iodev_sqe)
Fallback submit implementation.
static int i3c_config_get_controller(const struct device *dev, struct i3c_config_controller *config)
Get the controller device configuration for an I3C device.
Definition i3c.h:1485
struct i3c_device_desc * i3c_dev_list_find(const struct i3c_dev_list *dev_list, const struct i3c_device_id *id)
Find a I3C target device descriptor by ID.
int i3c_bus_init(const struct device *dev, const struct i3c_dev_list *i3c_dev_list)
Generic helper function to perform bus initialization.
int i3c_do_ccc(const struct device *dev, struct i3c_ccc_payload *payload)
Send CCC to the bus.
int i3c_bus_getdcr(struct i3c_device_desc *desc)
Retrieve the Device Characteristics Register (DCR) of a device.
int i3c_device_basic_info_get(struct i3c_device_desc *target)
Get basic information from device and update device descriptor.
uint8_t i3c_odd_parity(uint8_t p)
Calculate odd parity.
struct rtio_sqe * i3c_rtio_copy(struct rtio *r, struct rtio_iodev *iodev, const struct i3c_msg *msgs, uint8_t num_msgs)
Copy the i3c_msgs into a set of RTIO requests.
int i3c_bus_setaasa(const struct device *dev)
Assign static addresses as dynamic addresses for all devices on the bus.
struct i3c_device_desc * i3c_device_desc_alloc(void)
Allocate memory for a i3c device descriptor.
static int i3c_do_daa(const struct device *dev)
Perform Dynamic Address Assignment on the I3C bus.
Definition i3c.h:1666
bool i3c_i2c_device_desc_in_pool(struct i3c_i2c_device_desc *desc)
Report if the i3c i2c device descriptor was from a mem slab.
int i3c_bus_getbcr(struct i3c_device_desc *desc)
Retrieve the Bus Characteristics Register (BCR) of a device.
const struct rtio_iodev_api i3c_iodev_api
int i3c_bus_setmwl_all(const struct device *dev, uint16_t mwl)
Set the Maximum Write Length (MWL) for all devices on the bus.
#define I3C_BCR_IBI_PAYLOAD_HAS_DATA_BYTE
IBI Payload bit.
Definition i3c.h:104
int i3c_reattach_i3c_device(struct i3c_device_desc *target, uint8_t old_dyn_addr)
Reattach I3C device.
i3c_data_rate
I3C data rate.
Definition i3c.h:282
static int i3c_configure_controller(const struct device *dev, struct i3c_config_controller *config)
Get the controller device configuration for an I3C device.
Definition i3c.h:1409
struct i3c_device_desc * i3c_dev_list_i3c_static_addr_find(const struct device *dev, uint8_t addr)
Find a I3C target device descriptor by static address.
int i3c_device_controller_handoff(struct i3c_device_desc *target, bool requested)
Perform Controller Handoff.
bool i3c_device_desc_in_pool(struct i3c_device_desc *desc)
Report if the i3c device descriptor was from a mem slab.
struct i3c_i2c_device_desc * i3c_dev_list_i2c_addr_find(const struct device *dev, uint16_t addr)
Find a I2C target device descriptor by address.
@ I3C_CONFIG_TARGET
Definition i3c.h:445
@ I3C_CONFIG_CUSTOM
Definition i3c.h:446
@ I3C_CONFIG_CONTROLLER
Definition i3c.h:444
@ I3C_I2C_SPEED_INVALID
Definition i3c.h:274
@ I3C_I2C_SPEED_MAX
Definition i3c.h:273
@ I3C_I2C_SPEED_FMPLUS
I2C FM+ mode.
Definition i3c.h:271
@ I3C_I2C_SPEED_FM
I2C FM mode.
Definition i3c.h:268
@ I3C_BUS_MODE_INVALID
Definition i3c.h:258
@ I3C_BUS_MODE_PURE
Only I3C devices are on the bus.
Definition i3c.h:235
@ I3C_BUS_MODE_MIXED_FAST
Both I3C and legacy I2C devices are on the bus.
Definition i3c.h:241
@ I3C_BUS_MODE_MAX
Definition i3c.h:257
@ I3C_BUS_MODE_MIXED_LIMITED
Both I3C and legacy I2C devices are on the bus.
Definition i3c.h:248
@ I3C_BUS_MODE_MIXED_SLOW
Both I3C and legacy I2C devices are on the bus.
Definition i3c.h:255
@ I3C_DATA_RATE_MAX
Definition i3c.h:298
@ I3C_DATA_RATE_INVALID
Definition i3c.h:299
@ I3C_DATA_RATE_HDR_TSP
High Data Rate - Ternary Symbol for Pure Bus.
Definition i3c.h:293
@ I3C_DATA_RATE_HDR_DDR
High Data Rate - Double Data Rate messaging.
Definition i3c.h:287
@ I3C_DATA_RATE_SDR
Single Data Rate messaging.
Definition i3c.h:284
@ I3C_DATA_RATE_HDR_TSL
High Data Rate - Ternary Symbol Legacy-inclusive-Bus.
Definition i3c.h:290
@ I3C_DATA_RATE_HDR_BT
High Data Rate - Bulk Transport.
Definition i3c.h:296
int i3c_transfer(struct i3c_device_desc *target, struct i3c_msg *msgs, uint8_t num_msgs)
Perform data transfer from the controller to a I3C target device.
#define I3C_MSG_STOP
Send STOP after this message.
Definition i3c.h:323
static int i3c_write_read(struct i3c_device_desc *target, const void *write_buf, size_t num_write, void *read_buf, size_t num_read)
Write then read data from an I3C target device.
Definition i3c.h:2018
static int i3c_burst_read(struct i3c_device_desc *target, uint8_t start_addr, uint8_t *buf, uint32_t num_bytes)
Read multiple bytes from an internal address of an I3C target device.
Definition i3c.h:2056
static int i3c_reg_update_byte(struct i3c_device_desc *target, uint8_t reg_addr, uint8_t mask, uint8_t value)
Update internal register of an I3C target device.
Definition i3c.h:2173
void i3c_dump_msgs(const char *name, const struct i3c_msg *msgs, uint8_t num_msgs, struct i3c_device_desc *target)
Dump out an I3C message.
#define I3C_MSG_READ
Read message from I3C bus.
Definition i3c.h:316
#define I3C_MSG_WRITE
Write message to I3C bus.
Definition i3c.h:313
static int i3c_reg_read_byte(struct i3c_device_desc *target, uint8_t reg_addr, uint8_t *value)
Read internal register of an I3C target device.
Definition i3c.h:2122
static int i3c_write(struct i3c_device_desc *target, const uint8_t *buf, uint32_t num_bytes)
Write a set amount of data to an I3C target device.
Definition i3c.h:1960
static int i3c_read(struct i3c_device_desc *target, uint8_t *buf, uint32_t num_bytes)
Read a set amount of data from an I3C target device.
Definition i3c.h:1987
#define I3C_MSG_RESTART
RESTART I3C transaction for this message.
Definition i3c.h:334
static int i3c_burst_write(struct i3c_device_desc *target, uint8_t start_addr, const uint8_t *buf, uint32_t num_bytes)
Write multiple bytes to an internal address of an I3C target device.
Definition i3c.h:2086
static int i3c_reg_write_byte(struct i3c_device_desc *target, uint8_t reg_addr, uint8_t value)
Write internal register of an I3C target device.
Definition i3c.h:2147
static void rtio_iodev_sqe_err(struct rtio_iodev_sqe *iodev_sqe, int result)
Inform the executor of a submissions completion with error.
Definition rtio.h:1358
struct _slist sys_slist_t
Single-linked list structure.
Definition slist.h:49
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
#define ENOSYS
Function not implemented.
Definition errno.h:82
#define NULL
Definition iar_missing_defs.h:20
#define BUILD_ASSERT(EXPR, MSG...)
Definition llvm.h:51
int accept(int sock, struct sockaddr *addr, socklen_t *addrlen)
Real-Time IO device API for moving bytes with low effort.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:510
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:516
Structure to keep track of addresses on I3C bus.
Definition addresses.h:58
Payload for DEFTGTS CCC (Define List of Targets).
Definition ccc.h:477
Payload structure for one CCC transaction.
Definition ccc.h:283
Configuration parameters for I3C hardware to act as controller.
Definition i3c.h:452
uint32_t i3c
SCL frequency (in Hz) for I3C transfers.
Definition i3c.h:461
uint8_t supported_hdr
Bit mask of supported HDR modes (0 - 7).
Definition i3c.h:473
bool is_secondary
True if the controller is to be the secondary controller of the bus.
Definition i3c.h:457
uint32_t i2c
SCL frequency (in Hz) for I2C transfers.
Definition i3c.h:464
struct i3c_config_controller::@221 scl
Custom I3C configuration parameters.
Definition i3c.h:484
void * ptr
Pointer to configuration parameter.
Definition i3c.h:498
uint32_t id
ID of the configuration parameter.
Definition i3c.h:486
uintptr_t val
Value of configuration parameter.
Definition i3c.h:490
Configuration parameters for I3C hardware to act as target device.
Definition target_device.h:36
Structure for describing attached devices for a controller.
Definition i3c.h:1134
sys_slist_t i3c
Linked list of attached I3C devices.
Definition i3c.h:1147
sys_slist_t i2c
Linked list of attached I2C devices.
Definition i3c.h:1152
struct i3c_addr_slots addr_slots
Address slots:
Definition i3c.h:1141
struct i3c_dev_attached_list::@230 devices
Structure for describing known devices for a controller.
Definition i3c.h:1164
struct i3c_i2c_device_desc *const i2c
Pointer to array of known I2C devices.
Definition i3c.h:1173
const uint8_t num_i3c
Number of I3C devices in array.
Definition i3c.h:1178
struct i3c_device_desc *const i3c
Pointer to array of known I3C devices.
Definition i3c.h:1168
const uint8_t num_i2c
Number of I2C devices in array.
Definition i3c.h:1183
Structure describing a I3C target device.
Definition i3c.h:900
uint8_t maxwr
Maximum Write Speed.
Definition i3c.h:980
const uint8_t init_dynamic_addr
Initial dynamic address.
Definition i3c.h:935
uint8_t getcap1
I3C v1.1+ GETCAPS1 (I3C_CCC_GETCAPS1_*)
Definition i3c.h:1020
uint8_t static_addr
Static address for this target device.
Definition i3c.h:924
uint8_t getcap2
GETCAPS2 (I3C_CCC_GETCAPS2_*)
Definition i3c.h:1030
uint8_t crcaps2
CRCAPS2.
Definition i3c.h:1071
uint32_t max_read_turnaround
Maximum Read turnaround time in microseconds.
Definition i3c.h:983
uint8_t getcap4
GETCAPS4.
Definition i3c.h:1049
uint64_t pid
Device Provisioned ID.
Definition i3c.h:910
uint8_t max_ibi
Maximum IBI Payload Size.
Definition i3c.h:994
i3c_target_ibi_cb_t ibi_cb
In-Band Interrupt (IBI) callback.
Definition i3c.h:1086
uint16_t mwl
Maximum Write Length.
Definition i3c.h:991
uint8_t crhdly1
Controller Handoff Delay Parameters.
Definition i3c.h:998
struct i3c_device_desc::@226 getcaps
Describes advanced (Target) capabilities and features.
uint8_t getcap3
GETCAPS3 (I3C_CCC_GETCAPS3_*)
Definition i3c.h:1043
uint8_t dynamic_addr
Dynamic Address for this target device used for communication.
Definition i3c.h:959
uint8_t crcaps1
CRCAPS1.
Definition i3c.h:1061
const uint8_t flags
Device Flags.
Definition i3c.h:944
sys_snode_t node
Definition i3c.h:901
struct i3c_device_desc::@227 crcaps
const struct device * bus
I3C bus to which this target device is attached.
Definition i3c.h:904
struct i3c_device_desc::@224 data_speed
uint16_t mrl
Maximum Read Length.
Definition i3c.h:988
struct i3c_device_desc::@225 data_length
uint8_t maxrd
Maximum Read Speed.
Definition i3c.h:977
uint8_t gethdrcap
I3C v1.0 HDR Capabilities (I3C_CCC_GETCAPS1_*)
Definition i3c.h:1010
uint8_t bcr
Bus Characteristic Register (BCR)
Definition i3c.h:965
uint8_t dcr
Device Characteristic Register (DCR)
Definition i3c.h:973
const struct device * dev
Device driver instance of the I3C device.
Definition i3c.h:907
Structure used for matching I3C devices.
Definition i3c.h:866
uint64_t pid
Device Provisioned ID.
Definition i3c.h:868
This structure is common to all I3C drivers and is expected to be the first element in the object poi...
Definition i3c.h:1191
uint8_t primary_controller_da
I3C Primary Controller Dynamic Address.
Definition i3c.h:1197
struct i3c_dev_list dev_list
I3C/I2C device list struct.
Definition i3c.h:1194
This structure is common to all I3C drivers and is expected to be the first element in the driver's s...
Definition i3c.h:1212
struct i3c_config_controller ctrl_config
Controller Configuration.
Definition i3c.h:1214
struct i3c_ccc_deftgts * deftgts
Received DEFTGTS Pointer.
Definition i3c.h:1220
bool deftgts_refreshed
DEFTGTS refreshed.
Definition i3c.h:1223
struct i3c_dev_attached_list attached_dev
Attached I3C/I2C devices and addresses.
Definition i3c.h:1217
Structure describing a I2C device on I3C bus.
Definition i3c.h:1103
const struct device * bus
I3C bus to which this I2C device is attached.
Definition i3c.h:1107
uint8_t lvr
Legacy Virtual Register (LVR)
Definition i3c.h:1116
uint16_t addr
Static address for this I2C device.
Definition i3c.h:1110
sys_snode_t node
Definition i3c.h:1104
Struct for IBI request.
Definition ibi.h:58
Definition i3c.h:2675
const struct device * bus
Definition i3c.h:2676
const struct i3c_device_id dev_id
Definition i3c.h:2677
One I3C Message.
Definition i3c.h:399
uint8_t flags
Flags for this message.
Definition i3c.h:424
uint8_t hdr_mode
HDR mode (I3C_MSG_HDR_MODE*) for transfer if any I3C_MSG_HDR_* is set in flags.
Definition i3c.h:432
uint32_t num_xfer
Total number of bytes transferred.
Definition i3c.h:413
uint8_t * buf
Data buffer in bytes.
Definition i3c.h:401
uint8_t hdr_cmd_code
HDR command code field (7-bit) for HDR-DDR, HDR-TSP and HDR-TSL.
Definition i3c.h:435
uint32_t len
Length of buffer in bytes.
Definition i3c.h:404
enum i3c_sdr_controller_error_types err
SDR Error Type.
Definition i3c.h:421
Structure describing a device that supports the I3C target API.
Definition target_device.h:102
A structure used to submit work.
Definition kernel.h:4253
API that an RTIO IO device should implement.
Definition rtio.h:524
Compute the mempool block index for a given pointer.
Definition rtio.h:514
struct rtio_sqe sqe
Definition rtio.h:515
An IO device with a function table for submitting requests.
Definition rtio.h:539
void * data
Definition rtio.h:544
A submission queue event.
Definition rtio.h:295
const struct rtio_iodev * iodev
Device to operation on.
Definition rtio.h:304
An RTIO context containing what can be viewed as a pair of queues.
Definition rtio.h:418
Misc utilities.