diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2017-06-06 12:37:39 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-22 02:55:34 +0200 |
commit | 2294b3af05e9b3fe0b84a78971e709037bd7593c (patch) | |
tree | 36e1766ebc6f3d159ab2bdfca2b71244689b503c /include/linux | |
parent | 3b27d00e7b6d7c889d87fd00df600c495b968e30 (diff) |
device property: Introduce fwnode_device_is_available()
Add fwnode_device_is_available() to tell whether the device corresponding
to a certain fwnode_handle is available for use.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fwnode.h | 1 | ||||
-rw-r--r-- | include/linux/property.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index e315d867d631..9ab375419189 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -66,6 +66,7 @@ struct fwnode_endpoint { struct fwnode_operations { void (*get)(struct fwnode_handle *fwnode); void (*put)(struct fwnode_handle *fwnode); + bool (*device_is_available)(struct fwnode_handle *fwnode); bool (*property_present)(struct fwnode_handle *fwnode, const char *propname); int (*property_read_int_array)(struct fwnode_handle *fwnode, diff --git a/include/linux/property.h b/include/linux/property.h index 2f482616a2f2..7be014af78ed 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -51,6 +51,7 @@ int device_property_read_string(struct device *dev, const char *propname, int device_property_match_string(struct device *dev, const char *propname, const char *string); +bool fwnode_device_is_available(struct fwnode_handle *fwnode); bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname); int fwnode_property_read_u8_array(struct fwnode_handle *fwnode, const char *propname, u8 *val, |