aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2022-05-24 03:05:22 +0200
committerMarek Vasut <[email protected]>2022-06-12 12:22:27 +0200
commitd643daaf1694b7565fbe3982b630e1c7b95f1600 (patch)
tree6db05ebe605644ba8cc2af23a7aeaa74e0c53d8c
parent185443efa26a62b7d1401c89b83c89a1a2601350 (diff)
drm/bridge: rcar: Convert to drm_of_get_data_lanes_count_ep
Convert driver to use this new helper to standardize OF "data-lanes" parsing. Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Andrzej Hajda <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Robert Foss <[email protected]> Cc: Sam Ravnborg <[email protected]> To: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
index 891bb956fd61..67dce337098a 100644
--- a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
+++ b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
@@ -683,19 +683,10 @@ static int rcar_mipi_dsi_parse_dt(struct rcar_mipi_dsi *dsi)
u32 data_lanes[4];
int ret;
- ep = of_graph_get_endpoint_by_regs(dsi->dev->of_node, 1, 0);
- if (!ep) {
- dev_dbg(dsi->dev, "unconnected port@1\n");
- return -ENODEV;
- }
-
- ret = of_property_read_variable_u32_array(ep, "data-lanes", data_lanes,
- 1, 4);
- of_node_put(ep);
-
+ ret = drm_of_get_data_lanes_count_ep(dsi->dev->of_node, 1, 0, 1, 4);
if (ret < 0) {
dev_err(dsi->dev, "missing or invalid data-lanes property\n");
- return -ENODEV;
+ return ret;
}
dsi->num_data_lanes = ret;