From: Krzysztof Kozlowski <krzk@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-clk@vger.kernel.org, linux-pm@vger.kernel.org,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Stephen Boyd <sboyd@codeaurora.org>,
Michael Turquette <mturquette@baylibre.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Inki Dae <inki.dae@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v7 1/4] clk: Add support for runtime PM
Date: Tue, 8 Aug 2017 17:37:12 +0200 [thread overview]
Message-ID: <20170808153712.GA2646@kozik-book> (raw)
In-Reply-To: <1501839294-478-2-git-send-email-m.szyprowski@samsung.com>
On Fri, Aug 04, 2017 at 11:34:51AM +0200, Marek Szyprowski wrote:
> Registers for some clocks might be located in the SOC area, which are under the
> power domain. To enable access to those registers respective domain has to be
> turned on. Additionally, registers for such clocks will usually loose its
> contents when power domain is turned off, so additional saving and restoring of
> them might be needed in the clock controller driver.
>
> This patch adds basic infrastructure in the clocks core to allow implementing
> driver for such clocks under power domains. Clock provider can supply a
> struct device pointer, which is the used by clock core for tracking and managing
> clock's controller runtime pm state. Each clk_prepare() operation
> will first call pm_runtime_get_sync() on the supplied device, while
> clk_unprepare() will do pm_runtime_put_sync() at the end.
>
> Additional calls to pm_runtime_get/put functions are required to ensure that any
> register access (like calculating/changing clock rates and unpreparing/disabling
> unused clocks on boot) will be done with clock controller in runtime resumend
> state.
>
> When one wants to register clock controller, which make use of this feature, he
> has to:
> 1. Provide a struct device to the core when registering the provider.
> 2. Ensure to enable runtime PM for that device before registering clocks.
> 3. Make sure that the runtime PM status of the controller device reflects
> the HW state.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> drivers/clk/clk.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++-------
> 1 file changed, 114 insertions(+), 15 deletions(-)
>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
next prev parent reply other threads:[~2017-08-08 15:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170804093514eucas1p2b15dbf1879d150c8c40f1696c2109975@eucas1p2.samsung.com>
2017-08-04 9:34 ` [PATCH v7 0/4] Add runtime PM support for clocks (on Exynos SoC example) Marek Szyprowski
[not found] ` <CGME20170804093515eucas1p2226e597c155e5c4ca4ffea95c9e00392@eucas1p2.samsung.com>
2017-08-04 9:34 ` [PATCH v7 1/4] clk: Add support for runtime PM Marek Szyprowski
2017-08-08 15:37 ` Krzysztof Kozlowski [this message]
[not found] ` <CGME20170804093515eucas1p1cc2273ba02d86767c5b2533430577698@eucas1p1.samsung.com>
2017-08-04 9:34 ` [PATCH v7 2/4] clk: samsung: " Marek Szyprowski
2017-08-04 14:17 ` Chanwoo Choi
2017-08-08 15:44 ` Krzysztof Kozlowski
[not found] ` <CGME20170804093516eucas1p2267f819dad7c2e84eeca81a81d2687f2@eucas1p2.samsung.com>
2017-08-04 9:34 ` [PATCH v7 3/4] clk: samsung: exynos5433: Add runtime PM support Marek Szyprowski
2017-08-04 14:19 ` Chanwoo Choi
2017-08-08 16:11 ` Krzysztof Kozlowski
2017-08-09 8:19 ` Marek Szyprowski
2017-08-09 8:50 ` Krzysztof Kozlowski
[not found] ` <CGME20170804093517eucas1p2387158f22f90a2a124d6a87d2076267c@eucas1p2.samsung.com>
2017-08-04 9:34 ` [PATCH v7 4/4] clk: samsung: exynos-audss: Use runtime PM Marek Szyprowski
2017-08-08 16:57 ` Krzysztof Kozlowski
2017-08-04 14:28 ` [PATCH v7 0/4] Add runtime PM support for clocks (on Exynos SoC example) Chanwoo Choi
2017-08-09 10:45 ` Marek Szyprowski
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=20170808153712.GA2646@kozik-book \
--to=krzk@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=inki.dae@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mturquette@baylibre.com \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@codeaurora.org \
--cc=ulf.hansson@linaro.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 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).