Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] scripts: gen_defines: expose controllers in interrupts-extended prop #66687

Conversation

ycsin
Copy link
Member

@ycsin ycsin commented Dec 20, 2023

This patch basically outputs the parent controller(s) in the interrupts-extended if it is available as IRQ_*_VAL_parent, along with IRQ_*_VAL_irq & IRQ_*_VAL_priority, the upside to this is that it can be accessed with existing DT macros, the downside is that it looks somewhat like a hack.

fixes #66682

Currently the generated devicetree only has the interrupt
number in the `interrupts-extended` properties, the controller
for the interrupt isn't exposed and can't be access in the
source.

This patch exposes those controllers as `parent` cell in
`devicetree_generated.h`, i.e.:

```c
#define DT_<node>_IRQ_IDX_0_VAL_parent DT_<node>
#define DT_<node>_IRQ_IDX_0_VAL_parent_EXISTS 1
```

so that they can be accessed by `DT_IRQ_*` macros, i.e.:
- DT_IRQ_BY_IDX(node_id, idx, cell)
- DT_IRQ_BY_NAME(node_id, name, cell)

Updated devicetree api tests to complement this addition.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
@ycsin ycsin added the RFC Request For Comments: want input from the community label Dec 20, 2023
@ycsin
Copy link
Member Author

ycsin commented Dec 21, 2023

superseded by #66707

@ycsin ycsin closed this Dec 21, 2023
@ycsin ycsin deleted the pr/gen_defines_interrupts_extended branch January 23, 2024 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree area: Interrupt Controller RFC Request For Comments: want input from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dts: unable to access the interrupt controller in interrupts-extended
4 participants