Signed-off-by: Andrii Anisov <andrii.anisov@globallogic.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
if ( !matches )
return 0;
- while ( matches->path || matches->type || matches->compatible )
+ while ( matches->path || matches->type ||
+ matches->compatible || matches->not_available )
{
bool_t match = 1;
if ( matches->compatible )
match &= dt_device_is_compatible(node, matches->compatible);
+ if ( matches->not_available )
+ match &= !dt_device_is_available(node);
+
if ( match )
return match;
const char *path;
const char *type;
const char *compatible;
+ const bool_t not_available;
};
#define DT_MATCH_PATH(p) { .path = p }
#define DT_MATCH_TYPE(typ) { .type = typ }
#define DT_MATCH_COMPATIBLE(compat) { .compatible = compat }
+#define DT_MATCH_NOT_AVAILABLE() { .not_available = 1 }
typedef u32 dt_phandle;