Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
I3C Devicetree related bits

I3C Devicetree related bits . More...

Macros

#define I3C_DEVICE_ID_DT(node_id)
 Structure initializer for i3c_device_id from devicetree.
 
#define I3C_DEVICE_ID_DT_INST(inst)
 Structure initializer for i3c_device_id from devicetree instance.
 
#define I3C_DEVICE_DESC_DT(node_id)
 Structure initializer for i3c_device_desc from devicetree.
 
#define I3C_DEVICE_DESC_DT_INST(inst)
 Structure initializer for i3c_device_desc from devicetree instance.
 
#define I3C_DEVICE_DESC_DT_FILTERED(node_id)
 Structure initializer for i3c_device_desc from devicetree.
 
#define I3C_DEVICE_ARRAY_DT(node_id)
 Array initializer for a list of i3c_device_desc from devicetree.
 
#define I3C_DEVICE_ARRAY_DT_INST(inst)
 Array initializer for a list of i3c_device_desc from devicetree instance.
 
#define I3C_DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, prio, api, ...)
 Like DEVICE_DT_DEFINE() with I3C target device specifics.
 
#define I3C_DEVICE_DT_INST_DEFINE(inst, ...)
 Like I3C_TARGET_DT_DEFINE() for an instance of a DT_DRV_COMPAT compatible.
 
#define I3C_I2C_DEVICE_DESC_DT(node_id)
 Structure initializer for i3c_i2c_device_desc from devicetree.
 
#define I3C_I2C_DEVICE_DESC_DT_INST(inst)
 Structure initializer for i3c_i2c_device_desc from devicetree instance.
 
#define I3C_I2C_DEVICE_DESC_DT_FILTERED(node_id)
 Structure initializer for i3c_i2c_device_desc from devicetree.
 
#define I3C_I2C_DEVICE_ARRAY_DT(node_id)
 Array initializer for a list of i3c_i2c_device_desc from devicetree.
 
#define I3C_I2C_DEVICE_ARRAY_DT_INST(inst)
 Array initializer for a list of i3c_i2c_device_desc from devicetree instance.
 

Detailed Description

I3C Devicetree related bits .

Macro Definition Documentation

◆ I3C_DEVICE_ARRAY_DT

#define I3C_DEVICE_ARRAY_DT ( node_id)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
{ \
DT_FOREACH_CHILD_STATUS_OKAY( \
node_id, \
}
#define I3C_DEVICE_DESC_DT_FILTERED(node_id)
Structure initializer for i3c_device_desc from devicetree.
Definition devicetree.h:97

Array initializer for a list of i3c_device_desc from devicetree.

This is a helper macro to generate an array for a list of i3c_device_desc from device tree.

Parameters
node_idDevicetree node identifier of the I3C controller

◆ I3C_DEVICE_ARRAY_DT_INST

#define I3C_DEVICE_ARRAY_DT_INST ( inst)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
#define DT_DRV_INST(inst)
Node identifier for an instance of a DT_DRV_COMPAT compatible.
Definition devicetree.h:3802
#define I3C_DEVICE_ARRAY_DT(node_id)
Array initializer for a list of i3c_device_desc from devicetree.
Definition devicetree.h:109

Array initializer for a list of i3c_device_desc from devicetree instance.

This is equivalent to

Parameters
instDevicetree instance number of the I3C controller

◆ I3C_DEVICE_DESC_DT

#define I3C_DEVICE_DESC_DT ( node_id)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
{ \
.bus = DEVICE_DT_GET(DT_BUS(node_id)), \
.dev = DEVICE_DT_GET(node_id), \
.static_addr = DT_PROP_BY_IDX(node_id, reg, 0), \
.pid = ((uint64_t)DT_PROP_BY_IDX(node_id, reg, 1) << 32)\
| DT_PROP_BY_IDX(node_id, reg, 2), \
.init_dynamic_addr = \
DT_PROP_OR(node_id, assigned_address, 0), \
.supports_setaasa = DT_PROP(node_id, supports_setaasa), \
},
#define DEVICE_DT_GET(node_id)
Get a device reference from a devicetree node identifier.
Definition device.h:255
#define DT_BUS(node_id)
Node's bus controller.
Definition devicetree.h:3754
#define DT_PROP_BY_IDX(node_id, prop, idx)
Get the value at index idx in an array type property.
Definition devicetree.h:891
#define DT_PROP(node_id, prop)
Get a devicetree property value.
Definition devicetree.h:745
__UINT64_TYPE__ uint64_t
Definition stdint.h:91

Structure initializer for i3c_device_desc from devicetree.

This helper macro expands to a static initializer for a struct i3c_device_desc by reading the relevant bus and device data from the devicetree.

Parameters
node_idDevicetree node identifier for the I3C device whose struct i3c_device_desc to create an initializer for

◆ I3C_DEVICE_DESC_DT_FILTERED

#define I3C_DEVICE_DESC_DT_FILTERED ( node_id)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
COND_CODE_0(DT_PROP_BY_IDX(node_id, reg, 1), \
(), (I3C_DEVICE_DESC_DT(node_id)))
#define I3C_DEVICE_DESC_DT(node_id)
Structure initializer for i3c_device_desc from devicetree.
Definition devicetree.h:65
#define COND_CODE_0(_flag, _if_0_code, _else_code)
Like COND_CODE_1() except tests if _flag is 0.
Definition util_macro.h:211

Structure initializer for i3c_device_desc from devicetree.

This is mainly used by I3C_DEVICE_ARRAY_DT() to only create a struct if and only if it is an I3C device.

◆ I3C_DEVICE_DESC_DT_INST

#define I3C_DEVICE_DESC_DT_INST ( inst)

#include <zephyr/drivers/i3c/devicetree.h>

Value:

Structure initializer for i3c_device_desc from devicetree instance.

This is equivalent to

Parameters
instDevicetree instance number

◆ I3C_DEVICE_DT_DEFINE

#define I3C_DEVICE_DT_DEFINE ( node_id,
init_fn,
pm,
data,
config,
level,
prio,
api,
... )

#include <zephyr/drivers/i3c/devicetree.h>

Value:
DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, \
prio, api, __VA_ARGS__)
#define DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, prio, api,...)
Create a device object from a devicetree node identifier and set it up for boot time initialization.
Definition device.h:203

Like DEVICE_DT_DEFINE() with I3C target device specifics.

Defines a I3C target device which implements the I3C target device API.

Parameters
node_idThe devicetree node identifier.
init_fnName of the init function of the driver.
pmPM device resources reference (NULL if device does not use PM).
dataPointer to the device's private data.
configThe address to the structure containing the configuration information for this instance of the driver.
levelThe initialization level. See SYS_INIT() for details.
prioPriority within the selected initialization level. See SYS_INIT() for details.
apiProvides an initial pointer to the API function struct used by the driver. Can be NULL.

◆ I3C_DEVICE_DT_INST_DEFINE

#define I3C_DEVICE_DT_INST_DEFINE ( inst,
... )

#include <zephyr/drivers/i3c/devicetree.h>

Value:
I3C_DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
#define I3C_DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, prio, api,...)
Like DEVICE_DT_DEFINE() with I3C target device specifics.
Definition devicetree.h:154

Like I3C_TARGET_DT_DEFINE() for an instance of a DT_DRV_COMPAT compatible.

Parameters
instinstance number. This is replaced by DT_DRV_COMPAT(inst) in the call to I3C_TARGET_DT_DEFINE().
...other parameters as expected by I3C_TARGET_DT_DEFINE().

◆ I3C_DEVICE_ID_DT

#define I3C_DEVICE_ID_DT ( node_id)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
{ \
.pid = ((uint64_t)DT_PROP_BY_IDX(node_id, reg, 1) << 32)\
| DT_PROP_BY_IDX(node_id, reg, 2), \
}

Structure initializer for i3c_device_id from devicetree.

This helper macro expands to a static initializer for a struct i3c_device_id by reading the relevant device data from devicetree.

Parameters
node_idDevicetree node identifier for the I3C device whose struct i3c_device_id to create an initializer for

◆ I3C_DEVICE_ID_DT_INST

#define I3C_DEVICE_ID_DT_INST ( inst)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
#define I3C_DEVICE_ID_DT(node_id)
Structure initializer for i3c_device_id from devicetree.
Definition devicetree.h:36

Structure initializer for i3c_device_id from devicetree instance.

This is equivalent to

Parameters
instDevicetree instance number

◆ I3C_I2C_DEVICE_ARRAY_DT

#define I3C_I2C_DEVICE_ARRAY_DT ( node_id)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
{ \
DT_FOREACH_CHILD_STATUS_OKAY( \
node_id, \
}
#define I3C_I2C_DEVICE_DESC_DT_FILTERED(node_id)
Structure initializer for i3c_i2c_device_desc from devicetree.
Definition devicetree.h:206

Array initializer for a list of i3c_i2c_device_desc from devicetree.

This is a helper macro to generate an array for a list of i3c_i2c_device_desc from device tree.

Parameters
node_idDevicetree node identifier of the I3C controller

◆ I3C_I2C_DEVICE_ARRAY_DT_INST

#define I3C_I2C_DEVICE_ARRAY_DT_INST ( inst)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
#define I3C_I2C_DEVICE_ARRAY_DT(node_id)
Array initializer for a list of i3c_i2c_device_desc from devicetree.
Definition devicetree.h:218

Array initializer for a list of i3c_i2c_device_desc from devicetree instance.

This is equivalent to

Parameters
instDevicetree instance number of the I3C controller

◆ I3C_I2C_DEVICE_DESC_DT

#define I3C_I2C_DEVICE_DESC_DT ( node_id)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
{ \
.bus = DEVICE_DT_GET(DT_BUS(node_id)), \
.addr = DT_PROP_BY_IDX(node_id, reg, 0), \
.lvr = DT_PROP_BY_IDX(node_id, reg, 2), \
},

Structure initializer for i3c_i2c_device_desc from devicetree.

This helper macro expands to a static initializer for a i3c_i2c_device_desc by reading the relevant bus and device data from the devicetree.

Parameters
node_idDevicetree node identifier for the I3C device whose struct i3c_i2c_device_desc to create an initializer for

◆ I3C_I2C_DEVICE_DESC_DT_FILTERED

#define I3C_I2C_DEVICE_DESC_DT_FILTERED ( node_id)

#include <zephyr/drivers/i3c/devicetree.h>

Value:
COND_CODE_0(DT_PROP_BY_IDX(node_id, reg, 1), \
(I3C_I2C_DEVICE_DESC_DT(node_id)), ())
#define I3C_I2C_DEVICE_DESC_DT(node_id)
Structure initializer for i3c_i2c_device_desc from devicetree.
Definition devicetree.h:179

Structure initializer for i3c_i2c_device_desc from devicetree.

This is mainly used by I3C_I2C_DEVICE_ARRAY_DT() to only create a struct if and only if it is an I2C device.

◆ I3C_I2C_DEVICE_DESC_DT_INST

#define I3C_I2C_DEVICE_DESC_DT_INST ( inst)

#include <zephyr/drivers/i3c/devicetree.h>

Value:

Structure initializer for i3c_i2c_device_desc from devicetree instance.

This is equivalent to

Parameters
instDevicetree instance number