diff options
author | Tom Rini <trini@konsulko.com> | 2020-04-17 11:08:08 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-17 11:17:29 -0400 |
commit | 8d5d3bcf3c53d798bd7f3fe7092e994593bcc41c (patch) | |
tree | dd145ccf787512306926b0e5f327046ccfbee33c /include/dm/of_access.h | |
parent | 0f238dab6d17caabe4f9781d23aaa6087139f2bd (diff) | |
parent | 65c141ebbd68b70d6934b4fb965f3219d0e99817 (diff) |
Merge branch '2020-04-16-master-imports'
- DM GPIO improvements
- BTRFS fixes
- Corrections around gd->new_bootstage alignment
- Start documentation improvements to support 'make refcheckdocs'
Diffstat (limited to 'include/dm/of_access.h')
-rw-r--r-- | include/dm/of_access.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/dm/of_access.h b/include/dm/of_access.h index 92876b3ecb..f95a00d065 100644 --- a/include/dm/of_access.h +++ b/include/dm/of_access.h @@ -104,6 +104,46 @@ const void *of_get_property(const struct device_node *np, const char *name, int *lenp); /** + * of_get_first_property()- get to the pointer of the first property + * + * Get pointer to the first property of the node, it is used to iterate + * and read all the property with of_get_next_property_by_prop(). + * + * @np: Pointer to device node + * @return pointer to property or NULL if not found + */ +const struct property *of_get_first_property(const struct device_node *np); + +/** + * of_get_next_property() - get to the pointer of the next property + * + * Get pointer to the next property of the node, it is used to iterate + * and read all the property with of_get_property_by_prop(). + * + * @np: Pointer to device node + * @property: pointer of the current property + * @return pointer to next property or NULL if not found + */ +const struct property *of_get_next_property(const struct device_node *np, + const struct property *property); + +/** + * of_get_property_by_prop() - get a property value of a node property + * + * Get value for the property identified by node and property pointer. + * + * @node: node to read + * @property: pointer of the property to read + * @propname: place to property name on success + * @lenp: place to put length on success + * @return pointer to property value or NULL if error + */ +const void *of_get_property_by_prop(const struct device_node *np, + const struct property *property, + const char **name, + int *lenp); + +/** * of_device_is_compatible() - Check if the node matches given constraints * @device: pointer to node * @compat: required compatible string, NULL or "" for any match |