of_match_node — check if a device_node has a matching of_match structure
const struct of_device_id * of_match_node ( | const struct of_device_id * matches, |
const struct device_node * node) ; |
Get the best match in matches array for node. Each element of the matches array may specify any or all of compatible, type, or name. If name, type, or compatible in an element is not specified, it must be a string of length zero.
The first string in the node's compatible property is the best match. Matching type is next best, followed by matching name. This results in the following priority order for matches
1. first string in the “compatible” property list && type && name
2. first string in the “compatible” property list && type
3. first string in the “compatible” property list && name
4. first string in the “compatible” property list
5. second string in the “compatible” property list && type && name
6. second string in the “compatible” property list && type
7. second string in the “compatible” property list && name
8. second string in the “compatible” property list
and so on up through the final string in the “compatible” property list. If the ordering of strings in the “compatible” is from the most specific to the least specific, as specified in the bindings standards, then the most specific compatible string is the best match.
If there is no match in the “compatible” property list, the priority order for matches is
1. type && name
2. type
3. name