All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
@ 2015-11-18  0:06 ` Stephen Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2015-11-18  0:06 UTC (permalink / raw)
  To: Lee Jones; +Cc: Ivan T. Ivanov, linux-kernel, linux-arm-msm, linux-arm-kernel

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(-)

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);
 }
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
@ 2015-11-18  0:06 ` Stephen Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2015-11-18  0:06 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 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(-)

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);
 }
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
  2015-11-18  0:06 ` Stephen Boyd
@ 2016-01-07  1:50   ` Stephen Boyd
  -1 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2016-01-07  1:50 UTC (permalink / raw)
  To: Lee Jones; +Cc: Ivan T. Ivanov, linux-kernel, linux-arm-msm, linux-arm-kernel

On 11/17/15 16:06, 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>
> ---

Ping?

>  drivers/mfd/qcom-spmi-pmic.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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);
>  }

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
@ 2016-01-07  1:50   ` Stephen Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2016-01-07  1:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/17/15 16:06, 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 at codeaurora.org: Consider all slave ids that are even]
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---

Ping?

>  drivers/mfd/qcom-spmi-pmic.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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);
>  }

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
  2015-11-18  0:06 ` Stephen Boyd
@ 2016-01-11  5:50   ` Lee Jones
  -1 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2016-01-11  5:50 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Ivan T. Ivanov, linux-kernel, linux-arm-msm, linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
@ 2016-01-11  5:50   ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2016-01-11  5:50 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-11  5:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-18  0:06 [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers Stephen Boyd
2015-11-18  0:06 ` Stephen Boyd
2016-01-07  1:50 ` Stephen Boyd
2016-01-07  1:50   ` Stephen Boyd
2016-01-11  5:50 ` Lee Jones
2016-01-11  5:50   ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.