]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/bridge: ti-sn65dsi83: Convert to drm_of_get_data_lanes_count
authorMarek Vasut <marex@denx.de>
Sun, 12 Jun 2022 10:29:47 +0000 (12:29 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 12 Jun 2022 14:06:58 +0000 (16:06 +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
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220612102947.13912-1-marex@denx.de
drivers/gpu/drm/bridge/ti-sn65dsi83.c

index 8bf99b32776e2fa3358bff241385c00f7db57984..b27c0d7c451adc05b4dfa95a5fd4a02cc0d1da7e 100644 (file)
@@ -620,7 +620,7 @@ static int sn65dsi83_host_attach(struct sn65dsi83 *ctx)
        int dsi_lanes, ret;
 
        endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
-       dsi_lanes = of_property_count_u32_elems(endpoint, "data-lanes");
+       dsi_lanes = drm_of_get_data_lanes_count(endpoint, 1, 4);
        host_node = of_graph_get_remote_port_parent(endpoint);
        host = of_find_mipi_dsi_host_by_node(host_node);
        of_node_put(host_node);