linux-4.4.1/of_platform_populate()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#g8288de4]
#backlinks
*説明 [#efbccee8]
-パス: [[linux-4.4.1/drivers/of/platform.c]]
-FIXME: これは何?
--説明
**引数 [#k5c770d8]
-struct device_node *root
--
--[[linux-4.4.1/device_node]]
-const struct of_device_id *matches
--
--[[linux-4.4.1/of_device_id]]
-const struct of_dev_auxdata *lookup
--
--[[linux-4.4.1/of_dev_auxdata]]
-struct device *parent
--
--[[linux-4.4.1/device]]
**返り値 [#te89905a]
-int
--
**参考 [#hb30b6dd]
*実装 [#c1364f3b]
/**
* of_platform_populate() - Populate platform_devices fr...
* @root: parent of the first level to probe or NULL for...
* @matches: match table, NULL to use the default
* @lookup: auxdata table for matching id and platform_d...
* @parent: parent to hook devices from, NULL for toplevel
*
* Similar to of_platform_bus_probe(), this function wal...
* and creates devices from nodes. It differs in that i...
* convention of requiring all device nodes to have a 'c...
* and it is suitable for creating devices which are chi...
* node (of_platform_bus_probe will only create children...
* are selected by the @matches argument).
*
* New board support should be using this function inste...
* of_platform_bus_probe().
*
* Returns 0 on success, < 0 on failure.
*/
int of_platform_populate(struct device_node *root,
const struct of_device_id *match...
const struct of_dev_auxdata *loo...
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()]]
for_each_child_of_node(root, child) {
rc = of_platform_bus_create(child, match...
if (rc) {
of_node_put(child);
break;
}
}
of_node_set_flag(root, OF_POPULATED_BUS);
-
--[[linux-4.4.1/for_each_child_of_node()]]
--[[linux-4.4.1/of_platform_bus_create()]]
--[[linux-4.4.1/of_node_put()]]
--[[linux-4.4.1/of_node_set_flag()]]
of_node_put(root);
return rc;
}
EXPORT_SYMBOL_GPL(of_platform_populate);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#ve8d4361]
終了行:
*参照元 [#g8288de4]
#backlinks
*説明 [#efbccee8]
-パス: [[linux-4.4.1/drivers/of/platform.c]]
-FIXME: これは何?
--説明
**引数 [#k5c770d8]
-struct device_node *root
--
--[[linux-4.4.1/device_node]]
-const struct of_device_id *matches
--
--[[linux-4.4.1/of_device_id]]
-const struct of_dev_auxdata *lookup
--
--[[linux-4.4.1/of_dev_auxdata]]
-struct device *parent
--
--[[linux-4.4.1/device]]
**返り値 [#te89905a]
-int
--
**参考 [#hb30b6dd]
*実装 [#c1364f3b]
/**
* of_platform_populate() - Populate platform_devices fr...
* @root: parent of the first level to probe or NULL for...
* @matches: match table, NULL to use the default
* @lookup: auxdata table for matching id and platform_d...
* @parent: parent to hook devices from, NULL for toplevel
*
* Similar to of_platform_bus_probe(), this function wal...
* and creates devices from nodes. It differs in that i...
* convention of requiring all device nodes to have a 'c...
* and it is suitable for creating devices which are chi...
* node (of_platform_bus_probe will only create children...
* are selected by the @matches argument).
*
* New board support should be using this function inste...
* of_platform_bus_probe().
*
* Returns 0 on success, < 0 on failure.
*/
int of_platform_populate(struct device_node *root,
const struct of_device_id *match...
const struct of_dev_auxdata *loo...
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()]]
for_each_child_of_node(root, child) {
rc = of_platform_bus_create(child, match...
if (rc) {
of_node_put(child);
break;
}
}
of_node_set_flag(root, OF_POPULATED_BUS);
-
--[[linux-4.4.1/for_each_child_of_node()]]
--[[linux-4.4.1/of_platform_bus_create()]]
--[[linux-4.4.1/of_node_put()]]
--[[linux-4.4.1/of_node_set_flag()]]
of_node_put(root);
return rc;
}
EXPORT_SYMBOL_GPL(of_platform_populate);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#ve8d4361]
ページ名: