Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 588453c6 authored by Pantelis Antoniou's avatar Pantelis Antoniou Committed by Grant Likely
Browse files

of: Introduce device tree node flag helpers.



Helper functions for working with device node flags.

Signed-off-by: default avatarPantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
parent cf4c9eb5
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -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);

/*