From patchwork Thu Aug 31 22:16:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 1828524 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.a=rsa-sha256 header.s=s1 header.b=IAFBy3Y0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RcFsR4gHfz1yfm for ; Fri, 1 Sep 2023 08:17:47 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 705778678A; Fri, 1 Sep 2023 00:16:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="IAFBy3Y0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3BF128675B; Fri, 1 Sep 2023 00:16:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.2 Received: from s.wfbtzhsv.outbound-mail.sendgrid.net (s.wfbtzhsv.outbound-mail.sendgrid.net [159.183.224.104]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 638148679F for ; Fri, 1 Sep 2023 00:16:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=PomkGehBG5LFH9ffwETRMlm0emNiF++0IEZik0tu4lc=; b=IAFBy3Y08CnCgolMfFUxGbYK9Uim+4ba71HKK3neCwXZCCCDdf/6WZZZN6nw5Vv2TTlW akVDYiMNkVsQ+PlSQxKYPiRrSXfj+QR1SBwB4UITAATy6r/VKm5+wN50IABLJvN+d7/0GC 6V0yt9M9SfcN3E3BONg9lbRHDjQSVujizw95Q06ZAnyG5KaNhQeorFWWAxN9rXWUGDdsGq VmUw4rs8nt7vzqfnz19QsAaxQH4Ey9n9gfe582sSaBs/nK2g3K9YL+wwUoTyYnFOoCJq/M bKbNd3LduWRuFk6nP5CYyfmAD4atGbVFk17WeEwgWqdLYtoo+JXkvWFXt3c/rUIA== Received: by filterdrecv-66949dbc98-rr4mv with SMTP id filterdrecv-66949dbc98-rr4mv-1-64F11147-30 2023-08-31 22:16:39.972610236 +0000 UTC m=+5859655.737372949 Received: from bionic.localdomain (unknown) by geopod-ismtpd-5 (SG) with ESMTP id IADmaorORHiY7AGtLHe-IQ Thu, 31 Aug 2023 22:16:39.779 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 6/6] video: rockchip: dw_mipi_dsi: Use generic_phy_valid() helper Date: Thu, 31 Aug 2023 22:16:40 +0000 (UTC) Message-ID: <20230831221629.1027552-7-jonas@kwiboo.se> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230831221629.1027552-1-jonas@kwiboo.se> References: <20230831221629.1027552-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxAfZekEeQsTe+RrMu3cja6a0hxlTWx0iFLJM6wghoCM4D9qIihyM+88l2hWDN85acQa6I1g1eH/ZbWmrdBg1YYy/RSf1PL4asM8RaDiu1RJk2GQHz5TQqhEu9TmEMulTNW/7bMmpwcqbPzzIFU1p0MsKp2kSzbWXvdRocCBEqxDBxKEGREQ/75+eusz+ewXSwOOU To: Simon Glass , Marek Vasut , Patrice Chotard , Anatolij Gustschin , Philipp Tomsich , Kever Yang , Ondrej Jirman Cc: u-boot@lists.denx.de, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The documentation for struct phy state that "The content of the structure is managed solely by the PHY API and PHY drivers". Change to use the generic_phy_valid() helper to check if phy is valid. Fixes: b7d8d40346f2 ("video: rockchip: dw_mipi_dsi: Fix external phy existence check") Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- drivers/video/rockchip/dw_mipi_dsi_rockchip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c index 0852b53ebed5..1a5ab781e3f1 100644 --- a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c +++ b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c @@ -377,7 +377,7 @@ static int dsi_phy_init(void *priv_data) struct dw_rockchip_dsi_priv *dsi = dev_get_priv(dev); int ret, i, vco; - if (dsi->phy.dev) { + if (generic_phy_valid(&dsi->phy)) { ret = generic_phy_configure(&dsi->phy, &dsi->phy_opts); if (ret) { dev_err(dsi->dsi_host, @@ -559,7 +559,7 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, struct display_timing *timings, } /* for external phy only the mipi_dphy_config is necessary */ - if (dsi->phy.dev) { + if (generic_phy_valid(&dsi->phy)) { phy_mipi_dphy_get_default_config(timings->pixelclock.typ * 10 / 8, bpp, lanes, &dsi->phy_opts); @@ -859,7 +859,7 @@ static int dw_mipi_dsi_rockchip_probe(struct udevice *dev) } /* Get a ref clock only if not using an external phy. */ - if (priv->phy.dev) { + if (generic_phy_valid(&priv->phy)) { dev_dbg(dev, "setting priv->ref to NULL\n"); priv->ref = NULL;