设备树中相关函数
来源:互联网 发布:云计算第二版 编辑:程序博客网 时间:2024/06/06 13:04
1.结构关系
device_node 结构被 device 结构包含
struct device {... struct device_node *of_node; /* associated device tree node */...}
2.相关函数
drivers/of 目录下的相关文件封装了所有的 device dree的设备相关函数
2.1 base
// (1)判断 node 中是否有这个 name 名字的属性,没有就返回 null ☆const void *of_get_property(const struct device_node *np, const char *name, int *lenp) //(2)判断设备结点是否被使能 Returns 1 if the status property is absent or set to "okay" or "ok", 0 otherwiseint of_device_is_available(const struct device_node *device) // (3)判断设备结点的 compatible 属性是否包含compat指定的字符串,有返回1,无返回0int of_device_is_compatible(const struct device_node *device,const char *compat);
2.2 driver
2.3 device
//为dev从 matches 结构数组中找到匹配的描述,返回这个matches中的结构 --- 用于一个驱动支持多种设备的情况 struct of_device_id *of_match_device(const struct of_device_id *matches,const struct device *dev)/*1. 将设备树中的内存资源获取到并且映射为虚拟内存 */ // 内存void __iomem *of_iomap(struct device_node *np, int index) // 从设备树获取内存返回内存资源 of_address_to_resource(struct device_node *dev, int index, struct resource *r) // 从设备树节点中获取内存资源的起始地址和长度 of_get_address(struct device_node *dev, int index, u64 *size, unsigned int *flags)
0 0
- 设备树中相关函数
- 字符设备相关函数
- 设备文件相关函数
- 字符设备注册相关函数
- 设备树相关
- 设备树相关知识
- linux字符设备注册相关函数
- linux字符设备注册相关函数
- 设备号相关概念与函数
- linux设备模型_____相关函数
- 设备上下文的属性及其相关函数
- Android开发中获取设备相关信息
- ubuntu系统中网卡设备相关信息
- iphone中获取设备的相关信息
- 设备驱动程序设计中相关问题分析
- of_alias_get_id 函数与设备树中aliases节点的关系
- 设备相关
- 字符设备驱动相关函数及数据结构简介 (ldd3)
- 最新Android系统版本与API等级对应关系表
- java对象池示例
- docker: 为运行的container增加多个端口
- 代码大全-读书笔记
- redis学习记录05-redis事务
- 设备树中相关函数
- 读书笔记:Histograms of Oriented Gradients for Human Detection
- python基础学习之字符串的格式化
- jvm 虚拟机
- visibility:collapse
- 时钟夹角
- SSM框架整合(二)
- 宏定义(#define)和常量(const)的区别
- Oracle 默认时间格式 & Date格式转换