Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3293460pxb; Mon, 25 Jan 2021 11:52:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+VX+Y10CxhgJOKeiy/+YCYOhazMU4ujQpOCw67FtCBG8O1+HyKtAG2LDknkkktQrUBq8l X-Received: by 2002:a05:6402:4312:: with SMTP id m18mr1861462edc.99.1611604340361; Mon, 25 Jan 2021 11:52:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611604340; cv=none; d=google.com; s=arc-20160816; b=sZEOzGP7PccL19UMww4Y1y6iS8OULYs1TroDYphr34JUYnLCr54kLp5vNcyeaBNvV5 DRxeYEyDLyRzO7G0Zr0Lyf/z3HcAnMzSQwSiT5NYrEO6NPPoNVRHtXFrFO+o7o9FfmhD rl2JatQdL81Ig08GrgdF3nJgg0JQEoxPuvrKHTNmOjsAKXZ/VT5MxMO+gHuAEv/gNDuU nkPhcZU6qqb2I0WmS7Nse9z7AOD78Rp3qV6Ml2IL9MPBdjyfp2Y/dwGPDNd7l/5cfpjL hWAbw2VWCP46+eqIFfO20cxkt4mg2ZFscHrnKTfl/3jlTpbdKDS3MeRVz56b41vTBH9W UdQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1t/GdNTi2oOTw8D8/h34ezIij3NRN5j7ufZ5EEKo418=; b=KpE/5XPBAHpAQ3O9qk+RxHYkE6mL6+JCWBgyOdAWGn54Qfhg6ZLkUDiTAoxNRKc4Z3 2Aw6PS5zW9ECp5ihqUKOcb1lW5D14Mjsxe6GudJF+GB+QIDetPEI00s8A01IaimWebrp SbWiPoduJk1zy0aaIBY/j8UlM7PWkfxigOlw23Y5yf1sU2+NLSLmrcO+x48QtMFUtqq/ RgUy7/Xr3saNecNG4zpfLd1asluzuAe8Cv9NoKOA0LNMhqMrKgbEeAy7M8Rz04uYfNjK fN9cFSvzeCGM9/wcIgWTbzK0xhPbbgX6l9i7ZUfoYFXYZaCk2I6FnGnbkFUX4EGx7XYp TZWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b="hkr0J/fG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si6239940ejh.668.2021.01.25.11.51.40; Mon, 25 Jan 2021 11:52:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b="hkr0J/fG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732130AbhAYTsP (ORCPT + 99 others); Mon, 25 Jan 2021 14:48:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731893AbhAYT2c (ORCPT ); Mon, 25 Jan 2021 14:28:32 -0500 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a01:238:4321:8900:456f:ecd6:43e:202c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47FF2C061574 for ; Mon, 25 Jan 2021 11:27:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1t/GdNTi2oOTw8D8/h34ezIij3NRN5j7ufZ5EEKo418=; b=hkr0J/fGVEB/dyOiwRHxMp3vdA 1btyMmB2G8h9CTaU7eoDL9FNz6Mr53fJOK9CL1hyvTRPNYwKe79UxoM4oIyDmua6x+LE5heuj349T TUd9fP4idCMAmmCdqfA06x81JLYCdAWd3gNNTi1fCLs01It9h1n8xtTTuRI5omIKs+uc=; Received: from p200300ccff0a26001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff0a:2600:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1l47WV-0007WI-0u; Mon, 25 Jan 2021 20:27:39 +0100 Received: from andi by aktux with local (Exim 4.92) (envelope-from ) id 1l47WU-0004ba-P1; Mon, 25 Jan 2021 20:27:38 +0100 From: Andreas Kemnade To: lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org Cc: Andreas Kemnade Subject: [PATCH] regulator: core: avoid error messages for deferred probing Date: Mon, 25 Jan 2021 20:27:36 +0100 Message-Id: <20210125192736.17657-1-andreas@kemnade.info> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.0 (-) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Noise like this happens on boot with regulators which can be bypassed when the supply is not probed. That looks too alarming and confusing. [ 3.844092] vddpu: bypassed regulator has no supply! [ 3.849105] vddpu: failed to get the current voltage: -EPROBE_DEFER [ 3.855591] vddpu: supplied by DCDC1 [ 3.877211] vddsoc: bypassed regulator has no supply! [ 3.882538] vddsoc: failed to get the current voltage: -EPROBE_DEFER [ 3.888975] vddsoc: supplied by DCDC1 Handle such issues silently. Signed-off-by: Andreas Kemnade --- drivers/regulator/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index ca03d8e70bd1..238745fc97c2 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1168,6 +1168,9 @@ static int machine_constraints_voltage(struct regulator_dev *rdev, current_uV = regulator_get_voltage_rdev(rdev); } + if (current_uV == -EPROBE_DEFER) + return -EPROBE_DEFER; + if (current_uV < 0) { rdev_err(rdev, "failed to get the current voltage: %pe\n", @@ -4151,9 +4154,12 @@ int regulator_get_voltage_rdev(struct regulator_dev *rdev) if (bypassed) { /* if bypassed the regulator must have a supply */ if (!rdev->supply) { + if (rdev->supply_name) + return -EPROBE_DEFER; + rdev_err(rdev, "bypassed regulator has no supply!\n"); - return -EPROBE_DEFER; + return -EINVAL; } return regulator_get_voltage_rdev(rdev->supply->rdev); -- 2.29.2