From patchwork Fri Mar 25 21:35:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 64499 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp362853lbc; Fri, 25 Mar 2016 14:35:28 -0700 (PDT) X-Received: by 10.98.68.209 with SMTP id m78mr23883334pfi.153.1458941727476; Fri, 25 Mar 2016 14:35:27 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n76si1207079pfa.84.2016.03.25.14.35.27; Fri, 25 Mar 2016 14:35:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754619AbcCYVfR (ORCPT + 29 others); Fri, 25 Mar 2016 17:35:17 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:36192 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754530AbcCYVfN (ORCPT ); Fri, 25 Mar 2016 17:35:13 -0400 Received: by mail-pf0-f175.google.com with SMTP id u190so90452275pfb.3 for ; Fri, 25 Mar 2016 14:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NKc9YywoaYJcqIl0cAxPaTqGnwAIELqFlHDD+gulmAc=; b=S5CCyVktqonc9Rs/DYPAl6+5NUGqAZuj/HHUnIPr3XnsH+l8QOhJVbaH6s45oO4iE7 +Ls0+k95z/pDrrBuUCEmN/OlSF2xWB4+IXRhISKfl+PtSx5rfynojd13ij59tUz4QjoG nyojCuKAoBmRxwbKAyJx0RkGu5imh2GBVuyYE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NKc9YywoaYJcqIl0cAxPaTqGnwAIELqFlHDD+gulmAc=; b=YDBAD3RAHf3W0f1wM3Stsd8l1mPQB2QO9y+8ZV/mucp/giZdLOPPcfJoVBeCIHKlk8 oO208ECxhlhJI0MWBw5rRxSOuC698uE1LlCJNqnPIGlrG4CaeOjJa9QgOrqHTLSLdPhM IDPV1cqHHxv1towk49hWWkKYToQ51aEiitekoHsoHUUOYGIjJr4odWmZLgyNwYkE4kb6 q8tcWDMD9dwXXQRWjDDb+TLOhB5dwl7fP+NZODPXZ6dpNUMZNI3EwihQ9VOp71Zh0FYe OKWdzI/NJRMmaTZXqsNahYLKwjchd1E3wOVlvL4ueFJv688Rzl8ZzszWMsxgXJ4BMPbY xztQ== X-Gm-Message-State: AD7BkJJ60PiZxe3jBGcQ8OlV+9WHiExCSvzGuvpO/8A7tbFO7K6r95AiGROgk9R2/JeJBcqG X-Received: by 10.98.86.146 with SMTP id h18mr24168187pfj.9.1458941712839; Fri, 25 Mar 2016 14:35:12 -0700 (PDT) Received: from localhost.localdomain (pat_11.qualcomm.com. [192.35.156.11]) by smtp.gmail.com with ESMTPSA id tn5sm18450901pac.32.2016.03.25.14.35.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Mar 2016 14:35:12 -0700 (PDT) From: Stephen Boyd To: Mark Brown Cc: linux-arm@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 2/2] regulator: qcom_spmi: Keep trying to add regulators if read fails Date: Fri, 25 Mar 2016 14:35:09 -0700 Message-Id: <1458941709-5386-3-git-send-email-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.8.0.rc4 In-Reply-To: <1458941709-5386-1-git-send-email-stephen.boyd@linaro.org> References: <1458941709-5386-1-git-send-email-stephen.boyd@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On some designs, a handful of the regulators can't be read via SPMI transactions because they're "secure" and not intended to be touched by non-secure processors. This driver unconditionally attempts to read the id registers of all the regulators though, leading to probe failing and no regulators being registered. Let's ignore any errors from failing to read the registers and keep adding other regulators so that this driver can probe on such devices. Signed-off-by: Stephen Boyd --- drivers/regulator/qcom_spmi-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.8.0.rc4 diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 07689fd0c0b0..3550f7f7c2eb 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1201,7 +1201,7 @@ static int spmi_regulator_match(struct spmi_regulator *vreg, u16 force_type) ret = spmi_vreg_read(vreg, SPMI_COMMON_REG_DIG_MAJOR_REV, version, ARRAY_SIZE(version)); if (ret) { - dev_err(vreg->dev, "could not read version registers\n"); + dev_dbg(vreg->dev, "could not read version registers\n"); return ret; } dig_major_rev = version[SPMI_COMMON_REG_DIG_MAJOR_REV @@ -1624,7 +1624,7 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev) ret = spmi_regulator_match(vreg, reg->force_type); if (ret) - goto err; + continue; config.dev = dev; config.driver_data = vreg;