diff --git a/include/devicetree.h b/include/devicetree.h index e75fc083248..8635835315e 100644 --- a/include/devicetree.h +++ b/include/devicetree.h @@ -325,6 +325,13 @@ */ #define DT_PARENT(node_id) UTIL_CAT(node_id, _PARENT) +/** + * @brief Get a DT_DRV_COMPAT parent's node identifier + * @param inst instance number + * @return a node identifier for the instance's parent + */ +#define DT_INST_PARENT(inst) DT_PARENT(DT_DRV_INST(inst)) + /** * @brief Get a node identifier for a grandparent node *