*参照元 [#ge275df0]
#backlinks

*説明 [#t41440d4]
-パス: [[linux-4.4.1/drivers/of/platform.c]]

-FIXME: これは何?
--説明


**引数 [#i056db48]
-struct device_node *root
--
--[[linux-4.4.1/device_node]]
-const struct of_device_id *matches
--
--[[linux-4.4.1/of_device_id]]
-struct device *parent
--
--[[linux-4.4.1/device]]


**返り値 [#b8a97ee5]
-int
--


**参考 [#b9b1e261]


*実装 [#v412c01b]
 /**
  * of_platform_bus_probe() - Probe the device-tree for platform buses
  * @root: parent of the first level to probe or NULL for the root of the tree
  * @matches: match table for bus nodes
  * @parent: parent to hook devices from, NULL for toplevel
  *
  * Note that children of the provided root are not instantiated as devices
  * unless the specified root itself matches the bus list and is not NULL.
  */
 int of_platform_bus_probe(struct device_node *root,
                           const struct of_device_id *matches,
                           struct device *parent)
 {
         struct device_node *child;
         int rc = 0;
 
-
--[[linux-4.4.1/device_node]]

         root = root ? of_node_get(root) : of_find_node_by_path("/");
         if (!root)
                 return -EINVAL;
 
-
--[[linux-4.4.1/of_node_get()]]
--[[linux-4.4.1/of_find_node_by_path()]]

         pr_debug("of_platform_bus_probe()\n");
         pr_debug(" starting at: %s\n", root->full_name);
 
-
--[[linux-4.4.1/pr_debug()]]

         /* Do a self check of bus type, if there's a match, create children */
         if (of_match_node(matches, root)) {
                 rc = of_platform_bus_create(root, matches, NULL, parent, false);
-
--[[linux-4.4.1/of_match_node()]]
--[[linux-4.4.1/of_platform_bus_create()]]

         } else for_each_child_of_node(root, child) {
                 if (!of_match_node(matches, child))
                         continue;
                 rc = of_platform_bus_create(child, matches, NULL, parent, false);
                 if (rc) {
                         of_node_put(child);
                         break;
                 }
         }
 
-
--[[linux-4.4.1/for_each_child_of_node()]]
--[[linux-4.4.1/of_match_node()]]
--[[linux-4.4.1/of_platform_bus_create()]]
--[[linux-4.4.1/of_node_put()]]

         of_node_put(root);
-
--[[linux-4.4.1/of_node_put()]]

         return rc;
 }
 EXPORT_SYMBOL(of_platform_bus_probe);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]


*コメント [#o007682e]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS