【发布时间】:2015-09-25 12:39:31
【问题描述】:
我有兴趣将一些数据(在运行时动态创建)从父节点传递到设备树中的子节点。例如,我在设备树中有以下条目:
parent_node {
a-string-property = "A string";
a-string-list-property = "first string", "second string";
a-byte-data-property = [0x01 0x23 0x34 0x56];
child-node1 {
first-child-property;
second-child-property = <1>;
a-string-property = "Hello, world";
};
child-node2 {
some_data ;
};
};
据我所知,您无法在运行时创建/更新设备树节点的属性(对吗?)。
那么是否有任何一种机制可以在父节点和子节点之间传递数据(可能通过struct bus_type、struct device 或
struct device_driver)?
此数据传递的最终目的是为设备的内存映射(子节点)的地址转换提供偏移量。
【问题讨论】:
-
你有“父节点和子节点之间传递数据”的例子吗?
-
如果我有例子,我不会问:)
-
“将数据从父母传递给孩子”太模糊了。有很多方法可以传递数据。你能更具体一点吗?你在说什么子系统(时钟,声音,......)?请描述用例。
标签: c linux device-tree