of: Introduce device tree node flag helpers.
authorPantelis Antoniou <panto@antoniou-consulting.com>
Fri, 8 Nov 2013 15:03:56 +0000 (17:03 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 16 Feb 2015 04:51:27 +0000 (13:51 +0900)
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>
(cherry picked from commit 588453c69dace39351129a038dd2796608f74bb3)
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/of.h

index d629a9dc60ce362fb3eaefce685c8b2a9d50921d..61271f9f390bd5da58fc97d0e99bb3247f268136 100644 (file)
@@ -135,6 +135,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);
 
 /*