Skip to content

Commit

Permalink
of: Introduce device tree node flag helpers.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pantelis Antoniou authored and Grant Likely committed Feb 3, 2014
1 parent cf4c9eb commit 588453c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down

0 comments on commit 588453c

Please sign in to comment.