diff options
author | G S Niteesh Babu <niteesh.gs@gmail.com> | 2021-03-13 16:32:00 +0530 |
---|---|---|
committer | Christian Mauderer <oss@c-mauderer.de> | 2021-03-21 12:30:47 +0100 |
commit | fc7129067d7b94b620302378677c5a48a47cdbad (patch) | |
tree | 5900769313afc71b51549e9fe30ffc7190f31692 /bsps/include/ofw | |
parent | bsps/arm/imxrt: Add FDT and FDT helper for QTMR (diff) | |
download | rtems-fc7129067d7b94b620302378677c5a48a47cdbad.tar.bz2 |
bsps/shared/ofw: Add rtems_ofw_is_node_compatible
This patch extends the RTEMS OFW API by adding
rtems_ofw_find_device_by_compat
This function checks if a node has the expected compatible
property.
Diffstat (limited to 'bsps/include/ofw')
-rw-r--r-- | bsps/include/ofw/ofw.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bsps/include/ofw/ofw.h b/bsps/include/ofw/ofw.h index 411010be89..bfd91d20ea 100644 --- a/bsps/include/ofw/ofw.h +++ b/bsps/include/ofw/ofw.h @@ -541,6 +541,23 @@ bool rtems_ofw_node_status( phandle_t node ); */ phandle_t rtems_ofw_find_device_by_compat( const char *compat ); +/** + * @brief check a nodes compatible property. + * + * This routine is local to RTEMS OFW and does not have an corresponding + * FreeBSD OFW pair. + * + * Return true if @a compat equals @a node compatible property + * + * @param[in] node phandle of node + * @param[in] compat Compatible string + * + * @retval 1 If node contains the @a compat as a element in compatible + * property. + * @retval 0 Otherwise. + */ +bool rtems_ofw_is_node_compatible( phandle_t node, const char *compat ); + #ifdef __cplusplus } #endif |