summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2017-06-06 12:37:39 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-22 03:55:34 +0300
commit2294b3af05e9b3fe0b84a78971e709037bd7593c (patch)
tree36e1766ebc6f3d159ab2bdfca2b71244689b503c /include
parent3b27d00e7b6d7c889d87fd00df600c495b968e30 (diff)
downloadlinux-2294b3af05e9b3fe0b84a78971e709037bd7593c.tar.xz
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')
-rw-r--r--include/linux/fwnode.h1
-rw-r--r--include/linux/property.h1
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,