of_find_property(np, name, lenp)等函数的理解

1.

of_get_property(device, "compatible", &cplen);

// 通过所给的名字找到相应节点的属性



2.

of_find_property(np, name, lenp);

//这个函数与of_get_property()不同的是返回值变为property。


3.

for_each_compatible_node(np, NULL, "atmel,at91rm9200-gpio")

//对每个节点进行属性的查询操作


4.

of_device_is_compatible(np, compatible) && of_node_get(np))

// 核查所给的"compat" 字符串能否匹配某个device node中的"compatible" 属性。


5.

of_find_compatible_node(NULL, type, compatible)

//通过type参数找到相应类型的节点,并且节点的一个tokens在参数compatible属性中。



你可能感兴趣的:(of_find_property(np, name, lenp)等函数的理解)