linux-4.4.1/of_platform_bus_probe()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#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 p...
* @root: parent of the first level to probe or NULL for...
* @matches: match table for bus nodes
* @parent: parent to hook devices from, NULL for toplevel
*
* Note that children of the provided root are not insta...
* unless the specified root itself matches the bus list...
*/
int of_platform_bus_probe(struct device_node *root,
const struct of_device_id *mat...
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_b...
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 mat...
if (of_match_node(matches, root)) {
rc = of_platform_bus_create(root, matche...
-
--[[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, match...
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]
終了行:
*参照元 [#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 p...
* @root: parent of the first level to probe or NULL for...
* @matches: match table for bus nodes
* @parent: parent to hook devices from, NULL for toplevel
*
* Note that children of the provided root are not insta...
* unless the specified root itself matches the bus list...
*/
int of_platform_bus_probe(struct device_node *root,
const struct of_device_id *mat...
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_b...
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 mat...
if (of_match_node(matches, root)) {
rc = of_platform_bus_create(root, matche...
-
--[[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, match...
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]
ページ名: