summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2017-06-06 11:37:39 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-22 02:55:34 +0200
commit2294b3af05e9b3fe0b84a78971e709037bd7593c (patch)
tree36e1766ebc6f3d159ab2bdfca2b71244689b503c /drivers/of
parentdevice property: Move fwnode graph ops to firmware specific locations (diff)
downloadlinux-2294b3af05e9b3fe0b84a78971e709037bd7593c.tar.xz
linux-2294b3af05e9b3fe0b84a78971e709037bd7593c.zip
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 'drivers/of')
-rw-r--r--drivers/of/property.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/of/property.c b/drivers/of/property.c
index e859e41e33f3..c96389b7c6b3 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -775,6 +775,11 @@ static void of_fwnode_put(struct fwnode_handle *fwnode)
of_node_put(to_of_node(fwnode));
}
+static bool of_fwnode_device_is_available(struct fwnode_handle *fwnode)
+{
+ return of_device_is_available(to_of_node(fwnode));
+}
+
static bool of_fwnode_property_present(struct fwnode_handle *fwnode,
const char *propname)
{
@@ -895,6 +900,7 @@ static int of_fwnode_graph_parse_endpoint(struct fwnode_handle *fwnode,
const struct fwnode_operations of_fwnode_ops = {
.get = of_fwnode_get,
.put = of_fwnode_put,
+ .device_is_available = of_fwnode_device_is_available,
.property_present = of_fwnode_property_present,
.property_read_int_array = of_fwnode_property_read_int_array,
.property_read_string_array = of_fwnode_property_read_string_array,