From: Guenter Roeck <linux@roeck-us.net>
To: Felipe Balbi <balbi@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Question about suspend/resume clock handling in dwc3-of-simple.c
Date: Mon, 12 Sep 2016 11:56:29 -0700 [thread overview]
Message-ID: <20160912185629.GA25929@roeck-us.net> (raw)
Hi folks,
In dwc3-of-simple.c:dwc3_of_simple_remove(), I see the following code.
for (i = 0; i < simple->num_clocks; i++) {
clk_unprepare(simple->clks[i]);
clk_put(simple->clks[i]);
}
What I don't understand is why clk_unprepare() is called instead
of clk_disable_unprepare(). Someone told me that it was due to
dwc3_of_simple_runtime_suspend(), which would call clk_disable().
That doesn't really make sense to me, since after all CONFIG_PM
can be disabled.
Should it be clk_disable_unprepare(), or maybe something like the
following
if (!pm_runtime_status_suspended(dev))
clk_disable_unprepare();
else
clk_unprepare();
or am I missing something ?
Thanks,
Guenter
next reply other threads:[~2016-09-12 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 18:56 Guenter Roeck [this message]
2016-09-12 19:05 ` Question about suspend/resume clock handling in dwc3-of-simple.c Felipe Balbi
2016-09-12 19:43 ` Guenter Roeck
2016-09-13 5:35 ` Felipe Balbi
2016-09-13 13:10 ` Guenter Roeck
2016-09-13 14:05 ` Felipe Balbi
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=20160912185629.GA25929@roeck-us.net \
--to=linux@roeck-us.net \
--cc=balbi@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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.