From patchwork Tue Dec 6 12:48:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 1712696 X-Patchwork-Delegate: ykai007@gmail.com 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=metanate.com header.i=@metanate.com header.a=rsa-sha256 header.s=stronger header.b=KQLewAKE; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NRKxF17Kqz23yq for ; Tue, 6 Dec 2022 23:49:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C5658852C4; Tue, 6 Dec 2022 13:49:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=metanate.com 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=metanate.com header.i=@metanate.com header.b="KQLewAKE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35556852D0; Tue, 6 Dec 2022 13:49:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_NONE,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from metanate.com (unknown [IPv6:2001:8b0:1628:5005::111]) (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 E7F07851D3 for ; Tue, 6 Dec 2022 13:49:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=metanate.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=john@metanate.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Content-Type:Reply-To:Content-ID:Content-Description: In-Reply-To:References; bh=JZ6+x+5kJijHPLbfYk3JXloK62rqOi1usE0XibYQiOE=; b=KQ LewAKErdezA5IUbH4jeSynovcXwYW8Jy3bYk8qDMbFLFLDF7K2SwfDHXNL52WW7QXAaqhIxykEuAz ToiRaR7znx9MC32mvnuuAMSkfsDI6mT/vfpRAgadC5dQE05ZiRSnZe87/o2GY3JSh0Z7YQ3rda6XI EPEKXJSq1Dvt8RlaIxNI1SmnvMynPNYEl1ufVQk1q1e1wTVcf56JpMVNpywu0uNHKh/gK3bbC9S6F DMVt+f0zw/sGLFAfipNnDXoTFENEVT0HDIUrKS0OULWUOCjuJtSCdz6VCyVq/a1c/MkTRvoWcHToN zEhJUJo+EUsjTYcsd4QeqnFDIk/U1wjQ==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p2XNc-0000r8-2D; Tue, 06 Dec 2022 12:49:00 +0000 From: John Keeping To: Kever Yang Cc: John Keeping , Simon Glass , Philipp Tomsich , u-boot@lists.denx.de Subject: [PATCH] phy: rockchip: handle clock without enable function Date: Tue, 6 Dec 2022 12:48:55 +0000 Message-Id: <20221206124855.2836827-1-john@metanate.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Authenticated: YES 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.6 at phobos.denx.de X-Virus-Status: Clean If a clock doesn't supply the enable hook, clk_enable() will return -ENOSYS. In this case the clock is always enabled so there is no error and the phy initialisation should continue. Signed-off-by: John Keeping Reviewed-by: Kever Yang --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index 62b8ba3a4a..b32a498ea7 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -119,7 +119,7 @@ static int rockchip_usb2phy_init(struct phy *phy) int ret; ret = clk_enable(&priv->phyclk); - if (ret) { + if (ret && ret != -ENOSYS) { dev_err(phy->dev, "failed to enable phyclk (ret=%d)\n", ret); return ret; }