OMAPDSS: add omap_dss_find_output_by_node()
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 13 Mar 2013 12:22:30 +0000 (14:22 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 17 Jun 2013 11:00:40 +0000 (14:00 +0300)
Add a support function to find a DSS output by given DT node. This is
used in later patches to link the panels to DSS outputs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/output.c
include/video/omapdss.h

index 3274628e0ea16932a5131529193d6d2e091349a4..4d01001497f4112316eaf0b1254ad26ef75e47f7 100644 (file)
@@ -128,6 +128,19 @@ struct omap_dss_output *omap_dss_find_output(const char *name)
 }
 EXPORT_SYMBOL(omap_dss_find_output);
 
+struct omap_dss_output *omap_dss_find_output_by_node(struct device_node *node)
+{
+       struct omap_dss_output *out;
+
+       list_for_each_entry(out, &output_list, list) {
+               if (out->pdev->dev.of_node == node)
+                       return out;
+       }
+
+       return NULL;
+}
+EXPORT_SYMBOL(omap_dss_find_output_by_node);
+
 static const struct dss_mgr_ops *dss_mgr_ops;
 
 int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops)
index 0b4f718a63c8d2029a62b4efdd3f0024f0a4c5c8..25a944e080b4107d41141a2040aaa5c007e36698 100644 (file)
@@ -781,6 +781,7 @@ struct omap_overlay *omap_dss_get_overlay(int num);
 
 struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id);
 struct omap_dss_output *omap_dss_find_output(const char *name);
+struct omap_dss_output *omap_dss_find_output_by_node(struct device_node *node);
 int omapdss_output_set_device(struct omap_dss_output *out,
                struct omap_dss_device *dssdev);
 int omapdss_output_unset_device(struct omap_dss_output *out);
This page took 0.025921 seconds and 5 git commands to generate.