aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 72843b72a2b2..a093b2fe5dfb 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -22,6 +22,7 @@
22#include <linux/mod_devicetable.h> 22#include <linux/mod_devicetable.h>
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/topology.h> 24#include <linux/topology.h>
25#include <linux/notifier.h>
25 26
26#include <asm/byteorder.h> 27#include <asm/byteorder.h>
27#include <asm/errno.h> 28#include <asm/errno.h>
@@ -267,16 +268,28 @@ extern int of_alias_get_id(struct device_node *np, const char *stem);
267 268
268extern int of_machine_is_compatible(const char *compat); 269extern int of_machine_is_compatible(const char *compat);
269 270
270extern int prom_add_property(struct device_node* np, struct property* prop); 271extern int of_add_property(struct device_node *np, struct property *prop);
271extern int prom_remove_property(struct device_node *np, struct property *prop); 272extern int of_remove_property(struct device_node *np, struct property *prop);
272extern int prom_update_property(struct device_node *np, 273extern int of_update_property(struct device_node *np, struct property *newprop);
273 struct property *newprop);
274 274
275#if defined(CONFIG_OF_DYNAMIC)
276/* For updating the device tree at runtime */ 275/* For updating the device tree at runtime */
277extern void of_attach_node(struct device_node *); 276#define OF_RECONFIG_ATTACH_NODE 0x0001
278extern void of_detach_node(struct device_node *); 277#define OF_RECONFIG_DETACH_NODE 0x0002
279#endif 278#define OF_RECONFIG_ADD_PROPERTY 0x0003
279#define OF_RECONFIG_REMOVE_PROPERTY 0x0004
280#define OF_RECONFIG_UPDATE_PROPERTY 0x0005
281
282struct of_prop_reconfig {
283 struct device_node *dn;
284 struct property *prop;
285};
286
287extern int of_reconfig_notifier_register(struct notifier_block *);
288extern int of_reconfig_notifier_unregister(struct notifier_block *);
289extern int of_reconfig_notify(unsigned long, void *);
290
291extern int of_attach_node(struct device_node *);
292extern int of_detach_node(struct device_node *);
280 293
281#define of_match_ptr(_ptr) (_ptr) 294#define of_match_ptr(_ptr) (_ptr)
282 295