Commit a1b1a4f7 authored by Archit Taneja's avatar Archit Taneja Committed by Rob Clark

drm/msm/dsi: Don't error if a DSI host doesn't have a device connected

The driver returns an error if a DSI DT node is populated, but no device
is connected to it or if the data-lane map isn't present. Ideally, such
a DSI node shouldn't be probed at all (i.e, its status should be set to
"disabled in DT"), but there isn't any harm in registering the DSI device
even if it doesn't have a bridge/panel connected to it.
Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 10967a06
...@@ -1559,8 +1559,9 @@ static int dsi_host_parse_lane_data(struct msm_dsi_host *msm_host, ...@@ -1559,8 +1559,9 @@ static int dsi_host_parse_lane_data(struct msm_dsi_host *msm_host,
prop = of_find_property(ep, "data-lanes", &len); prop = of_find_property(ep, "data-lanes", &len);
if (!prop) { if (!prop) {
dev_dbg(dev, "failed to find data lane mapping\n"); dev_dbg(dev,
return -EINVAL; "failed to find data lane mapping, using default\n");
return 0;
} }
num_lanes = len / sizeof(u32); num_lanes = len / sizeof(u32);
...@@ -1617,7 +1618,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host) ...@@ -1617,7 +1618,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host)
struct device *dev = &msm_host->pdev->dev; struct device *dev = &msm_host->pdev->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
struct device_node *endpoint, *device_node; struct device_node *endpoint, *device_node;
int ret; int ret = 0;
/* /*
* Get the endpoint of the output port of the DSI host. In our case, * Get the endpoint of the output port of the DSI host. In our case,
...@@ -1641,8 +1642,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host) ...@@ -1641,8 +1642,7 @@ static int dsi_host_parse_dt(struct msm_dsi_host *msm_host)
/* Get panel node from the output port's endpoint data */ /* Get panel node from the output port's endpoint data */
device_node = of_graph_get_remote_port_parent(endpoint); device_node = of_graph_get_remote_port_parent(endpoint);
if (!device_node) { if (!device_node) {
dev_err(dev, "%s: no valid device\n", __func__); dev_dbg(dev, "%s: no valid device\n", __func__);
ret = -ENODEV;
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment