linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shubhrajyoti Datta <shubhrajyoti.datta@gmail.com>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Shubhrajyoti Datta <shubhraj@xilinx.com>,
	Rob Herring <robh@kernel.org>, Wolfram Sang <wsa@the-dreams.de>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org
Subject: Re: i2c: xiic: Strange clk_prepare_enable() in xiic_i2c_remove()
Date: Sat, 17 Dec 2016 12:36:19 +0530	[thread overview]
Message-ID: <CAKfKVtE5NC8L6gi642FhKQKvs-Lnmi4eqVkE6-9FQu=FEnno1A@mail.gmail.com> (raw)
In-Reply-To: <1481925285-594-1-git-send-email-khoroshilov@ispras.ru>

On Sat, Dec 17, 2016 at 3:24 AM, Alexey Khoroshilov
<khoroshilov@ispras.ru> wrote:
> Dear Shubhrajyoti,
>
> Looking at 36ecbcab84d0 ("i2c: xiic: Implement power management")
> it is not clear why clk_prepare_enable(i2c->clk) is required in
> xiic_i2c_remove()?

834         ret = clk_prepare_enable(i2c->clk);
835         if (ret) {
836                 dev_err(&pdev->dev, "Unable to enable clock.\n");
837                 return ret;
838         }
839         xiic_deinit(i2c);
840         clk_disable_unprepare(i2c->clk);

so it is enabled and disabled after xiic_deinit.

>
> It is enabled in xiic_i2c_probe() and disabled/enabled in
> cdns_i2c_runtime_suspend()/cdns_i2c_runtime_resume().
>
> Could you please clarify the point.
>
> --
> Alexey Khoroshilov
> Linux Verification Center, ISPRAS
> web: http://linuxtesting.org
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2016-12-17  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 21:54 i2c: xiic: Strange clk_prepare_enable() in xiic_i2c_remove() Alexey Khoroshilov
2016-12-17  7:06 ` 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='CAKfKVtE5NC8L6gi642FhKQKvs-Lnmi4eqVkE6-9FQu=FEnno1A@mail.gmail.com' \
    --to=shubhrajyoti.datta@gmail.com \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=shubhraj@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).