diff options
author | Pantelis Antoniou <panto@antoniou-consulting.com> | 2013-11-08 17:03:56 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-02-16 13:51:27 +0900 |
commit | b49b162df89fdd30b604c3db14ad7935208297a8 (patch) | |
tree | 20c6b45507b769310f38256104485a32c0b15be2 | |
parent | b74e9e159702d39152b9f270c88db0084486c90c (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>
(cherry picked from commit 588453c69dace39351129a038dd2796608f74bb3)
Signed-off-by: Mark Brown <broonie@kernel.org>
-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 d629a9dc60ce..61271f9f390b 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -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); /* |