diff options
author | Pantelis Antoniou <panto@antoniou-consulting.com> | 2013-11-08 10:03:56 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-02-03 09:23:23 -0500 |
commit | 588453c69dace39351129a038dd2796608f74bb3 (patch) | |
tree | 3ce73c60467910058be08bbb73ddcbd59309f3ba /include/linux/of.h | |
parent | cf4c9eb5a451ba26246477dd3168e98b7a5c1b1c (diff) |
of: Introduce device tree node flag helpers.
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>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 70c64ba17fa5..3d0593943f47 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -114,6 +114,26 @@ static inline void of_node_set_flag(struct device_node *n, unsigned long flag) | |||
114 | set_bit(flag, &n->_flags); | 114 | set_bit(flag, &n->_flags); |
115 | } | 115 | } |
116 | 116 | ||
117 | static inline void of_node_clear_flag(struct device_node *n, unsigned long flag) | ||
118 | { | ||
119 | clear_bit(flag, &n->_flags); | ||
120 | } | ||
121 | |||
122 | static inline int of_property_check_flag(struct property *p, unsigned long flag) | ||
123 | { | ||
124 | return test_bit(flag, &p->_flags); | ||
125 | } | ||
126 | |||
127 | static inline void of_property_set_flag(struct property *p, unsigned long flag) | ||
128 | { | ||
129 | set_bit(flag, &p->_flags); | ||
130 | } | ||
131 | |||
132 | static inline void of_property_clear_flag(struct property *p, unsigned long flag) | ||
133 | { | ||
134 | clear_bit(flag, &p->_flags); | ||
135 | } | ||
136 | |||
117 | extern struct device_node *of_find_all_nodes(struct device_node *prev); | 137 | extern struct device_node *of_find_all_nodes(struct device_node *prev); |
118 | 138 | ||
119 | /* | 139 | /* |