From mboxrd@z Thu Jan 1 00:00:00 1970 From: Archit Taneja Date: Thu, 08 May 2014 09:27:14 +0000 Subject: [RFC 3/6] omapdss: DT: Get source endpoint by matching reg-id Message-Id: <1399540517-17883-3-git-send-email-archit@ti.com> List-Id: References: <1399540517-17883-1-git-send-email-archit@ti.com> In-Reply-To: <1399540517-17883-1-git-send-email-archit@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: tomi.valkeinen@ti.com Cc: linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Archit Taneja In omapdss_of_find_source_for_first_ep, we retrieve a source endpoint's DT node, and then see what omapdss output has the matching device_node pointer in omap_dss_find_output_by_node. For all DPI and SDI outputs, the device_node pointer is set as the parent's DSS device_node pointer. If the source is one of these outputs, the above method won't work. To get the correct output for ports within DSS with the existing omapdss DT framework, we check in omapdss_of_find_source_for_first_ep, whether the source node is of the DSS parent device. If so, we take an extra step of extracting the 'reg' property from the port corresponding to the endpoint source, and get the omap_dss_device output by matching both device_node and reg-id. We would want to get rid of this eventually, and support multiple ports in general. That would involve making some more changes the omapdss DT framework. Signed-off-by: Archit Taneja --- drivers/video/fbdev/omap2/dss/dss-of.c | 41 ++++++++++++++++++++++++++++++---- drivers/video/fbdev/omap2/dss/dss.c | 6 +++++ drivers/video/fbdev/omap2/dss/dss.h | 2 ++ drivers/video/fbdev/omap2/dss/output.c | 15 +++++++++++++ include/video/omapdss.h | 6 +++++ 5 files changed, 66 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/dss/dss-of.c b/drivers/video/fbdev/omap2/dss/dss-of.c index a4b20aa..4261c14 100644 --- a/drivers/video/fbdev/omap2/dss/dss-of.c +++ b/drivers/video/fbdev/omap2/dss/dss-of.c @@ -19,6 +19,7 @@ #include #include