]> git.karo-electronics.de Git - linux-beck.git/commitdiff
of: Introduce device tree node flag helpers.
authorPantelis Antoniou <panto@antoniou-consulting.com>
Fri, 8 Nov 2013 15:03:56 +0000 (17:03 +0200)
committerGrant Likely <grant.likely@linaro.org>
Mon, 3 Feb 2014 14:23:23 +0000 (14:23 +0000)
Helper functions for working with device node flags.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
include/linux/of.h

index 70c64ba17fa51f7cca0e232b8f95b7669f5a3075..3d0593943f47b8c19f65799594cb4212f45aa29f 100644 (file)
@@ -114,6 +114,26 @@ static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
        set_bit(flag, &n->_flags);
 }
 
+static inline void of_node_clear_flag(struct device_node *n, unsigned long flag)
+{
+       clear_bit(flag, &n->_flags);
+}
+
+static inline int of_property_check_flag(struct property *p, unsigned long flag)
+{
+       return test_bit(flag, &p->_flags);
+}
+
+static inline void of_property_set_flag(struct property *p, unsigned long flag)
+{
+       set_bit(flag, &p->_flags);
+}
+
+static inline void of_property_clear_flag(struct property *p, unsigned long flag)
+{
+       clear_bit(flag, &p->_flags);
+}
+
 extern struct device_node *of_find_all_nodes(struct device_node *prev);
 
 /*