mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: core: Add a livetree function to check node status
Add a way to find out if a node is enabled or not, based on its 'status' property. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
734206dda1
commit
0de1b07406
3 changed files with 33 additions and 0 deletions
|
@ -345,6 +345,17 @@ const char *ofnode_read_string(ofnode node, const char *propname);
|
|||
*/
|
||||
int ofnode_read_u32_array(ofnode node, const char *propname,
|
||||
u32 *out_values, size_t sz);
|
||||
/**
|
||||
* ofnode_is_enabled() - Checks whether a node is enabled.
|
||||
* This looks for a 'status' property. If this exists, then returns true if
|
||||
* the status is 'okay' and false otherwise. If there is no status property,
|
||||
* it returns true on the assumption that anything mentioned should be enabled
|
||||
* by default.
|
||||
*
|
||||
* @node: node to examine
|
||||
* @return false (not enabled) or true (enabled)
|
||||
*/
|
||||
bool ofnode_is_enabled(ofnode node);
|
||||
|
||||
/**
|
||||
* ofnode_read_bool() - read a boolean value from a property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue