From: Ulf Hansson <ulf.hansson@linaro.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-clk <linux-clk@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Stephen Boyd <sboyd@codeaurora.org>,
Michael Turquette <mturquette@baylibre.com>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Inki Dae <inki.dae@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v5 2/4] clk: samsung: Add support for runtime PM
Date: Mon, 13 Mar 2017 14:34:00 +0100 [thread overview]
Message-ID: <CAPDyKFpCkzq6A-QcWuaG+k_R-fcnoJCJqYJNGEWHTaeT-8bZhA@mail.gmail.com> (raw)
In-Reply-To: <1485345194-3196-3-git-send-email-m.szyprowski@samsung.com>
On 25 January 2017 at 12:53, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> This patch adds struct device pointer to samsung_clk_provider and forwarding it
> to clk_register_* functions, so drivers can register clocks, which use runtime
> pm feature.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> drivers/clk/samsung/clk-pll.c | 2 +-
> drivers/clk/samsung/clk.c | 12 ++++++------
> drivers/clk/samsung/clk.h | 1 +
> 3 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
> index 52290894857a..74c9ce89538a 100644
> --- a/drivers/clk/samsung/clk-pll.c
> +++ b/drivers/clk/samsung/clk-pll.c
> @@ -1376,7 +1376,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
> pll->lock_reg = base + pll_clk->lock_offset;
> pll->con_reg = base + pll_clk->con_offset;
>
> - clk = clk_register(NULL, &pll->hw);
> + clk = clk_register(ctx->dev, &pll->hw);
> if (IS_ERR(clk)) {
> pr_err("%s: failed to register pll clock %s : %ld\n",
> __func__, pll_clk->name, PTR_ERR(clk));
> diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
> index b7d87d6db9dc..e6923714f024 100644
> --- a/drivers/clk/samsung/clk.c
> +++ b/drivers/clk/samsung/clk.c
> @@ -143,7 +143,7 @@ void __init samsung_clk_register_fixed_rate(struct samsung_clk_provider *ctx,
> unsigned int idx, ret;
>
> for (idx = 0; idx < nr_clk; idx++, list++) {
> - clk = clk_register_fixed_rate(NULL, list->name,
> + clk = clk_register_fixed_rate(ctx->dev, list->name,
> list->parent_name, list->flags, list->fixed_rate);
> if (IS_ERR(clk)) {
> pr_err("%s: failed to register clock %s\n", __func__,
> @@ -172,7 +172,7 @@ void __init samsung_clk_register_fixed_factor(struct samsung_clk_provider *ctx,
> unsigned int idx;
>
> for (idx = 0; idx < nr_clk; idx++, list++) {
> - clk = clk_register_fixed_factor(NULL, list->name,
> + clk = clk_register_fixed_factor(ctx->dev, list->name,
> list->parent_name, list->flags, list->mult, list->div);
> if (IS_ERR(clk)) {
> pr_err("%s: failed to register clock %s\n", __func__,
> @@ -193,7 +193,7 @@ void __init samsung_clk_register_mux(struct samsung_clk_provider *ctx,
> unsigned int idx, ret;
>
> for (idx = 0; idx < nr_clk; idx++, list++) {
> - clk = clk_register_mux(NULL, list->name, list->parent_names,
> + clk = clk_register_mux(ctx->dev, list->name, list->parent_names,
> list->num_parents, list->flags,
> ctx->reg_base + list->offset,
> list->shift, list->width, list->mux_flags, &ctx->lock);
> @@ -226,13 +226,13 @@ void __init samsung_clk_register_div(struct samsung_clk_provider *ctx,
>
> for (idx = 0; idx < nr_clk; idx++, list++) {
> if (list->table)
> - clk = clk_register_divider_table(NULL, list->name,
> + clk = clk_register_divider_table(ctx->dev, list->name,
> list->parent_name, list->flags,
> ctx->reg_base + list->offset,
> list->shift, list->width, list->div_flags,
> list->table, &ctx->lock);
> else
> - clk = clk_register_divider(NULL, list->name,
> + clk = clk_register_divider(ctx->dev, list->name,
> list->parent_name, list->flags,
> ctx->reg_base + list->offset, list->shift,
> list->width, list->div_flags, &ctx->lock);
> @@ -264,7 +264,7 @@ void __init samsung_clk_register_gate(struct samsung_clk_provider *ctx,
> unsigned int idx, ret;
>
> for (idx = 0; idx < nr_clk; idx++, list++) {
> - clk = clk_register_gate(NULL, list->name, list->parent_name,
> + clk = clk_register_gate(ctx->dev, list->name, list->parent_name,
> list->flags, ctx->reg_base + list->offset,
> list->bit_idx, list->gate_flags, &ctx->lock);
> if (IS_ERR(clk)) {
> diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
> index da3bdebabf1e..9263d8a27c6b 100644
> --- a/drivers/clk/samsung/clk.h
> +++ b/drivers/clk/samsung/clk.h
> @@ -26,6 +26,7 @@
> */
> struct samsung_clk_provider {
> void __iomem *reg_base;
> + struct device *dev;
> struct clk_onecell_data clk_data;
> spinlock_t lock;
> };
> --
> 1.9.1
>
next prev parent reply other threads:[~2017-03-13 13:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170125115327eucas1p172866fa87417f59f1dea60185d6d8b60@eucas1p1.samsung.com>
2017-01-25 11:53 ` [PATCH v5 0/4] Add runtime PM support for clocks (on Exynos SoC example) Marek Szyprowski
[not found] ` <CGME20170125115328eucas1p1d97fac29286805b58039f8aec2b9bfe6@eucas1p1.samsung.com>
2017-01-25 11:53 ` [PATCH v5 1/4] clk: Add support for runtime PM Marek Szyprowski
2017-03-13 12:20 ` Ulf Hansson
[not found] ` <CGME20170125115329eucas1p1fc59d9be3421bc763d16aa331375b9f6@eucas1p1.samsung.com>
2017-01-25 11:53 ` [PATCH v5 2/4] clk: samsung: " Marek Szyprowski
2017-03-13 13:34 ` Ulf Hansson [this message]
[not found] ` <CGME20170125115329eucas1p1f42bbb54d5973b6192e964dc8b3a8081@eucas1p1.samsung.com>
2017-01-25 11:53 ` [PATCH v5 3/4] clk: samsung: exynos5433: Add runtime PM support Marek Szyprowski
2017-03-13 13:31 ` Ulf Hansson
2017-03-22 8:26 ` Marek Szyprowski
[not found] ` <CGME20170125115330eucas1p16f9de097e0966bc9d9901bc27caa085c@eucas1p1.samsung.com>
2017-01-25 11:53 ` [PATCH v5 4/4] clk: samsung: exynos-audss: Use runtime PM Marek Szyprowski
2017-01-26 1:28 ` kbuild test robot
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=CAPDyKFpCkzq6A-QcWuaG+k_R-fcnoJCJqYJNGEWHTaeT-8bZhA@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=inki.dae@samsung.com \
--cc=krzk@kernel.org \
--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 \
/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).