]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/bridge: rcar: Convert to drm_of_get_data_lanes_count_ep
authorMarek Vasut <marex@denx.de>
Tue, 24 May 2022 01:05:22 +0000 (03:05 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 12 Jun 2022 10:22:27 +0000 (12:22 +0200)
Convert driver to use this new helper to standardize
OF "data-lanes" parsing.

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-11-marex@denx.de
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c

index 891bb956fd61bb37e80114207b1eacc08443279d..67dce337098a55227ea0ba4c7b827bf8045bbd3e 100644 (file)
@@ -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;