drm/dsi: Get DSI host by DT device node
MIPI DSI devices are inherently aware of their host because they share a parent-child hierarchy in the device tree. Non-DSI drivers that create DSI device don't have this data. In order to get this information, they require to a phandle to the DSI host in the device tree. Maintain a list of all the DSI hosts that are currently registered. This list will be used to find the struct mipi_dsi_host corresponding to the device tree node passed to of_find_mipi_dsi_host_by_node(). Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:

committed by
Thierry Reding

parent
509e42ce04
commit
97b6ae50e0
@@ -96,14 +96,17 @@ struct mipi_dsi_host_ops {
|
||||
* struct mipi_dsi_host - DSI host device
|
||||
* @dev: driver model device node for this DSI host
|
||||
* @ops: DSI host operations
|
||||
* @list: list management
|
||||
*/
|
||||
struct mipi_dsi_host {
|
||||
struct device *dev;
|
||||
const struct mipi_dsi_host_ops *ops;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
int mipi_dsi_host_register(struct mipi_dsi_host *host);
|
||||
void mipi_dsi_host_unregister(struct mipi_dsi_host *host);
|
||||
struct mipi_dsi_host *of_find_mipi_dsi_host_by_node(struct device_node *node);
|
||||
|
||||
/* DSI mode flags */
|
||||
|
||||
|
Reference in New Issue
Block a user