Devicetree: Macro to get the property value by cell name #76802
shivakumar361
started this conversation in
RFC
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider following device tree node:
In the source file above irq lines can be assiged to an array using macro DT_PROP(irq, irq_lines)
Consider another device tree where we have interrupt lines and their priority listed as below:
irq_lines cells can be named as line_no and priority i.e for first element line_no is 101 and priority is 1, second one has line_no as 102 and priority is 2 etc. But we dont have macro to assign the line_no and priority cell values to an array i.e.
There exists another macro DT_IRQ_BY_IDX(NodeId, IDX, cell_name) but this is build time macro and IDX value cannot be passed during run time.
Can we enhance Zephyr device tree parser to support the above use case and introduce new macro DT_PROP_BY_CELL(NodeId, property_name, cell_name)?
Beta Was this translation helpful? Give feedback.
All reactions