1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
4 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
9 #include <linux/of_graph.h>
13 struct omap_dss_device
*
14 omapdss_of_find_connected_device(struct device_node
*node
, unsigned int port
)
16 struct device_node
*remote_node
;
17 struct omap_dss_device
*dssdev
;
19 remote_node
= of_graph_get_remote_node(node
, port
, 0);
23 dssdev
= omapdss_find_device_by_node(remote_node
);
24 of_node_put(remote_node
);
26 return dssdev
? dssdev
: ERR_PTR(-EPROBE_DEFER
);
28 EXPORT_SYMBOL_GPL(omapdss_of_find_connected_device
);