From patchwork Thu May 19 11:26:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12854812 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44D9CC433EF for ; Thu, 19 May 2022 11:27:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BE2D11A354; Thu, 19 May 2022 11:27:17 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id 250AF11A283 for ; Thu, 19 May 2022 11:27:12 +0000 (UTC) Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 659FB83C01; Thu, 19 May 2022 13:27:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1652959630; bh=Xx7lZ6hlSXuQihMd2KE2mgQgIsELPNfCWhoJlBEhOio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W9/ishY7dFoziCiVFDRmPYN795JrF9Bm8tLY3spQPjlEoOWAAOHcU3XOMZqNb6WKy vADpGfGJi7s4I7Mr7xpucOJUCvSbfxvBrnMjHBpq1lc8CU5TJwoOiqmAlI9uRrGXlt OTNcIUU3Fd13FKQBV8k4FvFUP93yChWqHnxBlw0KM3devVpcl+3QFfaGklTiQfl8jZ Jgz5BPVFihhmQF0O41a5bxcWdTCY7Ja1mwox9AnO+II/2j/I+TlfqTjwmZbO+h7J9d hX0H9PwTGkiJl116vamy0nvnnXn4U7Xkwg9yTsHT0ffVp6aKAjfprPwnTVzQtHMg2L njY9n244J8Olg== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH 09/11] drm/bridge: ti-sn65dsi86: Convert to drm_of_get_data_lanes Date: Thu, 19 May 2022 13:26:55 +0200 Message-Id: <20220519112657.62283-9-marex@denx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220519112657.62283-1-marex@denx.de> References: <20220519112657.62283-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Laurent Pinchart , robert.foss@linaro.org, Maxime Ripard , Andrzej Hajda , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Convert driver to use this new helper to standardize OF "data-lanes" parsing. Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 8cad662de9bb5..44a330a48d385 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -1142,8 +1142,8 @@ static void ti_sn_bridge_parse_lanes(struct ti_sn65dsi86 *pdata, * mappings that the hardware supports. */ endpoint = of_graph_get_endpoint_by_regs(np, 1, -1); - dp_lanes = of_property_count_u32_elems(endpoint, "data-lanes"); - if (dp_lanes > 0 && dp_lanes <= SN_MAX_DP_LANES) { + dp_lanes = drm_of_get_data_lanes(endpoint, 1, SN_MAX_DP_LANES); + if (dp_lanes > 0) { of_property_read_u32_array(endpoint, "data-lanes", lane_assignments, dp_lanes); of_property_read_u32_array(endpoint, "lane-polarities",