summaryrefslogtreecommitdiffstats
path: root/include/of.h
diff options
context:
space:
mode:
authorTeresa Gámez <t.gamez@phytec.de>2014-11-03 13:31:52 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-11-03 15:44:18 +0100
commit3249a71b269c3c929912195c81486caa8b6a1a35 (patch)
tree5483aa45b661d207ffc89473a1cef22e81621f66 /include/of.h
parent1b5061b7fa20c2fc733f38df447be239f7a0f64f (diff)
downloadbarebox-3249a71b269c3c929912195c81486caa8b6a1a35.tar.gz
barebox-3249a71b269c3c929912195c81486caa8b6a1a35.tar.xz
of: Add of_device_enable_and_register functions
Function to enable and register a disabled device. The devices can be registered using the device node with of_device_enable_and_register() or with the device node name/path by using the of_device_enable_and_register_by_name() function. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/of.h')
-rw-r--r--include/of.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h
index 29694a9020..7b93c58474 100644
--- a/include/of.h
+++ b/include/of.h
@@ -227,6 +227,8 @@ extern int of_platform_populate(struct device_node *root,
const struct of_device_id *matches,
struct device_d *parent);
extern struct device_d *of_find_device_by_node(struct device_node *np);
+extern struct device_d *of_device_enable_and_register(struct device_node *np);
+extern struct device_d *of_device_enable_and_register_by_name(const char *name);
struct cdev *of_parse_partition(struct cdev *cdev, struct device_node *node);
int of_parse_partitions(struct cdev *cdev, struct device_node *node);
@@ -582,6 +584,18 @@ static inline struct device_d *of_find_device_by_node(struct device_node *np)
{
return NULL;
}
+
+static inline struct device_d *of_device_enable_and_register(
+ struct device_node *np)
+{
+ return NULL;
+}
+
+static inline struct device_d *of_device_enable_and_register_by_name(
+ const char *name)
+{
+ return NULL;
+}
#endif
#define for_each_node_by_name(dn, name) \