summaryrefslogtreecommitdiff
path: root/drivers/regulator/qcom_spmi-regulator.c
diff options
context:
space:
mode:
authorStephen Boyd <stephen.boyd@linaro.org>2016-03-25 14:35:09 -0700
committerMark Brown <broonie@kernel.org>2016-03-28 10:41:02 +0100
commit6ee5c04407f59122774c8da26f3ee8d6db9cec9b (patch)
treec9c2de3bb7cdfd9723a82846719c245d6a878da8 /drivers/regulator/qcom_spmi-regulator.c
parent50314e55a140a0bc898d5f34b591e4e4ecedc75f (diff)
downloadlwn-6ee5c04407f59122774c8da26f3ee8d6db9cec9b.tar.gz
lwn-6ee5c04407f59122774c8da26f3ee8d6db9cec9b.zip
regulator: qcom_spmi: Keep trying to add regulators if read fails
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> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/qcom_spmi-regulator.c')
-rw-r--r--drivers/regulator/qcom_spmi-regulator.c4
1 files 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;