diff mbox series

[v2,08/11] drm/bridge: ti-sn65dsi83: Convert to drm_of_get_data_lanes_count

Message ID 20220524010522.528569-8-marex@denx.de (mailing list archive)
State New, archived
Headers show
Series [v2,01/11] drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep | expand

Commit Message

Marek Vasut May 24, 2022, 1:05 a.m. UTC
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
---
V2: - Rename drm_of_get_data_lanes{,_ep} to drm_of_get_data_lanes_count{,_ep}
    - Add RB from Andrzej
---
 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut June 12, 2022, 10:37 a.m. UTC | #1
On 5/24/22 03:05, Marek Vasut wrote:
> Convert driver to use this new helper to standardize
> OF "data-lanes" parsing.

Applied all to drm-misc-next except for this particular patch, which 
depends on yet unreviewed deduplication patch. Both remaining patches 
are resubmitted:

https://patchwork.freedesktop.org/patch/489197/
https://patchwork.freedesktop.org/patch/489198/
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
index f5c1819857665..66693a8a53263 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
@@ -628,7 +628,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);