of操作函数

of操作函数-获取设备树节点

image

image

image

image

image

image

image

示例
image

根据知道的信息,采用对应的函数


of操作函数-获取属性

image

image

image

image
image

image

image

示例
image

既然device_node会展开成platform_device(满足转换规则的),那么用platform_get_resource获取硬件资源也可以,但是会获取失败,解决方法如下
image


实战检验:解决获取设备树资源失败的问题

image
image
image

解决办法:
image

linux驱动是有难度的,需要付出努力、汗水才能学会linux驱动,理论、实践结合,多思考、动手


一个bug带来的思考-ranges属性

image
image
image
image
image
image

image

image

image


of操作函数-获取中断资源

image

image

image
中断类型如下图:
image

image

image

image
原因是:匹配的不对

示例
image

后面的操作就是中断专题了


posted @ 2023-03-19 10:44  我爱茜茜公主  阅读(49)  评论(0)    收藏  举报