data tree FEATURE new utility function for getting data schema parent
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index 9f291f3..5d10992 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -898,4 +898,12 @@
char *lysc_path_until(const struct lysc_node *node, const struct lysc_node *parent, LYSC_PATH_TYPE pathtype, char *buffer,
size_t buflen);
+/**
+ * @brief Get schema parent that can be instantiated in data. In other words, skip any choice or case nodes.
+ *
+ * @param[in] schema Schema node to get the parent for.
+ * @return Parent, NULL if top-level (in data).
+ */
+const struct lysc_node *lysc_data_parent(const struct lysc_node *schema);
+
#endif /* LY_TREE_SCHEMA_INTERNAL_H_ */