drm/bridge: tc358768: switch to bus-width
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 3 Oct 2024 13:39:04 +0000 (15:39 +0200)
committerNeil Armstrong <neil.armstrong@linaro.org>
Mon, 21 Oct 2024 12:47:36 +0000 (14:47 +0200)
"data-lines" property is way too similar to "data-lanes".  It is also
duplicating "bus-width" from video-interfaces.yaml schema.  "data-lines"
was deprecated in the bindings and "bus-width" is preferred, so parse it
instead while keeping things backwards compatible.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241003133904.69244-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241003133904.69244-2-krzysztof.kozlowski@linaro.org
drivers/gpu/drm/bridge/tc358768.c

index 0e88132..fc96fa5 100644 (file)
@@ -443,7 +443,9 @@ static int tc358768_dsi_host_attach(struct mipi_dsi_host *host,
        ret = -EINVAL;
        ep = of_graph_get_endpoint_by_regs(host->dev->of_node, 0, 0);
        if (ep) {
-               ret = of_property_read_u32(ep, "data-lines", &priv->pd_lines);
+               ret = of_property_read_u32(ep, "bus-width", &priv->pd_lines);
+               if (ret)
+                       ret = of_property_read_u32(ep, "data-lines", &priv->pd_lines);
 
                of_node_put(ep);
        }