Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
I3C In-Band Interrupts. More...
Data Structures | |
struct | i3c_ibi |
Struct for IBI request. More... | |
struct | i3c_ibi_payload |
Structure of payload buffer for IBI. More... | |
struct | i3c_ibi_work |
Node about a queued IBI. More... | |
Macros | |
#define | CONFIG_I3C_IBI_MAX_PAYLOAD_SIZE 0 |
Typedefs | |
typedef 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. | |
Enumerations | |
enum | i3c_ibi_type { I3C_IBI_TARGET_INTR , I3C_IBI_CONTROLLER_ROLE_REQUEST , I3C_IBI_HOTJOIN , I3C_IBI_TYPE_MAX = I3C_IBI_HOTJOIN , I3C_IBI_WORKQUEUE_CB } |
IBI Types. More... | |
Functions | |
static int | i3c_ibi_raise (const struct device *dev, struct i3c_ibi *request) |
Raise an In-Band Interrupt (IBI). | |
static int | i3c_ibi_enable (struct i3c_device_desc *target) |
Enable IBI of a target device. | |
static int | i3c_ibi_disable (struct i3c_device_desc *target) |
Disable IBI of a target device. | |
static int | i3c_ibi_has_payload (struct i3c_device_desc *target) |
Check if target's IBI has payload. | |
static int | i3c_device_is_ibi_capable (struct i3c_device_desc *target) |
Check if device is IBI capable. | |
int | i3c_ibi_work_enqueue (struct i3c_ibi_work *ibi_work) |
Queue an IBI work item for future processing. | |
int | i3c_ibi_work_enqueue_target_irq (struct i3c_device_desc *target, uint8_t *payload, size_t payload_len) |
Queue a target interrupt IBI for future processing. | |
int | i3c_ibi_work_enqueue_hotjoin (const struct device *dev) |
Queue a hot join IBI for future processing. | |
int | i3c_ibi_work_enqueue_cb (const struct device *dev, k_work_handler_t work_cb) |
Queue a generic callback for future processing. | |
I3C In-Band Interrupts.
#define CONFIG_I3C_IBI_MAX_PAYLOAD_SIZE 0 |
#include <include/zephyr/drivers/i3c/ibi.h>
typedef int(* i3c_target_ibi_cb_t) (struct i3c_device_desc *target, struct i3c_ibi_payload *payload) |
#include <include/zephyr/drivers/i3c/ibi.h>
Function called when In-Band Interrupt received from target device.
This function is invoked by the controller when the controller receives an In-Band Interrupt from the target device.
A success return shall cause the controller to ACK the next byte received. An error return shall cause the controller to NACK the next byte received.
target | the device description structure associated with the device to which the operation is addressed. |
payload | Payload associated with the IBI. NULL if there is no payload. |
enum i3c_ibi_type |
#include <include/zephyr/drivers/i3c/ibi.h>
IBI Types.
|
inlinestatic |
#include <include/zephyr/drivers/i3c.h>
Check if device is IBI capable.
This reads the BCR from the device descriptor struct to determine whether device is capable of IBI.
Note that BCR must have been obtained from device and
|
inlinestatic |
#include <include/zephyr/drivers/i3c.h>
Disable IBI of a target device.
This enables IBI of a target device where the IBI has already been request.
target | I3C target device descriptor. |
0 | If successful. |
-EIO | General Input / output error. |
-ENODEV | If IBI is not previously enabled for target . |
|
inlinestatic |
#include <include/zephyr/drivers/i3c.h>
Enable IBI of a target device.
This enables IBI of a target device where the IBI has already been request.
target | I3C target device descriptor. |
0 | If successful. |
-EIO | General Input / output error. |
-ENOMEM | If these is no more empty entries in the controller's IBI table (if the controller uses such table). |
|
inlinestatic |
#include <include/zephyr/drivers/i3c.h>
Check if target's IBI has payload.
This reads the BCR from the device descriptor struct to determine whether IBI from device has payload.
Note that BCR must have been obtained from device and
#include <include/zephyr/drivers/i3c.h>
Raise an In-Band Interrupt (IBI).
This raises an In-Band Interrupt (IBI) to the active controller.
dev | Pointer to controller device driver instance. |
request | Pointer to the IBI request struct. |
0 | if operation is successful. |
-EIO | General input / output error. |
int i3c_ibi_work_enqueue | ( | struct i3c_ibi_work * | ibi_work | ) |
#include <include/zephyr/drivers/i3c/ibi.h>
Queue an IBI work item for future processing.
This queues up an IBI work item in the IBI workqueue for future processing.
Note that this will copy the ibi_work
struct into internal structure. If there is not enough space to copy the ibi_work
struct, this returns -ENOMEM.
ibi_work | Pointer to the IBI work item struct. |
0 | If work item is successfully queued. |
-ENOMEM | If no more free internal node to store IBI work item. |
Others |
int i3c_ibi_work_enqueue_cb | ( | const struct device * | dev, |
k_work_handler_t | work_cb | ||
) |
#include <include/zephyr/drivers/i3c/ibi.h>
Queue a generic callback for future processing.
This queues up a generic callback in the IBI workqueue for future processing.
dev | Pointer to controller device driver instance. |
work_cb | Callback function. |
0 | If work item is successfully queued. |
-ENOMEM | If no more free internal node to store IBI work item. |
Others |
int i3c_ibi_work_enqueue_hotjoin | ( | const struct device * | dev | ) |
#include <include/zephyr/drivers/i3c/ibi.h>
Queue a hot join IBI for future processing.
This queues up a hot join IBI in the IBI workqueue for future processing.
dev | Pointer to controller device driver instance. |
0 | If work item is successfully queued. |
-ENOMEM | If no more free internal node to store IBI work item. |
Others |
int i3c_ibi_work_enqueue_target_irq | ( | struct i3c_device_desc * | target, |
uint8_t * | payload, | ||
size_t | payload_len | ||
) |
#include <include/zephyr/drivers/i3c/ibi.h>
Queue a target interrupt IBI for future processing.
This queues up a target interrupt IBI in the IBI workqueue for future processing.
target | Pointer to target device descriptor. |
payload | Pointer to IBI payload byte array. |
payload_len | Length of payload byte array. |
0 | If work item is successfully queued. |
-ENOMEM | If no more free internal node to store IBI work item. |
Others |