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


Groups > linux.kernel > #1305863 > unrolled thread

Re: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers

Started byLee Jones <lee.jones@linaro.org>
First post2016-01-11 07:00 +0100
Last post2016-01-11 07:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers Lee Jones <lee.jones@linaro.org> - 2016-01-11 07:00 +0100

#1305863 — Re: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers

FromLee Jones <lee.jones@linaro.org>
Date2016-01-11 07:00 +0100
SubjectRe: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
Message-ID<qPDGj-6uJ-19@gated-at.bofh.it>
On Tue, 17 Nov 2015, Stephen Boyd wrote:

> From: "Ivan T. Ivanov" <ivan.ivanov@linaro.org>
> 
> Revision ID registers are available only on devices with
> Slave IDs that are even, so don't make access to unavailable
> registers.
> 
> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
> [sboyd@codeaurora.org: Consider all slave ids that are even]
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>  drivers/mfd/qcom-spmi-pmic.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied, thanks.

> diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
> index af6ac1c4b45c..8653e8b9bb4f 100644
> --- a/drivers/mfd/qcom-spmi-pmic.c
> +++ b/drivers/mfd/qcom-spmi-pmic.c
> @@ -127,7 +127,9 @@ static int pmic_spmi_probe(struct spmi_device *sdev)
>  	if (IS_ERR(regmap))
>  		return PTR_ERR(regmap);
>  
> -	pmic_spmi_show_revid(regmap, &sdev->dev);
> +	/* Only the first slave id for a PMIC contains this information */
> +	if (sdev->usid % 2 == 0)
> +		pmic_spmi_show_revid(regmap, &sdev->dev);
>  
>  	return of_platform_populate(root, NULL, NULL, &sdev->dev);
>  }

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web