Re: [RFC v2 2/5] OMAPDSS: DT: Get source endpoint by matching reg-id
From: Tomi Valkeinen <hidden>
Date: 2014-05-27 10:24:35
Attachments
- signature.asc [application/pgp-signature] 819 bytes
From: Tomi Valkeinen <hidden>
Date: 2014-05-27 10:24:35
On 27/05/14 12:49, Archit Taneja wrote:
On Tuesday 27 May 2014 02:04 PM, Tomi Valkeinen wrote:
quoted
Hmm, maybe the above function, and the helper functions, should be changed a bit more, so that this function would do: ep = omapdss_of_get_first_endpoint(node); src_port = omapdss_of_get_remote_port(ep); src = omap_dss_find_output_by_port_node(src_port);src_port will be just on level up(the parent node), the source node will be still a couple of hops up. Getting the source node would require us to do some DT related hopping in omap_dss_find_output_by_port_node(). And it'll also require parsing of the dss output_list in output.c. I'm worried it'll be a bit messy, and we might end up adding some DT parsing in output.c
But now the function above is messy =). Well, I haven't thought what the code would actually be. I just thought the functions I wrote would be logical in this context. As the output omap_dss_device more or less is a "port", it would feel logical to ask for the omap_dss_device by giving the port node. But you're right, the function in output.c would need to do a bit more than now. Then again, we could add helper functions to dss-of.c, so that output.c wouldn't need to do them manually. I guess the helper funcs in this case would be: struct device_node *dss_of_port_get_parent_device(struct device_node *port); int dss_of_port_get_port_number(struct device_node *port); Tomi