Concept of named resources
When the driver expects a list of resources of a certain type, you have no guarantee the list is ordered in a manner the driver expects, since the guy who writes the board-level device tree is usually not the one that wrote the driver. A driver may expect, for example, its device node with two IRQ lines, one for the Tx event at index 0, the other for Rx at index 1. What happens if the order is not respected? The driver will have unwanted behavior. To avoid such mismatches, the concept of named resources (clock, irq, dma, reg) has been introduced. It consists of defining our resource list and naming them, so that whatever their indexes are, a given name will always match the resource.
The corresponding properties ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access