summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-12-11 13:31:14 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-12-11 13:31:14 +0100
commit2eee1db406d961e61aaf7c12150c6bb835ab8c2f (patch)
tree8856f4a81afce77fec0fea01cedc695814c73d4b /drivers/of
parent5f2377ac5502559ecfb7d70c2c99e5d553de1cd5 (diff)
parentc06cd360830e83d4d916da3918a4f819d59230e9 (diff)
downloadbarebox-2eee1db406d961e61aaf7c12150c6bb835ab8c2f.tar.gz
barebox-2eee1db406d961e61aaf7c12150c6bb835ab8c2f.tar.xz
Merge branch 'for-next/rpi'
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/base.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index dcb5ccd018..edb0a8e71a 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2567,6 +2567,21 @@ int of_device_disable_path(const char *path)
}
/**
+ * of_device_disable_by_alias - disable a devicenode by alias
+ * @alias - the alias of the device tree node to disable
+ */
+int of_device_disable_by_alias(const char *alias)
+{
+ struct device_node *node;
+
+ node = of_find_node_by_alias(NULL, alias);
+ if (!node)
+ return -ENODEV;
+
+ return of_device_disable(node);
+}
+
+/**
* of_get_reproducible_name() - get a reproducible name of a node
* @node: The node to get a name from
*