dts部分OF_API

  1. 用来查找在dtb中的根节点
unsigned long __init of_get_flat_dt_root(void)
  1. 根据deice_node结构的full_name参数,在全局链表of_allnodes中,查找合适的device_node
struct device_node *of_find_node_by_path(const char *path)

例如:

struct device_node *cpus;
cpus=of_find_node_by_path("/cpus");
  1. 若from=NULL,则在全局链表of_allnodes中根据name查找合适的device_node
struct device_node *of_find_node_by_name(struct device_node *from,const char *name)

例如:

struct device_node *np;
np = of_find_node_by_name(NULL,"firewire");
  1. 根据设备类型查找相应的device_node
struct device_node *of_find_node_by_type(struct device_node *from,const char *type)

例如:

struct device_node *tsi_pci;
tsi_pci= of_find_node_by_type(NULL,"pci");
  1. 根据compatible字符串查找device_node
struct device_node *of_find_compatible_node(struct device_node *from,
											const char *type, const char *compatible)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值