From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <sapthagiri.baratam@gmail.com>
Cc: <lee.jones@linaro.org>, <patches@opensource.cirrus.com>,
<linux-kernel@vger.kernel.org>,
Sapthagiri Baratam <sapthagiri.baratam@cirrus.com>
Subject: Re: [PATCH] mfd: arizona: Correct calling of runtime_put_sync
Date: Mon, 20 Aug 2018 15:17:11 +0100 [thread overview]
Message-ID: <20180820141711.GQ32322@imbe.wolfsonmicro.main> (raw)
In-Reply-To: <5b7a983d.1c69fb81.8349b.fc57@mx.google.com>
On Mon, Aug 20, 2018 at 03:59:01PM +0530, sapthagiri.baratam@gmail.com wrote:
> From: Sapthagiri Baratam <sapthagiri.baratam@cirrus.com>
>
> Don't call runtime_put_sync when clk32k_ref is ARIZONA_32KZ_MCLK2
> as there is no corresponding runtime_get_sync call.
>
> MCLK1 is not in the AoD power domain so if it is used as 32kHz clock
> source we need to hold a runtime PM reference to keep the device from
> going into low power mode.
>
> fixes: cdd8da8cc66b ("mfd: arizona: Add gating of external MCLKn clocks")
> Signed-off-by: baratam <sapthagiri.baratam@cirrus.com>
You should have your full name here too.
Otherwise the change looks good to me:
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
> ---
> drivers/mfd/arizona-core.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> index c7c3d72..190f9a4 100644
> --- a/drivers/mfd/arizona-core.c
> +++ b/drivers/mfd/arizona-core.c
> @@ -53,8 +53,10 @@ int arizona_clk32k_enable(struct arizona *arizona)
> if (ret != 0)
> goto err_ref;
> ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK1]);
> - if (ret != 0)
> - goto err_pm;
> + if (ret != 0) {
> + pm_runtime_put_sync(arizona->dev);
> + goto err_ref;
> + }
> break;
> case ARIZONA_32KZ_MCLK2:
> ret = clk_prepare_enable(arizona->mclk[ARIZONA_MCLK2]);
> @@ -68,8 +70,6 @@ int arizona_clk32k_enable(struct arizona *arizona)
> ARIZONA_CLK_32K_ENA);
> }
>
> -err_pm:
> - pm_runtime_put_sync(arizona->dev);
> err_ref:
> if (ret != 0)
> arizona->clk32k_ref--;
> --
> 1.9.1
prev parent reply other threads:[~2018-08-20 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 10:29 [PATCH] mfd: arizona: Correct calling of runtime_put_sync sapthagiri.baratam
2018-08-20 14:17 ` Charles Keepax [this message]
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=20180820141711.GQ32322@imbe.wolfsonmicro.main \
--to=ckeepax@opensource.cirrus.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=sapthagiri.baratam@cirrus.com \
--cc=sapthagiri.baratam@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox