Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1364846 > unrolled thread

[PATCH 0/2] Support qcom pm8994 regulators

Started byStephen Boyd <stephen.boyd@linaro.org>
First post2016-03-25 22:40 +0100
Last post2016-03-25 22:40 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] Support qcom pm8994 regulators Stephen Boyd <stephen.boyd@linaro.org> - 2016-03-25 22:40 +0100
    [PATCH 2/2] regulator: qcom_spmi: Keep trying to add regulators if read fails Stephen Boyd <stephen.boyd@linaro.org> - 2016-03-25 22:40 +0100

#1364846 — [PATCH 0/2] Support qcom pm8994 regulators

FromStephen Boyd <stephen.boyd@linaro.org>
Date2016-03-25 22:40 +0100
Subject[PATCH 0/2] Support qcom pm8994 regulators
Message-ID<rgHCy-7Rl-9@gated-at.bofh.it>
These two patches add support for pm8994 regulators. The second patch
is necessary to get things working because pm8994 has some regulators
that can't typically be read/written due to the security policy.

Stephen Boyd (2):
  regulator: qcom_spmi: Add support for pm8994
  regulator: qcom_spmi: Keep trying to add regulators if read fails

 .../bindings/regulator/qcom,spmi-regulator.txt     | 37 +++++++++++++++
 drivers/regulator/qcom_spmi-regulator.c            | 55 +++++++++++++++++++++-
 2 files changed, 90 insertions(+), 2 deletions(-)

-- 
2.8.0.rc4

[toc] | [next] | [standalone]


#1364848 — [PATCH 2/2] regulator: qcom_spmi: Keep trying to add regulators if read fails

FromStephen Boyd <stephen.boyd@linaro.org>
Date2016-03-25 22:40 +0100
Subject[PATCH 2/2] regulator: qcom_spmi: Keep trying to add regulators if read fails
Message-ID<rgHCy-7Rl-15@gated-at.bofh.it>
In reply to#1364846
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 <stephen.boyd@linaro.org>
---
 drivers/regulator/qcom_spmi-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
-- 
2.8.0.rc4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web