of_device_is_compatible — check string matches device's “compatible” property
int of_device_is_compatible ( | const struct device_node * device, |
const char * compat) ; |
device
Pointer to node to be checked
compat
Required compatible string, NULL or "" for any match
Checks if the given “compat” string matches one of the strings in the device's “compatible” property
The return score is weighted for the most specific compatible value to get the highest score. This assumes that the ordering of strings in the “compatible” is from the most specific to the least specific, as specified in the bindings standards.