From: Shubhrajyoti Datta <omaplinuxkernel@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
Linux-I2C <linux-i2c@vger.kernel.org>,
devicetree@vger.kernel.org,
Shubhrajyoti Datta <shubhraj@xilinx.com>
Subject: Re: [PATCH 1/2] i2c: xiic: Implement Power management
Date: Wed, 2 Mar 2016 10:57:42 +0530 [thread overview]
Message-ID: <CAM=Q2cvx9y2oiSop2-je2P0b5osQOL+t2w8y76WabHa2DTLayQ@mail.gmail.com> (raw)
In-Reply-To: <20160301182947.GB1488@katana>
On Tue, Mar 1, 2016 at 11:59 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
>
>> + ret = clk_prepare_enable(i2c->clk);
>> + if (ret)
>> + dev_err(&pdev->dev, "Unable to enable clock.\n");
>
> Don't you want to bail out here? The clk refcounting will be messed up
> if you continue.
Agree missed it will fix it.
>
>> +err_clk_dis:
>> + clk_disable_unprepare(i2c->clk);
>> + pm_runtime_set_suspended(&pdev->dev);
>> + pm_runtime_disable(&pdev->dev);
>> + return ret;
>
> To match the inverse of the activation order, I'd put the
> clk_disable_unprepare after the pm_* calls. Couldn't it happen that
> those calls need to change the clk state?
>
makes sense will change in the next version
prev parent reply other threads:[~2016-03-02 5:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 7:50 [PATCH 1/2] i2c: xiic: Implement Power management Shubhrajyoti Datta
2016-01-04 7:50 ` [PATCH 2/2] bindings: i2c: Add clock entries for i2c-xiic Shubhrajyoti Datta
2016-01-04 14:18 ` Rob Herring
2016-01-20 9:07 ` Shubhrajyoti Datta
[not found] ` <1451893834-1066-1-git-send-email-shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2016-01-20 9:11 ` [PATCH 1/2] i2c: xiic: Implement Power management Shubhrajyoti Datta
2016-03-01 18:29 ` Wolfram Sang
2016-03-02 5:27 ` Shubhrajyoti Datta [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='CAM=Q2cvx9y2oiSop2-je2P0b5osQOL+t2w8y76WabHa2DTLayQ@mail.gmail.com' \
--to=omaplinuxkernel@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=shubhraj@xilinx.com \
--cc=shubhrajyoti.datta@xilinx.com \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).