diff options
Diffstat (limited to 'include/of.h')
-rw-r--r-- | include/of.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/include/of.h b/include/of.h index 0c5c2c0205..4b0266fd31 100644 --- a/include/of.h +++ b/include/of.h @@ -152,6 +152,9 @@ extern struct property *__of_new_property(struct device_node *node, extern void of_delete_property(struct property *pp); extern struct property *of_rename_property(struct device_node *np, const char *old_name, const char *new_name); +extern struct property *of_copy_property(const struct device_node *src, + const char *propname, + struct device_node *dst); extern struct device_node *of_find_node_by_name(struct device_node *from, const char *name); @@ -298,7 +301,6 @@ extern void of_platform_device_dummy_drv(struct device *dev); extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, struct device *parent); -extern struct device *of_platform_device_create_root(struct device_node *np); extern struct device *of_find_device_by_node(struct device_node *np); extern struct device *of_device_enable_and_register(struct device_node *np); extern struct device *of_device_enable_and_register_by_name(const char *name); @@ -577,6 +579,13 @@ static inline struct property *__of_new_property(struct device_node *node, return NULL; } +static inline struct property *of_copy_property(const struct device_node *src, + const char *propname, + struct device_node *dst) +{ + return NULL; +} + static inline void of_delete_property(struct property *pp) { } @@ -1039,8 +1048,10 @@ static inline int of_property_read_string_index(const struct device_node *np, * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. * - * Search for a property in a device node. - * Returns true if the property exist false otherwise. + * Search for a boolean property in a device node. Usage on non-boolean + * property types is deprecated. + + * Return: true if the property exist false otherwise. */ static inline bool of_property_read_bool(const struct device_node *np, const char *propname) @@ -1050,6 +1061,20 @@ static inline bool of_property_read_bool(const struct device_node *np, return prop ? true : false; } +/** + * of_property_present - Test if a property is present in a node + * @np: device node to search for the property. + * @propname: name of the property to be searched. + * + * Test for a property present in a device node. + * + * Return: true if the property exists false otherwise. + */ +static inline bool of_property_present(const struct device_node *np, const char *propname) +{ + return of_property_read_bool(np, propname); +} + static inline int of_property_read_u8(const struct device_node *np, const char *propname, u8 *out_value) |