From: Stephen Boyd <sboyd@codeaurora.org>
To: Lee Jones <lee.jones@linaro.org>
Cc: "Ivan T. Ivanov" <ivan.ivanov@linaro.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
Date: Wed, 6 Jan 2016 17:50:14 -0800 [thread overview]
Message-ID: <568DC456.9060300@codeaurora.org> (raw)
In-Reply-To: <1447805204-32483-1-git-send-email-sboyd@codeaurora.org>
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
WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mfd: qcom-spmi-pmic: Don't access non-existing registers
Date: Wed, 6 Jan 2016 17:50:14 -0800 [thread overview]
Message-ID: <568DC456.9060300@codeaurora.org> (raw)
In-Reply-To: <1447805204-32483-1-git-send-email-sboyd@codeaurora.org>
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
next prev parent reply other threads:[~2016-01-07 1:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-01-07 1:50 ` Stephen Boyd
2016-01-11 5:50 ` Lee Jones
2016-01-11 5:50 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=568DC456.9060300@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=ivan.ivanov@linaro.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.