|
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
7#ifndef ZEPHYR_INCLUDE_DRIVERS_I3C_DEVICETREE_H_
8#define ZEPHYR_INCLUDE_DRIVERS_I3C_DEVICETREE_H_
36#define I3C_DEVICE_ID_DT(node_id) \
38 .pid = ((uint64_t)DT_PROP_BY_IDX(node_id, reg, 1) << 32)\
39 | DT_PROP_BY_IDX(node_id, reg, 2), \
52#define I3C_DEVICE_ID_DT_INST(inst) \
53 I3C_DEVICE_ID_DT(DT_DRV_INST(inst))
65#define I3C_DEVICE_DESC_DT(node_id) \
67 .bus = DEVICE_DT_GET(DT_BUS(node_id)), \
68 .dev = DEVICE_DT_GET(node_id), \
69 .static_addr = DT_PROP_BY_IDX(node_id, reg, 0), \
70 .pid = ((uint64_t)DT_PROP_BY_IDX(node_id, reg, 1) << 32)\
71 | DT_PROP_BY_IDX(node_id, reg, 2), \
72 .init_dynamic_addr = \
73 DT_PROP_OR(node_id, assigned_address, 0), \
74 .supports_setaasa = DT_PROP(node_id, supports_setaasa), \
88#define I3C_DEVICE_DESC_DT_INST(inst) \
89 I3C_DEVICE_DESC_DT(DT_DRV_INST(inst))
97#define I3C_DEVICE_DESC_DT_FILTERED(node_id) \
98 COND_CODE_0(DT_PROP_BY_IDX(node_id, reg, 1), \
99 (), (I3C_DEVICE_DESC_DT(node_id)))
109#define I3C_DEVICE_ARRAY_DT(node_id) \
111 DT_FOREACH_CHILD_STATUS_OKAY( \
113 I3C_DEVICE_DESC_DT_FILTERED) \
126#define I3C_DEVICE_ARRAY_DT_INST(inst) \
127 I3C_DEVICE_ARRAY_DT(DT_DRV_INST(inst))
154#define I3C_DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, \
156 DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, \
157 prio, api, __VA_ARGS__)
167#define I3C_DEVICE_DT_INST_DEFINE(inst, ...) \
168 I3C_DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
179#define I3C_I2C_DEVICE_DESC_DT(node_id) \
181 .bus = DEVICE_DT_GET(DT_BUS(node_id)), \
182 .addr = DT_PROP_BY_IDX(node_id, reg, 0), \
183 .lvr = DT_PROP_BY_IDX(node_id, reg, 2), \
196#define I3C_I2C_DEVICE_DESC_DT_INST(inst) \
197 I3C_I2C_DEVICE_DESC_DT(DT_DRV_INST(inst))
206#define I3C_I2C_DEVICE_DESC_DT_FILTERED(node_id) \
207 COND_CODE_0(DT_PROP_BY_IDX(node_id, reg, 1), \
208 (I3C_I2C_DEVICE_DESC_DT(node_id)), ())
218#define I3C_I2C_DEVICE_ARRAY_DT(node_id) \
220 DT_FOREACH_CHILD_STATUS_OKAY( \
222 I3C_I2C_DEVICE_DESC_DT_FILTERED) \
235#define I3C_I2C_DEVICE_ARRAY_DT_INST(inst) \
236 I3C_I2C_DEVICE_ARRAY_DT(DT_DRV_INST(inst))