From patchwork Mon May 22 21:47:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 1784706 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=xff.cz header.i=@xff.cz header.a=rsa-sha256 header.s=mail header.b=R1QsU9Ch; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QQB194v13z20Pb for ; Tue, 23 May 2023 07:49:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 00144856D6; Mon, 22 May 2023 23:47:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=xff.cz header.i=@xff.cz header.b="R1QsU9Ch"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B27DE847BE; Mon, 22 May 2023 23:47:32 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 34730855D9 for ; Mon, 22 May 2023 23:47:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=megi@xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1684792043; bh=AsZXz3v2VjZAaFUN7l28dMkFzSdqeOslTJ5ODw0UGM8=; h=From:To:Cc:Subject:Date:References:From; b=R1QsU9Chv21vi/ND0sTODnH/aUCmWSZEAGzOxR9StiiDIPGPHWspypoPRXKmyugqk d1uuHd4ovAE5Yw+eVUlwjmQdUG/uSh1z6QGoaiCarSHxC7j0MBdJrsze3EWpnsCaaU z9Pqrjp9OEcY5sMM/vVZcI5HDyLGFj8FX9w1q7Wo= From: megi@xff.cz To: u-boot@lists.denx.de Cc: Ondrej Jirman , Anatolij Gustschin , Simon Glass , Philipp Tomsich , Kever Yang , Chris Morgan Subject: [PATCH 7/8] video: rockchip: dw_mipi_dsi: Correct check for lacking phy phandle Date: Mon, 22 May 2023 23:47:07 +0200 Message-Id: <20230522214708.3886796-8-megi@xff.cz> In-Reply-To: <20230522214708.3886796-1-megi@xff.cz> References: <20230522214708.3886796-1-megi@xff.cz> MIME-Version: 1.0 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 From: Ondrej Jirman If phy is not defined in DT (eg. on rk3399), generic_phy_get_by_name will return -ENODATA. Handle that case correctly. Signed-off-by: Ondrej Jirman --- drivers/video/rockchip/dw_mipi_dsi_rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c index 6d8b1e6f541a..fd885ac8ccb6 100644 --- a/drivers/video/rockchip/dw_mipi_dsi_rockchip.c +++ b/drivers/video/rockchip/dw_mipi_dsi_rockchip.c @@ -814,9 +814,9 @@ static int dw_mipi_dsi_rockchip_probe(struct udevice *dev) * NULL if it's not initialized. */ ret = generic_phy_get_by_name(dev, "dphy", &priv->phy); - if ((ret) && (ret != -ENODEV)) { + if (ret && ret != -ENODATA) { dev_err(dev, "failed to get mipi dphy: %d\n", ret); - return -EINVAL; + return ret; } priv->pclk = devm_clk_get(dev, "pclk");