[PATCH 1/5] drm/exynos: dsi: Fix the parse_dt function
Hoegeun Kwon
hoegeun.kwon at samsung.com
Mon Feb 6 02:19:40 UTC 2017
The bridge_node may or may not be required.
For example, mic and dsi are connected to OF graph, but fimd and dsi
are not connected. Also the OF graph is not needed because the panel
is a child of dsi. So not have to go to the endpoint and parse the
burst, esc clock-frequency.
Signed-off-by: Hoegeun Kwon <hoegeun.kwon at samsung.com>
---
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 32 ++++++++------------------------
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index e07cb1f..214d486 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1652,39 +1652,23 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
if (ret < 0)
return ret;
- ep = of_graph_get_endpoint_by_regs(node, DSI_PORT_OUT, 0);
- if (!ep) {
- dev_err(dev, "no output port with endpoint specified\n");
- return -EINVAL;
- }
-
- ret = exynos_dsi_of_read_u32(ep, "samsung,burst-clock-frequency",
+ ret = exynos_dsi_of_read_u32(node, "samsung,burst-clock-frequency",
&dsi->burst_clk_rate);
if (ret < 0)
- goto end;
+ return ret;
- ret = exynos_dsi_of_read_u32(ep, "samsung,esc-clock-frequency",
+ ret = exynos_dsi_of_read_u32(node, "samsung,esc-clock-frequency",
&dsi->esc_clk_rate);
if (ret < 0)
- goto end;
-
- of_node_put(ep);
+ return ret;
ep = of_graph_get_next_endpoint(node, NULL);
- if (!ep) {
- ret = -EINVAL;
- goto end;
- }
-
- dsi->bridge_node = of_graph_get_remote_port_parent(ep);
- if (!dsi->bridge_node) {
- ret = -EINVAL;
- goto end;
+ if (ep) {
+ dsi->bridge_node = of_graph_get_remote_port_parent(ep);
+ of_node_put(ep);
}
-end:
- of_node_put(ep);
- return ret;
+ return 0;
}
static int exynos_dsi_bind(struct device *dev, struct device *master,
--
1.9.1
More information about the dri-devel
mailing list