of_fdt_is_compatible(9)
π of_fdt_is_compatible(9) π
okay so bestie, welcome to the of_fdt_is_compatible(9) page β it lives in the Kernel API Manual and honestly it's giving tiny-but-mighty energy. it does exactly one thing and it does it well: it tells you whether a given node (from a given blob) has your compat string chilling in its compatible list. that's it. that's the whole personality. π
β¨ NAME β¨
of_fdt_is_compatible β return true if the given node from the given blob has compat in its compatible list. no cap, that's literally the job π
πΈ SYNOPSIS πΈ
int of_fdt_is_compatible (const void *blob , unsigned long node , const
char *compat );
likeβ¦ it's a function. it takes three things. it returns an int. we love a low-drama signature π«Ά
π¦ ARGUMENTS π¦
blobβ a device tree blob. yes, the whole blob. it's the vibe provider for everything else here πnodeβ the node to test. this is the one we're putting under the microscope, slay πcompatβ the compatible string to compare with the compatible list. this is your search term, your main character string π
β RETURN β
it returns a non-zero value on match β and here's the cute part: smaller values are returned for more specific compatible values. so the number isn't just "yes", it's "yes and here's how specific it is". iykyk π
π§ SEE ALSO π§
okay this list is lowkey a whole friend group, get comfy:
- Kernel file
./drivers/of/fdt.cβunflatten_dt_nodes(9) __unflatten_device_tree(9)of_fdt_unflatten_tree(9)early_init_fdt_scan_reserved_mem(9)early_init_fdt_reserve_self(9)of_scan_flat_dt(9)of_scan_flat_dt_subnodes(9)of_get_flat_dt_subnode_by_name(9)of_flat_dt_is_compatible(9)of_flat_dt_match_machine(9)early_init_dt_check_for_initrd(9)early_init_dt_check_for_elfcorehdr(9)early_init_dt_check_for_usable_mem_range(9)early_init_dt_check_kho(9)unflatten_device_tree(9)unflatten_and_copy_device_tree(9)
go read them. they're all iconic in their own way, fr fr ππ
π reminder that this page is sourced from ./drivers/of β that's where all the flat-device-tree lore lives π
and that's a wrap bestie!! this one's dated October 2026, sourced from ./drivers/of, and yes the page name is literally of_fdt_is_compatible(9) β drink some water, go read ./drivers/of/fdt.c, and slay your device tree π
β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms